From: <enl...@li...> - 2005-10-07 22:14:22
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default Modified Files: Makefile.am Log Message: * Oops. Adds a basic stock icons theme =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Makefile.am 7 Oct 2005 21:53:47 -0000 1.2 +++ Makefile.am 7 Oct 2005 22:14:14 -0000 1.3 @@ -4,15 +4,15 @@ EDJE_CC = edje_cc EDJE_FLAGS = \ -v \ --id $(top_srcdir)/data/stock_icons/default/icons +-id $(top_srcdir)/data/themes/default/icons -filesdir = $(pkgdatadir)/stock_icons +filesdir = $(pkgdatadir)/themes files_DATA = default.edj default.edj: Makefile default.edc $(EDJE_CC) $(EDJE_FLAGS) \ - $(top_srcdir)/data/stock_icons/default/default.edc \ - $(top_builddir)/data/stock_icons/default/default.edj + $(top_srcdir)/data/themes/default/default.edc \ + $(top_builddir)/data/themes/default/default.edj clean-local: rm -f *.edj |
From: <enl...@li...> - 2005-10-07 22:34:48
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default/images Added Files: tree_expander_fold.png tree_expander_unfold.png Log Message: Damn it! It should work now! |
From: <enl...@li...> - 2005-10-07 22:34:48
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/src/bin Modified Files: etk_tree_test.c Log Message: Damn it! It should work now! =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_tree_test.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- etk_tree_test.c 7 Oct 2005 22:00:56 -0000 1.3 +++ etk_tree_test.c 7 Oct 2005 22:34:43 -0000 1.4 @@ -50,9 +50,9 @@ etk_tree_freeze(ETK_TREE(tree)); for (i = 0; i < 1000; i++) { - row = etk_tree_append(ETK_TREE(tree), col1, "Row1", col2, 1, col3, PACKAGE_DATA_DIR "/1star.png", NULL); - row = etk_tree_append_to_row(row, col1, "Row2", col2, 2, col3, PACKAGE_DATA_DIR "/2stars.png", NULL); - etk_tree_append_to_row(row, col1, "Row3", col2, 3, col3, PACKAGE_DATA_DIR "/3stars.png", NULL); + row = etk_tree_append(ETK_TREE(tree), col1, "Row1", col2, 1, col3, PACKAGE_DATA_DIR "/images/1star.png", NULL); + row = etk_tree_append_to_row(row, col1, "Row2", col2, 2, col3, PACKAGE_DATA_DIR "/images/2stars.png", NULL); + etk_tree_append_to_row(row, col1, "Row3", col2, 3, col3, PACKAGE_DATA_DIR "/images/3stars.png", NULL); } etk_tree_thaw(ETK_TREE(tree)); @@ -71,18 +71,18 @@ etk_tree_freeze(ETK_TREE(tree)); for (i = 0; i < 300; i++) { - etk_tree_append(ETK_TREE(tree), col1, "Row1", col2, 1, col3, PACKAGE_DATA_DIR "/1star.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row2", col2, 2, col3, PACKAGE_DATA_DIR "/2stars.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row3", col2, 3, col3, PACKAGE_DATA_DIR "/3stars.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row4", col2, 1, col3, PACKAGE_DATA_DIR "/3stars.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row5", col2, 2, col3, PACKAGE_DATA_DIR "/2stars.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row6", col2, 3, col3, PACKAGE_DATA_DIR "/1star.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row7", col2, 1, col3, PACKAGE_DATA_DIR "/1star.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row8", col2, 2, col3, PACKAGE_DATA_DIR "/2stars.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row9", col2, 3, col3, PACKAGE_DATA_DIR "/3stars.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row10", col2, 1, col3, PACKAGE_DATA_DIR "/3stars.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row11", col2, 2, col3, PACKAGE_DATA_DIR "/2stars.png", NULL); - etk_tree_append(ETK_TREE(tree), col1, "Row12", col2, 3, col3, PACKAGE_DATA_DIR "/1star.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row1", col2, 1, col3, PACKAGE_DATA_DIR "/images/1star.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row2", col2, 2, col3, PACKAGE_DATA_DIR "/images/2stars.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row3", col2, 3, col3, PACKAGE_DATA_DIR "/images/3stars.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row4", col2, 1, col3, PACKAGE_DATA_DIR "/images/3stars.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row5", col2, 2, col3, PACKAGE_DATA_DIR "/images/2stars.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row6", col2, 3, col3, PACKAGE_DATA_DIR "/images/1star.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row7", col2, 1, col3, PACKAGE_DATA_DIR "/images/1star.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row8", col2, 2, col3, PACKAGE_DATA_DIR "/images/2stars.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row9", col2, 3, col3, PACKAGE_DATA_DIR "/images/3stars.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row10", col2, 1, col3, PACKAGE_DATA_DIR "/images/3stars.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row11", col2, 2, col3, PACKAGE_DATA_DIR "/images/2stars.png", NULL); + etk_tree_append(ETK_TREE(tree), col1, "Row12", col2, 3, col3, PACKAGE_DATA_DIR "/images/1star.png", NULL); } etk_tree_thaw(ETK_TREE(tree)); |
From: <enl...@li...> - 2005-10-07 22:35:19
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default Modified Files: Makefile.am default.edc Log Message: Damn it! It should work now! =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Makefile.am 7 Oct 2005 22:14:14 -0000 1.3 +++ Makefile.am 7 Oct 2005 22:34:43 -0000 1.4 @@ -4,7 +4,8 @@ EDJE_CC = edje_cc EDJE_FLAGS = \ -v \ --id $(top_srcdir)/data/themes/default/icons +-id $(top_srcdir)/data/themes/default/images \ +-fd $(top_srcdir)/data/themes/default/fonts filesdir = $(pkgdatadir)/themes files_DATA = default.edj =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/default.edc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- default.edc 7 Oct 2005 21:53:47 -0000 1.2 +++ default.edc 7 Oct 2005 22:34:43 -0000 1.3 @@ -1,34 +1,16 @@ -#define STOCK_ICON(icon_name, icon_image) \ -group { \ - name: icon_name; \ - parts { \ - part { \ - name: "icon"; \ - description { \ - state: "default" 0.0; \ - rel1 { \ - relative: 0.0 0.0; \ - offset: 0 0; \ - } \ - rel2 { \ - relative: 1.0 1.0; \ - offset: -1 -1; \ - } \ - image { \ - normal: icon_image; \ - } \ - } \ - } \ - } \ -} - -images { - image: "open.png" COMP; - image: "close.png" COMP; - image: "save.png" COMP; +#include "macros/focus_rect.edc" +fonts { + font: "Vera.ttf" "Vera"; } +#include "images/images.edc" collections { - STOCK_ICON("OPEN", "open.png") - STOCK_ICON("CLOSE", "close.png") - STOCK_ICON("SAVE", "save.png") + #include "widgets/windows.edc" + #include "widgets/button.edc" + #include "widgets/toggle_button.edc" + #include "widgets/check_button.edc" + #include "widgets/radio_button.edc" + #include "widgets/entry.edc" + #include "widgets/scale.edc" + #include "widgets/scrollbar.edc" + #include "widgets/tree.edc" } |
From: <enl...@li...> - 2005-10-08 14:43:45
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default/icons Modified Files: close.png open.png save.png Log Message: * [Tree] Fix the row expanding and collapsing * [Tree] Add cells with an icon and a text * [Stock] Change the stock icons =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/icons/close.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvs1FSrM0 and /tmp/cvspiavz8 differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/icons/open.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvsNWqMp3 and /tmp/cvsQFHKjb differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/icons/save.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvsGR2g8l and /tmp/cvs9nhPbv differ |
From: <enl...@li...> - 2005-10-08 14:43:42
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/src/bin Modified Files: etk_tree_test.c Log Message: * [Tree] Fix the row expanding and collapsing * [Tree] Add cells with an icon and a text * [Stock] Change the stock icons =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_tree_test.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- etk_tree_test.c 7 Oct 2005 22:34:43 -0000 1.4 +++ etk_tree_test.c 8 Oct 2005 14:43:36 -0000 1.5 @@ -42,7 +42,7 @@ etk_table_attach_defaults(ETK_TABLE(table), tree, 0, 0, 1, 1); etk_tree_mode_set(ETK_TREE(tree), ETK_TREE_MODE_TREE); - col1 = etk_tree_col_new(ETK_TREE(tree), "Column 1", ETK_TREE_COL_TEXT); + col1 = etk_tree_col_new(ETK_TREE(tree), "Column 1", ETK_TREE_COL_ICON_TEXT); col2 = etk_tree_col_new(ETK_TREE(tree), "Column 2", ETK_TREE_COL_INT); col3 = etk_tree_col_new(ETK_TREE(tree), "Column 3", ETK_TREE_COL_IMAGE); etk_tree_build(ETK_TREE(tree)); @@ -50,9 +50,12 @@ etk_tree_freeze(ETK_TREE(tree)); for (i = 0; i < 1000; i++) { - row = etk_tree_append(ETK_TREE(tree), col1, "Row1", col2, 1, col3, PACKAGE_DATA_DIR "/images/1star.png", NULL); - row = etk_tree_append_to_row(row, col1, "Row2", col2, 2, col3, PACKAGE_DATA_DIR "/images/2stars.png", NULL); - etk_tree_append_to_row(row, col1, "Row3", col2, 3, col3, PACKAGE_DATA_DIR "/images/3stars.png", NULL); + row = etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR "/images/open.png", "Row1", + col2, 1, col3, PACKAGE_DATA_DIR "/images/1star.png", NULL); + row = etk_tree_append_to_row(row, col1, PACKAGE_DATA_DIR "/images/open.png", "Row2", + col2, 2, col3, PACKAGE_DATA_DIR "/images/2stars.png", NULL); + etk_tree_append_to_row(row, col1, PACKAGE_DATA_DIR "/images/open.png", "Row3", + col2, 3, col3, PACKAGE_DATA_DIR "/images/3stars.png", NULL); } etk_tree_thaw(ETK_TREE(tree)); |
From: <enl...@li...> - 2005-10-08 14:43:42
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/src/lib Modified Files: etk_tree.c etk_tree.h etk_types.h Log Message: * [Tree] Fix the row expanding and collapsing * [Tree] Add cells with an icon and a text * [Stock] Change the stock icons =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_tree.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_tree.c 7 Oct 2005 21:33:43 -0000 1.2 +++ etk_tree.c 8 Oct 2005 14:43:36 -0000 1.3 @@ -261,14 +261,18 @@ */ void etk_tree_row_expand(Etk_Tree_Row *row) { + Etk_Tree_Node *n; + float offset; + if (!row || row->node.expanded || !row->tree || (row->tree->mode != ETK_TREE_MODE_TREE)) return; + offset = row->tree->scroll_percent * row->tree->item_height * row->tree->root.num_visible_children; row->node.expanded = TRUE; - /* TODO: fixme */ - if (row->node.parent) - row->node.parent->num_visible_children -= row->node.num_visible_children; - printf("%p %d %d\n", row->node.parent, row->node.num_visible_children, row->tree->root.num_visible_children); + for (n = row->node.parent; n && n->expanded; n = n->parent) + n->num_visible_children += row->node.num_visible_children; + row->tree->scroll_percent = offset / (row->tree->item_height * row->tree->root.num_visible_children); + row->tree->scroll_percent = ETK_CLAMP(row->tree->scroll_percent, 0.0, 1.0); if (!row->tree->frozen) etk_widget_redraw_queue(ETK_WIDGET(row->tree)); @@ -280,14 +284,18 @@ */ void etk_tree_row_collapse(Etk_Tree_Row *row) { + Etk_Tree_Node *n; + float offset; + if (!row || !row->node.expanded || !row->tree || (row->tree->mode != ETK_TREE_MODE_TREE)) return; + offset = row->tree->scroll_percent * row->tree->item_height * row->tree->root.num_visible_children; row->node.expanded = FALSE; - /* TODO: fixme */ - if (row->node.parent) - row->node.parent->num_visible_children += row->node.num_visible_children; - printf("%p %d %d\n", row->node.parent, row->node.num_visible_children, row->tree->root.num_visible_children); + for (n = row->node.parent; n && n->expanded; n = n->parent) + n->num_visible_children -= row->node.num_visible_children; + row->tree->scroll_percent = offset / (row->tree->item_height * row->tree->root.num_visible_children); + row->tree->scroll_percent = ETK_CLAMP(row->tree->scroll_percent, 0.0, 1.0); if (!row->tree->frozen) etk_widget_redraw_queue(ETK_WIDGET(row->tree)); @@ -701,7 +709,7 @@ if (!tree || !node || !items_objects) return 0; - first_col_offset = xoffset + ((node->num_parent_children > 0) ? tree->expander_size + 4 : 8); + first_col_offset = xoffset + tree->expander_size + 4; i = 0; ecore_list_goto_first(node->child_rows); @@ -751,6 +759,7 @@ for (j = 0; j < tree->num_cols; j++) { Etk_Bool show_text = FALSE, show_image = FALSE; + int image_offset = 0; if (!tree->columns[j]) continue; @@ -783,6 +792,12 @@ evas_object_image_file_set(item_objects->objects[j].image_object, row->cells[j].image_filename_value, NULL); show_image = TRUE; break; + case ETK_TREE_COL_ICON_TEXT: + evas_object_image_file_set(item_objects->objects[j].image_object, row->cells[j].icon_text_value.icon_filename, NULL); + show_image = TRUE; + evas_object_text_text_set(item_objects->objects[j].text_object, row->cells[j].icon_text_value.text); + show_text = TRUE; + break; default: break; } @@ -797,6 +812,7 @@ iw = tree->image_height * ((float)iw / ih); ih = tree->image_height; } + image_offset = iw + 8; evas_object_move(item_objects->objects[j].image_object, x + ((j == 0) ? first_col_offset : tree->columns[j]->xoffset + 8), item_y + (tree->item_height - ih + 1) / 2); @@ -813,7 +829,7 @@ evas_object_geometry_get(item_objects->objects[j].text_object, NULL, NULL, NULL, &th); evas_object_move(item_objects->objects[j].text_object, - x + ((j == 0) ? first_col_offset : tree->columns[j]->xoffset + 8), + x + image_offset + ((j == 0) ? first_col_offset : tree->columns[j]->xoffset + 8), item_y + (tree->item_height - th + 1) / 2); evas_object_show(item_objects->objects[j].text_object); } @@ -883,23 +899,23 @@ new_cell->image_filename_value = NULL; break; } - case ETK_TREE_COL_TEXT_IMAGE: + case ETK_TREE_COL_ICON_TEXT: { + const char *icon; const char *text; - const char *image; + icon = va_arg(args, char *); text = va_arg(args, char *); - image = va_arg(args, char *); - if (text) - new_cell->text_image_value.text = strdup(text); + if (icon) + new_cell->icon_text_value.icon_filename = strdup(icon); else - new_cell->text_image_value.text = NULL; + new_cell->icon_text_value.icon_filename = NULL; - if (image) - new_cell->text_image_value.image_filename = strdup(image); + if (text) + new_cell->icon_text_value.text = strdup(text); else - new_cell->text_image_value.image_filename = NULL; + new_cell->icon_text_value.text = NULL; break; } @@ -929,9 +945,8 @@ for (n = new_row->node.parent; n; n = n->parent) { - if (n->expanded) - n->num_visible_children++; - else + n->num_visible_children++; + if (!n->expanded) break; } @@ -997,7 +1012,7 @@ evas_object_clip_set(new_item_objects->objects[i].image_object, tree->columns[i]->clip); etk_widget_member_object_add(ETK_WIDGET(tree), new_item_objects->objects[i].image_object); break; - case ETK_TREE_COL_TEXT_IMAGE: + case ETK_TREE_COL_ICON_TEXT: new_item_objects->objects[i].text_object = evas_object_text_add(evas); evas_object_text_font_set(new_item_objects->objects[i].text_object, "Vera", 10); evas_object_color_set(new_item_objects->objects[i].text_object, 0, 0, 0, 255); @@ -1087,9 +1102,8 @@ for (n = row->node.parent; n; n = n->parent) { - if (n->expanded) - n->num_visible_children--; - else + n->num_visible_children--; + if (!n->expanded) break; } if ((n = row->node.parent) && (n = n->parent)) @@ -1112,9 +1126,9 @@ case ETK_TREE_COL_IMAGE: free(cell->image_filename_value); break; - case ETK_TREE_COL_TEXT_IMAGE: - free(cell->text_image_value.text); - free(cell->text_image_value.image_filename); + case ETK_TREE_COL_ICON_TEXT: + free(cell->icon_text_value.icon_filename); + free(cell->icon_text_value.text); break; default: break; =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_tree.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_tree.h 7 Oct 2005 21:33:43 -0000 1.2 +++ etk_tree.h 8 Oct 2005 14:43:36 -0000 1.3 @@ -112,9 +112,9 @@ char *image_filename_value; struct { + char *icon_filename; char *text; - char *image_filename; - } text_image_value; + } icon_text_value; int int_value; double double_value; }; =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_types.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_types.h 7 Oct 2005 21:33:43 -0000 1.2 +++ etk_types.h 8 Oct 2005 14:43:36 -0000 1.3 @@ -153,7 +153,7 @@ { ETK_TREE_COL_TEXT, ETK_TREE_COL_IMAGE, - ETK_TREE_COL_TEXT_IMAGE, + ETK_TREE_COL_ICON_TEXT, ETK_TREE_COL_INT, ETK_TREE_COL_DOUBLE } Etk_Tree_Col_Type; |
From: <enl...@li...> - 2005-10-08 14:44:12
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/images Modified Files: close.png open.png save.png Log Message: * [Tree] Fix the row expanding and collapsing * [Tree] Add cells with an icon and a text * [Stock] Change the stock icons =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/images/close.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvsEjz49f and /tmp/cvswoVB3Q differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/images/open.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvsmS5QZj and /tmp/cvssaznXU differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/images/save.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvsRnlD5i and /tmp/cvsa7Yw6T differ |
From: <enl...@li...> - 2005-10-08 14:44:12
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk Modified Files: AUTHORS Log Message: * [Tree] Fix the row expanding and collapsing * [Tree] Add cells with an icon and a text * [Stock] Change the stock icons =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/AUTHORS,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- AUTHORS 1 Oct 2005 16:29:44 -0000 1.1 +++ AUTHORS 8 Oct 2005 14:43:36 -0000 1.2 @@ -1,5 +1,7 @@ -Lead developer: +* Lead developer: Simon TRENY (MoOm) <sim...@fr...> -Colorpicker, etk_test: +* Colorpicker, etk_test: Vincent TORRI (caro / doursse) <Vin...@ie...> + +* The images of the default theme have been made by Carsten Haitzler (The Rasterman) |
From: <enl...@li...> - 2005-10-08 14:44:12
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/stock_icons/default Modified Files: default.edc Log Message: * [Tree] Fix the row expanding and collapsing * [Tree] Add cells with an icon and a text * [Stock] Change the stock icons =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/stock_icons/default/default.edc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- default.edc 7 Oct 2005 22:07:07 -0000 1.1 +++ default.edc 8 Oct 2005 14:43:36 -0000 1.2 @@ -28,7 +28,7 @@ image: "save.png" COMP; } collections { - STOCK_ICON("OPEN", "open.png") - STOCK_ICON("CLOSE", "close.png") - STOCK_ICON("SAVE", "save.png") + STOCK_ICON("open", "open.png") + STOCK_ICON("close", "close.png") + STOCK_ICON("save", "save.png") } |
From: <enl...@li...> - 2005-10-08 14:44:16
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/stock_icons/default/icons Modified Files: close.png open.png save.png Log Message: * [Tree] Fix the row expanding and collapsing * [Tree] Add cells with an icon and a text * [Stock] Change the stock icons =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/stock_icons/default/icons/close.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvslt9Wwt and /tmp/cvs6AnpS4 differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/stock_icons/default/icons/open.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvskTCiJs and /tmp/cvsrUMX83 differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/stock_icons/default/icons/save.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvsjDNteu and /tmp/cvsQ3AGH5 differ |
From: <enl...@li...> - 2005-10-08 15:06:11
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/src/lib Modified Files: Etk.h Makefile.am etk_types.h Removed Files: etk_adjustment.c etk_adjustment.h etk_range.c etk_range.h Log Message: * Remove unused files =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Etk.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Etk.h 1 Oct 2005 16:29:45 -0000 1.1 +++ Etk.h 8 Oct 2005 15:06:04 -0000 1.2 @@ -30,8 +30,6 @@ #include "etk_check_button.h" #include "etk_radio_button.h" #include "etk_entry.h" -#include "etk_adjustment.h" -#include "etk_range.h" #include "etk_canvas.h" #include "etk_colorpicker.h" #include "etk_colorpicker_vertical.h" =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Makefile.am 1 Oct 2005 16:29:45 -0000 1.1 +++ Makefile.am 8 Oct 2005 15:06:04 -0000 1.2 @@ -22,7 +22,6 @@ etk_string.h etk_editable_text_object.h etk_label.h \ etk_button.h etk_toggle_button.h etk_check_button.h etk_radio_button.h \ etk_entry.h \ -etk_adjustment.h etk_range.h \ etk_canvas.h \ etk_colorpicker.h etk_colorpicker_vertical.h etk_colorpicker_square.h \ etk_tree.h @@ -39,7 +38,6 @@ etk_string.c etk_editable_text_object.c etk_label.c \ etk_button.c etk_toggle_button.c etk_check_button.c etk_radio_button.c \ etk_entry.c \ -etk_adjustment.c etk_range.c \ etk_canvas.c \ etk_colorpicker.c etk_colorpicker_vertical.c etk_colorpicker_square.c \ etk_tree.c =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_types.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- etk_types.h 8 Oct 2005 14:43:36 -0000 1.3 +++ etk_types.h 8 Oct 2005 15:06:04 -0000 1.4 @@ -65,8 +65,6 @@ typedef struct _Etk_Check_Button Etk_Check_Button; typedef struct _Etk_Radio_Button Etk_Radio_Button; typedef struct _Etk_Entry Etk_Entry; -typedef struct _Etk_Adjustment Etk_Adjustment; -typedef struct _Etk_Range Etk_Range; typedef struct _Etk_Canvas Etk_Canvas; typedef struct _Etk_Colorpicker Etk_Colorpicker; typedef struct _Etk_Colorpicker_Vertical Etk_Colorpicker_Vertical; |
From: <enl...@li...> - 2005-10-08 15:06:14
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default/icons Removed Files: close.png open.png save.png Log Message: * Remove unused files |
From: <enl...@li...> - 2005-10-13 03:51:26
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/src/lib Modified Files: etk_image.c Log Message: * Implement size_request for an edje etk_image =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_image.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_image.c 2 Oct 2005 15:40:28 -0000 1.2 +++ etk_image.c 2 Oct 2005 16:51:09 -0000 1.3 @@ -351,7 +351,12 @@ { if (image->use_edje) { - /* TODO: */ + Evas_Coord min_x, min_y, calc_x, calc_y; + + edje_object_size_min_get(image->image_object, &min_x, &min_y); + edje_object_size_min_calc(image->image_object, &calc_x, &calc_y); + size_requisition->w = ETK_MAX(min_x, calc_x); + size_requisition->h = ETK_MAX(min_y, calc_y); } else evas_object_image_size_get(image->image_object, &size_requisition->w, &size_requisition->h); |
From: <enl...@li...> - 2005-10-23 08:05:45
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/src/lib Modified Files: Etk.h Makefile.am etk_alignment.c etk_colorpicker.h etk_colorpicker_square.c etk_colorpicker_vertical.c etk_editable_text_object.c etk_editable_text_object.h etk_entry.c etk_entry.h etk_image.c etk_label.c etk_main.c etk_marshallers.c etk_marshallers.h etk_object.h etk_property.h etk_signal.h etk_toplevel_widget.c etk_toplevel_widget.h etk_tree.c etk_tree.h etk_types.h etk_utils.c etk_utils.h etk_widget.c etk_widget.h etk_window.c Added Files: etk_range.c etk_range.h etk_scale.c etk_scale.h etk_scrollbar.c etk_scrollbar.h Log Message: A lot of changes, most significant are: * [Tree] A tree can now have resizable column headers * [Tree] Fix the rendering of the first column of a tree in the LIST mode * [Scale] Implemented * [Scrollbar] Implemented * XCursor Support * Should fix the amd64 segv (I need a confirmation) * A lot of invisible things, bug fixes and mem leaks solved * The canvas is broken =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Etk.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Etk.h 8 Oct 2005 15:06:04 -0000 1.2 +++ Etk.h 23 Oct 2005 08:05:34 -0000 1.3 @@ -14,6 +14,7 @@ #include "etk_signal_callback.h" #include "etk_marshallers.h" #include "etk_property.h" +#include "etk_string.h" #include "etk_widget.h" #include "etk_bin.h" @@ -29,13 +30,15 @@ #include "etk_toggle_button.h" #include "etk_check_button.h" #include "etk_radio_button.h" +#include "etk_editable_text_object.h" #include "etk_entry.h" #include "etk_canvas.h" #include "etk_colorpicker.h" #include "etk_colorpicker_vertical.h" #include "etk_colorpicker_square.h" #include "etk_tree.h" -#include "etk_string.h" -#include "etk_editable_text_object.h" +#include "etk_range.h" +#include "etk_scale.h" +#include "etk_scrollbar.h" #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- Makefile.am 22 Oct 2005 10:43:21 -0000 1.5 +++ Makefile.am 23 Oct 2005 08:05:34 -0000 1.6 @@ -29,7 +29,8 @@ etk_entry.h \ etk_canvas.h \ etk_colorpicker.h etk_colorpicker_vertical.h etk_colorpicker_square.h \ -etk_tree.h +etk_tree.h \ +etk_range.h etk_scale.h etk_scrollbar.h libetk_la_SOURCES = \ etk_main.c etk_utils.c \ @@ -45,10 +46,11 @@ etk_entry.c \ etk_canvas.c \ etk_colorpicker.c etk_colorpicker_vertical.c etk_colorpicker_square.c \ -etk_tree.c +etk_tree.c \ +etk_range.c etk_scale.c etk_scrollbar.c -installed_headersdir = $(prefix)/include/etk -installed_headers_DATA = $(include_HEADERS) ++installed_headersdir = $(prefix)/include/etk ++installed_headers_DATA = $(include_HEADERS) libetk_la_LIBADD = @ecore_libs@ @evas_libs@ @edje_libs@ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_alignment.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_alignment.c 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_alignment.c 23 Oct 2005 08:05:34 -0000 1.2 @@ -218,8 +218,6 @@ if ((child = etk_bin_child_get(ETK_BIN(alignment)))) { etk_widget_size_request(child, &child_requisition); - /*printf("allocate %p: %d %d\n", widget, geometry.w, geometry.h); - printf("request %p: %d %d\n", widget, child_requisition.w, child_requisition.h); */ geometry.x += etk_container_border_width_get(container); geometry.y += etk_container_border_width_get(container); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_colorpicker.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_colorpicker.h 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_colorpicker.h 23 Oct 2005 08:05:34 -0000 1.2 @@ -17,6 +17,20 @@ /** @brief Check if the object is an Etk_Colorpicker */ #define ETK_IS_COLORPICKER(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_COLORPICKER_TYPE)) +/** + * @enum Etk_Color_Mode + * @brief The color modes used by the colorpicker + */ +enum _Etk_Color_Mode +{ + ETK_COLOR_MODE_H, + ETK_COLOR_MODE_S, + ETK_COLOR_MODE_V, + ETK_COLOR_MODE_R, + ETK_COLOR_MODE_G, + ETK_COLOR_MODE_B +}; + struct _Etk_Colorpicker { Etk_HBox hbox; =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_colorpicker_square.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_colorpicker_square.c 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_colorpicker_square.c 23 Oct 2005 08:05:34 -0000 1.2 @@ -409,12 +409,15 @@ cps->map = evas_object_image_add(evas); evas_object_image_alpha_set(cps->map, 0); + evas_object_show(cps->map); etk_widget_member_object_add(widget, cps->map); cps->hcursor = evas_object_image_add(evas); evas_object_image_alpha_set(cps->hcursor, 0); + evas_object_show(cps->hcursor); etk_widget_member_object_add(widget, cps->hcursor); cps->vcursor = evas_object_image_add(evas); evas_object_image_alpha_set(cps->vcursor, 0); + evas_object_show(cps->vcursor); etk_widget_member_object_add(widget, cps->vcursor); _etk_colorpicker_square_resize_map_cursor(cps); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_colorpicker_vertical.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_colorpicker_vertical.c 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_colorpicker_vertical.c 23 Oct 2005 08:05:34 -0000 1.2 @@ -362,8 +362,10 @@ cpv = ETK_COLORPICKER_VERTICAL(widget); cpv->map = evas_object_image_add(evas); + evas_object_show(cpv->map); etk_widget_member_object_add(widget, cpv->map); cpv->cursor = evas_object_image_add(evas); + evas_object_show(cpv->cursor); etk_widget_member_object_add(widget, cpv->cursor); _etk_colorpicker_vertical_resize_map_cursor(cpv); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_editable_text_object.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_editable_text_object.c 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_editable_text_object.c 23 Oct 2005 08:05:34 -0000 1.2 @@ -94,16 +94,17 @@ * @brief Inserts text at the cursor position of the object * @param object an editable text object * @param text the text to insert + * @return Returns TRUE if the text has been changed */ -void etk_editable_text_object_insert(Evas_Object *object, const char *text) +Etk_Bool etk_editable_text_object_insert(Evas_Object *object, const char *text) { Etk_Editable_Text_Smart_Data *editable_text_sd; Evas_Textblock_Cursor *cursor; if (!object || !(editable_text_sd = evas_object_smart_data_get(object))) - return; + return FALSE; if (!text || (strlen(text) <= 1 && *text < 0x20)) - return; + return FALSE; cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); @@ -113,6 +114,8 @@ evas_textblock2_cursor_text_prepend(cursor, text); _etk_editable_text_size_update(object); _etk_editable_text_cursor_position_update(object); + + return TRUE; } /** @@ -135,35 +138,43 @@ /** * @brief Deletes the char placed before the cursor * @param object an editable text object + * @return Returns TRUE if the text has been changed */ -void etk_editable_text_object_delete_char_before(Evas_Object *object) +Etk_Bool etk_editable_text_object_delete_char_before(Evas_Object *object) { Etk_Editable_Text_Smart_Data *editable_text_sd; Evas_Textblock_Cursor *cursor; + Etk_Bool text_changed = FALSE; if (!object || !(editable_text_sd = evas_object_smart_data_get(object)) || _etk_editable_text_is_empty(object)) - return; + return FALSE; cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); if (editable_text_sd->cursor_at_the_end || evas_textblock2_cursor_char_prev(cursor)) + { evas_textblock2_cursor_char_delete(cursor); + text_changed = TRUE; + } _etk_editable_text_size_update(object); _etk_editable_text_cursor_position_update(object); + return text_changed; } /** * @brief Deletes the char placed after the cursor * @param object an editable text object + * @return Returns TRUE if the text has been changed */ -void etk_editable_text_object_delete_char_after(Evas_Object *object) +Etk_Bool etk_editable_text_object_delete_char_after(Evas_Object *object) { Etk_Editable_Text_Smart_Data *editable_text_sd; Evas_Textblock_Cursor *cursor; + Etk_Bool text_changed = FALSE; if (!object || !(editable_text_sd = evas_object_smart_data_get(object)) || _etk_editable_text_is_empty(object)) - return; + return FALSE; cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); @@ -174,10 +185,12 @@ else evas_textblock2_cursor_char_prev(cursor); evas_textblock2_cursor_char_delete(cursor); + text_changed = TRUE; } _etk_editable_text_size_update(object); _etk_editable_text_cursor_position_update(object); + return text_changed; } /** =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_editable_text_object.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_editable_text_object.h 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_editable_text_object.h 23 Oct 2005 08:05:34 -0000 1.2 @@ -3,15 +3,16 @@ #define _ETK_EDITABLE_TEXT_OBJECT_H_ #include <Evas.h> +#include "etk_types.h" Evas_Object *etk_editable_text_object_add(Evas *evas); void etk_editable_text_object_text_set(Evas_Object *object, const char *text); -void etk_editable_text_object_insert(Evas_Object *object, const char *text); +Etk_Bool etk_editable_text_object_insert(Evas_Object *object, const char *text); const char *etk_editable_text_object_text_get(Evas_Object *object); -void etk_editable_text_object_delete_char_before(Evas_Object *object); -void etk_editable_text_object_delete_char_after(Evas_Object *object); +Etk_Bool etk_editable_text_object_delete_char_before(Evas_Object *object); +Etk_Bool etk_editable_text_object_delete_char_after(Evas_Object *object); void etk_editable_text_object_cursor_move_at_start(Evas_Object *object); void etk_editable_text_object_cursor_move_at_end(Evas_Object *object); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_entry.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_entry.c 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_entry.c 23 Oct 2005 08:05:34 -0000 1.2 @@ -5,20 +5,31 @@ #include "etk_signal.h" #include "etk_signal_callback.h" #include "etk_editable_text_object.h" +#include "etk_toplevel_widget.h" /** * @addtogroup Etk_Entry * @{ */ +enum _Etk_Entry_Signal_Id +{ + ETK_ENTRY_TEXT_CHANGED_SIGNAL, + ETK_ENTRY_NUM_SIGNALS +}; + static void _etk_entry_constructor(Etk_Entry *entry); static void _etk_entry_realize_cb(Etk_Object *object, void *data); static void _etk_entry_unrealize_cb(Etk_Object *object, void *data); static void _etk_entry_key_down_cb(Etk_Object *object, void *event, void *data); static void _etk_entry_mouse_down_cb(Etk_Object *object, Etk_Event_Mouse_Up_Down *event, void *data); +static void _etk_entry_mouse_in_cb(Etk_Object *object, Etk_Event_Mouse_Up_Down *event, void *data); +static void _etk_entry_mouse_out_cb(Etk_Object *object, Etk_Event_Mouse_Up_Down *event, void *data); static void _etk_entry_focus_cb(Etk_Object *object, void *data); static void _etk_entry_unfocus_cb(Etk_Object *object, void *data); +static Etk_Signal *_etk_entry_signals[ETK_ENTRY_NUM_SIGNALS]; + /************************** * * Implementation @@ -36,6 +47,8 @@ if (!entry_type) { entry_type = etk_type_new("Etk_Entry", ETK_WIDGET_TYPE, sizeof(Etk_Entry), ETK_CONSTRUCTOR(_etk_entry_constructor), NULL, NULL); + + _etk_entry_signals[ETK_ENTRY_TEXT_CHANGED_SIGNAL] = etk_signal_new("text_changed", entry_type, -1, etk_marshaller_VOID__VOID, NULL, NULL); } return entry_type; @@ -81,6 +94,8 @@ etk_signal_connect("unrealize", ETK_OBJECT(entry), ETK_CALLBACK(_etk_entry_unrealize_cb), NULL); etk_signal_connect("key_down", ETK_OBJECT(entry), ETK_CALLBACK(_etk_entry_key_down_cb), NULL); etk_signal_connect("mouse_down", ETK_OBJECT(entry), ETK_CALLBACK(_etk_entry_mouse_down_cb), NULL); + etk_signal_connect("mouse_in", ETK_OBJECT(entry), ETK_CALLBACK(_etk_entry_mouse_in_cb), NULL); + etk_signal_connect("mouse_out", ETK_OBJECT(entry), ETK_CALLBACK(_etk_entry_mouse_out_cb), NULL); etk_signal_connect("focus", ETK_OBJECT(entry), ETK_CALLBACK(_etk_entry_focus_cb), NULL); etk_signal_connect("unfocus", ETK_OBJECT(entry), ETK_CALLBACK(_etk_entry_unfocus_cb), NULL); } @@ -103,6 +118,7 @@ entry = ETK_ENTRY(entry_widget); entry->editable_object = etk_editable_text_object_add(evas); + evas_object_show(entry->editable_object); etk_widget_theme_object_swallow(entry_widget, "text_area", entry->editable_object); etk_widget_member_object_add(entry_widget, entry->editable_object); } @@ -123,15 +139,15 @@ { Etk_Event_Key_Up_Down *key_event = event; Etk_Entry *entry; + Etk_Bool text_changed = FALSE; if (!(entry = ETK_ENTRY(object)) || !entry->editable_object) return; - /* printf("%s\n", key_event->key); */ if (strcmp(key_event->key, "BackSpace") == 0) - etk_editable_text_object_delete_char_before(entry->editable_object); + text_changed = etk_editable_text_object_delete_char_before(entry->editable_object); else if (strcmp(key_event->key, "Delete") == 0) - etk_editable_text_object_delete_char_after(entry->editable_object); + text_changed = etk_editable_text_object_delete_char_after(entry->editable_object); else if (strcmp(key_event->key, "Left") == 0) etk_editable_text_object_cursor_move_left(entry->editable_object); else if (strcmp(key_event->key, "Right") == 0) @@ -141,9 +157,11 @@ else if (strcmp(key_event->key, "End") == 0) etk_editable_text_object_cursor_move_at_end(entry->editable_object); else - etk_editable_text_object_insert(entry->editable_object, key_event->string); -} + text_changed = etk_editable_text_object_insert(entry->editable_object, key_event->string); + if (text_changed) + etk_signal_emit(_etk_entry_signals[ETK_ENTRY_TEXT_CHANGED_SIGNAL], object, NULL); +} /* Called when the user presses the entry with the mouse */ /* TODO: move the cursor under the mouse pointer */ @@ -157,6 +175,28 @@ etk_widget_focus(ETK_WIDGET(entry)); } +/* Called when the mouse enters the entry */ +static void _etk_entry_mouse_in_cb(Etk_Object *object, Etk_Event_Mouse_Up_Down *event, void *data) +{ + Etk_Widget *entry_widget; + + if (!(entry_widget = ETK_WIDGET(object))) + return; + + etk_toplevel_widget_pointer_push(entry_widget->toplevel_parent, ETK_POINTER_TEXT_EDIT); +} + +/* Called when the mouse leaves the entry */ +static void _etk_entry_mouse_out_cb(Etk_Object *object, Etk_Event_Mouse_Up_Down *event, void *data) +{ + Etk_Widget *entry_widget; + + if (!(entry_widget = ETK_WIDGET(object))) + return; + + etk_toplevel_widget_pointer_pop(entry_widget->toplevel_parent, ETK_POINTER_TEXT_EDIT); +} + /* Called when the entry is focused */ static void _etk_entry_focus_cb(Etk_Object *object, void *data) { =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_entry.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_entry.h 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_entry.h 23 Oct 2005 08:05:34 -0000 1.2 @@ -11,7 +11,7 @@ * @{ */ -/** @brief Gets the type of a entry */ +/** @brief Gets the type of an entry */ #define ETK_ENTRY_TYPE (etk_entry_type_get()) /** @brief Casts the object to an Etk_Entry */ #define ETK_ENTRY(obj) (ETK_OBJECT_CAST((obj), ETK_ENTRY_TYPE, Etk_Entry)) =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_image.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- etk_image.c 2 Oct 2005 16:51:09 -0000 1.3 +++ etk_image.c 23 Oct 2005 08:05:34 -0000 1.4 @@ -464,7 +464,10 @@ image->image_object = NULL; } else + { + evas_object_show(image->image_object); etk_widget_member_object_add(widget, image->image_object); + } } } else if (image->edje_filename && image->edje_group) =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_label.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_label.c 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_label.c 23 Oct 2005 08:05:34 -0000 1.2 @@ -309,12 +309,14 @@ label->text_object = evas_object_textblock2_add(evas); evas_object_textblock2_style_set(label->text_object, _etk_label_style); + evas_object_show(label->text_object); etk_widget_member_object_add(ETK_WIDGET(label), label->text_object); _etk_label_style_use++; label->clip = evas_object_rectangle_add(evas); evas_object_color_set(label->clip, 255, 255, 255, 128); evas_object_clip_set(label->text_object, label->clip); + evas_object_show(label->clip); etk_widget_member_object_add(ETK_WIDGET(label), label->clip); etk_label_set(label, label->text); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_main.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- etk_main.c 16 Oct 2005 10:44:01 -0000 1.3 +++ etk_main.c 23 Oct 2005 08:05:34 -0000 1.4 @@ -6,13 +6,13 @@ #include <Ecore_Evas.h> #include <Evas.h> #include <Edje.h> -#include "config.h" #include "etk_type.h" #include "etk_signal.h" #include "etk_object.h" #include "etk_toplevel_widget.h" #include "etk_widget.h" #include "etk_utils.h" +#include "../../config.h" /** * @addtogroup Etk_Main @@ -78,13 +78,12 @@ } _etk_main_toplevel_widgets = ecore_list_new(); - _etk_main_initialized = TRUE; - /* Gettext */ - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + _etk_main_initialized = TRUE; return TRUE; } @@ -129,6 +128,8 @@ _etk_main_iterate_job = NULL; } +int iteration = 0; + /** @brief Runs an iteration of the main loop */ void etk_main_iterate() { @@ -138,6 +139,7 @@ if (!_etk_main_initialized) return; + //printf("Iteration %d\n", iteration++); ecore_list_goto_first(_etk_main_toplevel_widgets); while ((toplevel = ecore_list_next(_etk_main_toplevel_widgets))) { =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_marshallers.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_marshallers.c 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_marshallers.c 23 Oct 2005 08:05:34 -0000 1.2 @@ -1,6 +1,7 @@ /** @file etk_marshallers.c */ #include "etk_marshallers.h" +/* etk_marshaller_VOID__VOID */ void etk_marshaller_VOID__VOID(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments) { typedef void (*Etk_Signal_Callback_Function_VOID__VOID)(Etk_Object *object, void *data); @@ -14,6 +15,25 @@ callback_VOID__VOID(object, data); } +/* etk_marshaller_VOID__DOUBLE */ +void etk_marshaller_VOID__DOUBLE(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments) +{ + typedef void (*Etk_Signal_Callback_Function_VOID__DOUBLE)(Etk_Object *object, double arg1, void *data); + + double arg1; + + Etk_Signal_Callback_Function_VOID__DOUBLE callback_VOID__DOUBLE; + + if (!callback || !object) + return; + + arg1 = va_arg(arguments, double); + + callback_VOID__DOUBLE = (Etk_Signal_Callback_Function_VOID__DOUBLE)callback; + callback_VOID__DOUBLE(object, arg1, data); +} + +/* etk_marshaller_VOID__POINTER */ void etk_marshaller_VOID__POINTER(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments) { typedef void (*Etk_Signal_Callback_Function_VOID__POINTER)(Etk_Object *object, void *arg1, void *data); @@ -31,6 +51,7 @@ callback_VOID__POINTER(object, arg1, data); } +/* etk_marshaller_BOOL__VOID */ void etk_marshaller_BOOL__VOID(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments) { typedef Etk_Bool (*Etk_Signal_Callback_Function_BOOL__VOID)(Etk_Object *object, void *data); @@ -49,6 +70,29 @@ *((Etk_Bool *)return_value) = result; } +/* etk_marshaller_BOOL__DOUBLE */ +void etk_marshaller_BOOL__DOUBLE(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments) +{ + typedef Etk_Bool (*Etk_Signal_Callback_Function_BOOL__DOUBLE)(Etk_Object *object, double arg1, void *data); + + double arg1; + Etk_Bool result; + + Etk_Signal_Callback_Function_BOOL__DOUBLE callback_BOOL__DOUBLE; + + if (!callback || !object) + return; + + arg1 = va_arg(arguments, double); + + callback_BOOL__DOUBLE = (Etk_Signal_Callback_Function_BOOL__DOUBLE)callback; + result = callback_BOOL__DOUBLE(object, arg1, data); + + if (return_value) + *((Etk_Bool *)return_value) = result; +} + +/* etk_marshaller_BOOL__POINTER_POINTER */ void etk_marshaller_BOOL__POINTER_POINTER(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments) { typedef Etk_Bool (*Etk_Signal_Callback_Function_BOOL__POINTER_POINTER)(Etk_Object *object, void *arg1, void *arg2, void *data); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_marshallers.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_marshallers.h 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_marshallers.h 23 Oct 2005 08:05:34 -0000 1.2 @@ -11,8 +11,10 @@ /* TODO: marshaller generator */ void etk_marshaller_VOID__VOID(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments); +void etk_marshaller_VOID__DOUBLE(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments); void etk_marshaller_VOID__POINTER(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments); void etk_marshaller_BOOL__VOID(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments); +void etk_marshaller_BOOL__DOUBLE(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments); void etk_marshaller_BOOL__POINTER_POINTER(Etk_Signal_Callback_Function callback, Etk_Object *object, void *data, void *return_value, va_list arguments); #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_object.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_object.h 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_object.h 23 Oct 2005 08:05:34 -0000 1.2 @@ -13,9 +13,9 @@ */ #ifndef ETK_DISABLE_CAST_CHECKS -# define ETK_OBJECT_CAST(obj, etk_type, c_type) ((c_type *)etk_object_check_cast((Etk_Object *)(obj), (etk_type))) + #define ETK_OBJECT_CAST(obj, etk_type, c_type) ((c_type *)etk_object_check_cast((Etk_Object *)(obj), (etk_type))) #else -# define ETK_OBJECT_CAST(obj, etk_type, c_type) ((c_type *)(obj)) + #define ETK_OBJECT_CAST(obj, etk_type, c_type) ((c_type *)(obj)) #endif #define ETK_OBJECT_CHECK_TYPE(obj, etk_type) (etk_type_inherits_from(((Etk_Object *)(obj))->type, (etk_type))) =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_property.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_property.h 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_property.h 23 Oct 2005 08:05:34 -0000 1.2 @@ -11,6 +11,36 @@ */ /** + * @enum Etk_Property_Type + * @brief The type of a property + */ +enum _Etk_Property_Type +{ + /* Used when the property is not initialized to a value */ + ETK_PROPERTY_NONE, + ETK_PROPERTY_INT, + ETK_PROPERTY_BOOL, + ETK_PROPERTY_CHAR, + ETK_PROPERTY_FLOAT, + ETK_PROPERTY_DOUBLE, + ETK_PROPERTY_SHORT, + ETK_PROPERTY_LONG, + ETK_PROPERTY_POINTER, + ETK_PROPERTY_STRING +}; + +/** + * @enum Etk_Property_Flags + * @brief Describes if the property is readable, writable or both + */ +enum _Etk_Property_Flags +{ + ETK_PROPERTY_READABLE = 1 << 0, + ETK_PROPERTY_WRITABLE = 1 << 1, + ETK_PROPERTY_READABLE_WRITABLE = ETK_PROPERTY_READABLE | ETK_PROPERTY_WRITABLE +}; + +/** * @struct Etk_Property * @brief An Etk_Property is a name associated to a type. The property have a default value, and can be readable, writable or both */ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_signal.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_signal.h 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_signal.h 23 Oct 2005 08:05:35 -0000 1.2 @@ -12,7 +12,7 @@ */ /** @brief Gets the offset of a member of a struct (mainly used for etk_signal_new) */ -#define ETK_MEMBER_OFFSET(type, member) ((int)(&((type *)0)->member)) +#define ETK_MEMBER_OFFSET(type, member) ((long)(&((type *)0)->member)) /** * @struct Etk_Signal =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_toplevel_widget.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_toplevel_widget.c 7 Oct 2005 21:33:43 -0000 1.2 +++ etk_toplevel_widget.c 23 Oct 2005 08:05:35 -0000 1.3 @@ -144,6 +144,62 @@ return _etk_toplevel_widget_prev_to_focus_get(ETK_WIDGET(toplevel_widget), NULL); } +/* TODO: doc */ +void etk_toplevel_widget_pointer_push(Etk_Toplevel_Widget *toplevel_widget, Etk_Pointer_Type pointer_type) +{ + Etk_Pointer_Type *prev_pointer_type; + Etk_Pointer_Type *new_pointer_type; + + if (!toplevel_widget) + return; + + new_pointer_type = malloc(sizeof(Etk_Pointer_Type)); + *new_pointer_type = pointer_type; + prev_pointer_type = ecore_dlist_goto_last(toplevel_widget->pointer_stack); + ecore_dlist_append(toplevel_widget->pointer_stack, new_pointer_type); + + if (toplevel_widget->pointer_set && (!prev_pointer_type || (*prev_pointer_type != pointer_type))) + toplevel_widget->pointer_set(toplevel_widget, pointer_type); +} + +/* TODO: doc */ +void etk_toplevel_widget_pointer_pop(Etk_Toplevel_Widget *toplevel_widget, Etk_Pointer_Type pointer_type) +{ + Etk_Pointer_Type *current_pointer; + Etk_Pointer_Type *prev_pointer_type; + Etk_Pointer_Type *p; + + if (!toplevel_widget || !(prev_pointer_type = ecore_dlist_goto_last(toplevel_widget->pointer_stack))) + return; + + if (pointer_type < 0) + ecore_dlist_remove_destroy(toplevel_widget->pointer_stack); + else + { + while ((p = ecore_dlist_current(toplevel_widget->pointer_stack))) + { + if (*p == pointer_type) + { + + ecore_dlist_remove_destroy(toplevel_widget->pointer_stack); + break; + } + ecore_dlist_previous(toplevel_widget->pointer_stack); + } + } + + if (toplevel_widget->pointer_set) + { + if ((current_pointer = ecore_dlist_goto_last(toplevel_widget->pointer_stack))) + { + if (*current_pointer != *prev_pointer_type) + toplevel_widget->pointer_set(toplevel_widget, *current_pointer); + } + else + toplevel_widget->pointer_set(toplevel_widget, ETK_POINTER_DEFAULT); + } +} + /************************** * * Etk specific functions @@ -160,6 +216,9 @@ toplevel_widget->width = 0; toplevel_widget->height = 0; toplevel_widget->focused_widget = NULL; + toplevel_widget->pointer_stack = ecore_dlist_new(); + ecore_dlist_set_free_cb(toplevel_widget->pointer_stack, free); + toplevel_widget->pointer_set = NULL; ETK_WIDGET(toplevel_widget)->toplevel_parent = toplevel_widget; etk_signal_connect_after("realize", ETK_OBJECT(toplevel_widget), ETK_CALLBACK(_etk_toplevel_widget_realize_cb), NULL); @@ -173,6 +232,7 @@ if (!toplevel_widget) return; + ecore_dlist_destroy(toplevel_widget->pointer_stack); etk_main_toplevel_widget_remove(toplevel_widget); } =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_toplevel_widget.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_toplevel_widget.h 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_toplevel_widget.h 23 Oct 2005 08:05:35 -0000 1.2 @@ -3,6 +3,7 @@ #define _ETK_TOPLEVEL_WIDGET_H_ #include <Evas.h> +#include <Ecore_Data.h> #include "etk_bin.h" #include "etk_types.h" @@ -19,6 +20,28 @@ #define ETK_IS_TOPLEVEL_WIDGET(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_TOPLEVEL_WIDGET_TYPE)) /** + * @enum Etk_Pointer_Type + * @brief The different types of mouse pointer + */ +enum _Etk_Pointer_Type +{ + ETK_POINTER_DEFAULT, + ETK_POINTER_MOVE, + ETK_POINTER_H_DOUBLE_ARROW, + ETK_POINTER_V_DOUBLE_ARROW, + ETK_POINTER_RESIZE, + ETK_POINTER_RESIZE_TL, + ETK_POINTER_RESIZE_T, + ETK_POINTER_RESIZE_TR, + ETK_POINTER_RESIZE_R, + ETK_POINTER_RESIZE_BR, + ETK_POINTER_RESIZE_B, + ETK_POINTER_RESIZE_BL, + ETK_POINTER_RESIZE_L, + ETK_POINTER_TEXT_EDIT +}; + +/** * @struct Etk_Toplevel_Widget * @brief A toplevel widget is a widget that can't have a parent widget */ @@ -33,6 +56,9 @@ int height; Etk_Widget *focused_widget; + + Ecore_DList *pointer_stack; + void (*pointer_set)(Etk_Toplevel_Widget *toplevel_widget, Etk_Pointer_Type pointer_type); }; Etk_Type *etk_toplevel_widget_type_get(); @@ -44,6 +70,9 @@ Etk_Widget *etk_toplevel_widget_focused_widget_next_get(Etk_Toplevel_Widget *toplevel_widget); Etk_Widget *etk_toplevel_widget_focused_widget_prev_get(Etk_Toplevel_Widget *toplevel_widget); +void etk_toplevel_widget_pointer_push(Etk_Toplevel_Widget *toplevel_widget, Etk_Pointer_Type pointer_type); +void etk_toplevel_widget_pointer_pop(Etk_Toplevel_Widget *toplevel_widget, Etk_Pointer_Type pointer_type); + /** @} */ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_tree.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- etk_tree.c 8 Oct 2005 14:43:36 -0000 1.3 +++ etk_tree.c 23 Oct 2005 08:05:35 -0000 1.4 @@ -6,6 +6,8 @@ #include <math.h> #include <Evas.h> #include <Edje.h> +#include "etk_button.h" +#include "etk_toplevel_widget.h" #include "etk_signal.h" #include "etk_signal_callback.h" #include "etk_utils.h" @@ -15,6 +17,18 @@ * @{ */ +#define ETK_TREE_GRID_TYPE (_etk_grid_type_get()) +#define ETK_TREE_GRID(obj) (ETK_OBJECT_CAST((obj), ETK_TREE_GRID_TYPE, Etk_grid)) +#define ETK_IS_TREE_GRID(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_TREE_GRID_TYPE)) + +typedef struct _Etk_grid +{ + /* Inherit form Etk_Widget */ + Etk_Widget widget; + + Etk_Tree *tree; +} Etk_grid; + typedef struct _Etk_Tree_Item_Object { Evas_Object *text_object; @@ -31,18 +45,29 @@ enum _Etk_Tree_Property_Id { ETK_TREE_MODE_PROPERTY, - ETK_TREE_MULTIPLE_SELECT_PROPERTY + ETK_TREE_MULTIPLE_SELECT_PROPERTY, + ETK_TREE_HEADERS_VISIBLE_PROPERTY }; +static Etk_Type *_etk_grid_type_get(); +static void _etk_grid_constructor(Etk_grid *grid); +static void _etk_grid_move_resize(Etk_Widget *widget, int x, int y, int w, int h); +static void _etk_grid_realize_cb(Etk_Object *object, void *data); +static void _etk_grid_mouse_wheel_cb(Etk_Object *object, void *event_info, void *data); + static void _etk_tree_constructor(Etk_Tree *tree); static void _etk_tree_destructor(Etk_Tree *tree); static void _etk_tree_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value); static void _etk_tree_property_get(Etk_Object *object, int property_id, Etk_Property_Value *value); -static void _etk_tree_move_resize(Etk_Widget *widget, int x, int y, int w, int h); -static void _etk_tree_realize_cb(Etk_Object *object, void *data); -static void _etk_tree_mouse_wheel_cb(Etk_Object *object, void *event_info, void *data); +static void _etk_tree_size_allocate(Etk_Widget *widget, Etk_Geometry geometry); + static void _etk_tree_expander_clicked_cb(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _etk_tree_row_pressed_cb(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void _etk_tree_header_mouse_down_cb(Etk_Object *object, void *event, void *data); +static void _etk_tree_header_mouse_up_cb(Etk_Object *object, void *event, void *data); +static void _etk_tree_header_mouse_move_cb(Etk_Object *object, void *event, void *data); +static void _etk_tree_header_mouse_in_cb(Etk_Object *object, void *event, void *data); +static void _etk_tree_header_mouse_out_cb(Etk_Object *object, void *event, void *data); static void _etk_tree_update(Etk_Tree *tree); static int _etk_tree_rows_draw(Etk_Tree *tree, Etk_Tree_Node *node, Ecore_List *items_objects, @@ -53,6 +78,7 @@ static void _etk_tree_row_free(Etk_Tree_Row *row); static void _etk_tree_cell_clear(Etk_Tree_Cell *cell, Etk_Tree_Col_Type cell_type); static void _etk_tree_col_realize(Etk_Tree *tree, int col_nth); +static Etk_Tree_Col *etk_tree_col_to_resize_get(Etk_Tree_Col *col, int x); static void _etk_tree_node_unselect_all(Etk_Tree_Node *node); static void _etk_tree_node_select(Etk_Tree *tree, Etk_Tree_Node *node, Evas_Modifier *modifiers); @@ -73,10 +99,11 @@ if (!tree_type) { - tree_type = etk_type_new("Etk_Tree", ETK_WIDGET_TYPE, sizeof(Etk_Tree), ETK_CONSTRUCTOR(_etk_tree_constructor), ETK_DESTRUCTOR(_etk_tree_destructor), NULL); + tree_type = etk_type_new("Etk_Tree", ETK_CONTAINER_TYPE, sizeof(Etk_Tree), ETK_CONSTRUCTOR(_etk_tree_constructor), ETK_DESTRUCTOR(_etk_tree_destructor), NULL); etk_type_property_add(tree_type, "mode", ETK_TREE_MODE_PROPERTY, ETK_PROPERTY_INT, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_int(ETK_TREE_MODE_LIST)); - etk_type_property_add(tree_type, "multiple_select", ETK_TREE_MODE_PROPERTY, ETK_PROPERTY_BOOL, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_bool(TRUE)); + etk_type_property_add(tree_type, "multiple_select", ETK_TREE_MULTIPLE_SELECT_PROPERTY, ETK_PROPERTY_BOOL, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_bool(TRUE)); + etk_type_property_add(tree_type, "headers_visible", ETK_TREE_HEADERS_VISIBLE_PROPERTY, ETK_PROPERTY_BOOL, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_bool(TRUE)); tree_type->property_set = _etk_tree_property_set; tree_type->property_get = _etk_tree_property_get; @@ -91,7 +118,7 @@ */ Etk_Widget *etk_tree_new() { - return etk_widget_new(ETK_TREE_TYPE, "theme_group", "tree", "focusable", TRUE, NULL); + return etk_widget_new(ETK_TREE_TYPE, NULL); } /** @@ -99,11 +126,15 @@ * @param tree a tree * @param title the tile of the column * @param type the type of the objects in the cells of the column + * @param min_width the minimum width of the column + * @param width the width of the column + * @param resizable TRUE whether the column should be resizable * @return Returns the new column */ -Etk_Tree_Col *etk_tree_col_new(Etk_Tree *tree, const char *title, Etk_Tree_Col_Type type) +Etk_Tree_Col *etk_tree_col_new(Etk_Tree *tree, const char *title, Etk_Tree_Col_Type type, int min_width, int width, Etk_Bool resizable) { Etk_Tree_Col *new_col; + Etk_Widget *new_header; if (!tree) return NULL; @@ -120,11 +151,23 @@ new_col->title = NULL; new_col->type = type; - /* TODO: */ - new_col->xoffset = new_col->id * 100; - new_col->width = 100; + new_col->min_width = ETK_MAX(0, min_width); + new_col->width = ETK_MAX(new_col->min_width, width); new_col->place = new_col->id; new_col->visible = TRUE; + new_col->resizable = resizable; + + /* Create the header widget */ + new_header = etk_widget_new(ETK_BUTTON_TYPE, "theme_group", "tree_header", "label", title, "xalign", 0.0, NULL); + etk_signal_connect("mouse_down", ETK_OBJECT(new_header), ETK_CALLBACK(_etk_tree_header_mouse_down_cb), new_col); + etk_signal_connect("mouse_up", ETK_OBJECT(new_header), ETK_CALLBACK(_etk_tree_header_mouse_up_cb), new_col); + etk_signal_connect("mouse_move", ETK_OBJECT(new_header), ETK_CALLBACK(_etk_tree_header_mouse_move_cb), new_col); + etk_signal_connect("mouse_in", ETK_OBJECT(new_header), ETK_CALLBACK(_etk_tree_header_mouse_in_cb), new_col); + etk_signal_connect("mouse_out", ETK_OBJECT(new_header), ETK_CALLBACK(_etk_tree_header_mouse_out_cb), new_col); + etk_widget_parent_set(new_header, ETK_CONTAINER(tree)); + ecore_dlist_append(ETK_CONTAINER(tree)->children, new_header); + etk_widget_show(new_header); + new_col->header = new_header; tree->num_cols++; _etk_tree_col_realize(tree, tree->num_cols - 1); @@ -133,6 +176,33 @@ } /** + * @brief Sets whether the column headers should be displayed + * @param tree a tree + * @param headers_visible TRUE if the column headers should be displayed + */ +void etk_tree_headers_visible_set(Etk_Tree *tree, Etk_Bool headers_visible) +{ + if (!tree || (tree->headers_visible == headers_visible)) + return; + + tree->headers_visible = headers_visible; + etk_object_notify(ETK_OBJECT(tree), "headers_visible"); + etk_widget_resize_queue(ETK_WIDGET(tree)); +} + +/** + * @brief Gets the visibility of the column headers + * @param tree a tree + * @return Returns TRUE whether the column headers are visible + */ +Etk_Bool etk_tree_headers_visible_get(Etk_Tree *tree) +{ + if (!tree) + return FALSE; + return tree->headers_visible; +} + +/** * @brief Sets the mode used by the tree. The tree has to be not built * @param tree a tree * @param mode the mode which will be used by the tree: ETK_TREE_MODE_LIST (rows can not have children) or ETK_TREE_MODE_TREE (rows can have children) @@ -167,7 +237,6 @@ { if (!tree) return; - tree->built = TRUE; } @@ -191,7 +260,6 @@ { if (!tree || !tree->frozen) return; - tree->frozen = FALSE; etk_widget_redraw_queue(ETK_WIDGET(tree)); } @@ -251,6 +319,7 @@ if (!tree) return; + /* TODO */ _etk_tree_node_unselect_all(&tree->root); etk_widget_redraw_queue(ETK_WIDGET(tree)); } @@ -267,12 +336,12 @@ if (!row || row->node.expanded || !row->tree || (row->tree->mode != ETK_TREE_MODE_TREE)) return; - offset = row->tree->scroll_percent * row->tree->item_height * row->tree->root.num_visible_children; + offset = row->tree->xscroll_percent * row->tree->item_height * row->tree->root.num_visible_children; row->node.expanded = TRUE; for (n = row->node.parent; n && n->expanded; n = n->parent) n->num_visible_children += row->node.num_visible_children; - row->tree->scroll_percent = offset / (row->tree->item_height * row->tree->root.num_visible_children); - row->tree->scroll_percent = ETK_CLAMP(row->tree->scroll_percent, 0.0, 1.0); + row->tree->xscroll_percent = offset / (row->tree->item_height * row->tree->root.num_visible_children); + row->tree->xscroll_percent = ETK_CLAMP(row->tree->xscroll_percent, 0.0, 1.0); if (!row->tree->frozen) etk_widget_redraw_queue(ETK_WIDGET(row->tree)); @@ -290,12 +359,12 @@ if (!row || !row->node.expanded || !row->tree || (row->tree->mode != ETK_TREE_MODE_TREE)) return; - offset = row->tree->scroll_percent * row->tree->item_height * row->tree->root.num_visible_children; + offset = row->tree->xscroll_percent * row->tree->item_height * row->tree->root.num_visible_children; row->node.expanded = FALSE; for (n = row->node.parent; n && n->expanded; n = n->parent) n->num_visible_children -= row->node.num_visible_children; - row->tree->scroll_percent = offset / (row->tree->item_height * row->tree->root.num_visible_children); - row->tree->scroll_percent = ETK_CLAMP(row->tree->scroll_percent, 0.0, 1.0); + row->tree->xscroll_percent = offset / (row->tree->item_height * row->tree->root.num_visible_children); + row->tree->xscroll_percent = ETK_CLAMP(row->tree->xscroll_percent, 0.0, 1.0); if (!row->tree->frozen) etk_widget_redraw_queue(ETK_WIDGET(row->tree)); @@ -343,21 +412,123 @@ return new_row; } +/** + * @brief Removes all the rows of the tree + * @param tree a tree + */ +void etk_tree_clear(Etk_Tree *tree) +{ + if (!tree) + return; + + ecore_list_goto_first(tree->root.child_rows); + while (!ecore_list_is_empty(tree->root.child_rows)) + ecore_list_remove_destroy(tree->root.child_rows); + + ecore_list_clear(tree->root.child_rows); + if (!tree->frozen) + etk_widget_redraw_queue(ETK_WIDGET(tree)); +} + /************************** * * Etk specific functions * **************************/ +/************************** + * Tree Grid + **************************/ + +/* Creates a new type for the tree grid widget (a tree is composed by a tree grid, column headers and scrollbars */ +static Etk_Type *_etk_grid_type_get() +{ + static Etk_Type *grid_type = NULL; + + if (!grid_type) + grid_type = etk_type_new("Etk_grid", ETK_WIDGET_TYPE, sizeof(Etk_grid), ETK_CONSTRUCTOR(_etk_grid_constructor), NULL, NULL); + + return grid_type; +} + +/* Initializes the default values of the tree grid */ +static void _etk_grid_constructor(Etk_grid *grid) +{ + if (!grid) + return; + + ETK_WIDGET(grid)->move_resize = _etk_grid_move_resize; + etk_signal_connect_after("realize", ETK_OBJECT(grid), ETK_CALLBACK(_etk_grid_realize_cb), NULL); + etk_signal_connect("mouse_wheel", ETK_OBJECT(grid), ETK_CALLBACK(_etk_grid_mouse_wheel_cb), NULL); +} + +/* Moves and resizes the tree grid */ +static void _etk_grid_move_resize(Etk_Widget *widget, int x, int y, int w, int h) +{ + Etk_Tree *tree; + int num_visible_items; + int num_item_to_add; + int i; + + if (!widget || !(tree = ETK_TREE_GRID(widget)->tree) || !(tree->built)) + return; + + num_visible_items = ceil((float)h / tree->item_height) + 1; + if (num_visible_items < 0) + num_visible_items = 0; + num_item_to_add = num_visible_items - ecore_list_nodes(tree->items_objects); + + if (num_item_to_add > 0) + { + Etk_Tree_Item_Objects *item_objects; + + for (i = 0; i < num_item_to_add; i++) + { + if (!(item_objects = _etk_tree_item_objects_new(tree))) + break; + ecore_list_append(tree->items_objects, item_objects); + } + } + else if (num_item_to_add < 0) + { + for (i = 0; i < -num_item_to_add; i++) + { + if (!ecore_list_goto_last(tree->items_objects)) + break; + _etk_tree_item_objects_free(ecore_list_current(tree->items_objects), tree); + ecore_list_remove(tree->items_objects); + } + } + + evas_object_move(tree->clip, x, y); + evas_object_resize(tree->clip, w, h); + + _etk_tree_update(tree); +} + +/************************** + * Tree + **************************/ + /* Initializes the default values of the tree */ static void _etk_tree_constructor(Etk_Tree *tree) { if (!tree) return; + tree->grid = etk_widget_new(ETK_TREE_GRID_TYPE, "theme_group", "tree", NULL); + + ETK_TREE_GRID(tree->grid)->tree = tree; + etk_widget_parent_set(tree->grid, ETK_CONTAINER(tree)); + ecore_dlist_append(ETK_CONTAINER(tree)->children, tree->grid); + etk_widget_show(tree->grid); + tree->num_cols = 0; tree->columns = NULL; tree->last_selected = NULL; + tree->column_to_resize = NULL; + tree->resize_pointer_shown = FALSE; + tree->headers_visible = TRUE; tree->root.parent = NULL; tree->root.child_rows = ecore_list_new(); @@ -375,11 +546,10 @@ tree->frozen = FALSE; tree->mode = ETK_TREE_MODE_LIST; tree->multiple_select = FALSE; - tree->scroll_percent = 0.0; + tree->xscroll_percent = 0.0; + tree->yscroll_percent = 0.0; - ETK_WIDGET(tree)->move_resize = _etk_tree_move_resize; - etk_signal_connect_after("realize", ETK_OBJECT(tree), ETK_CALLBACK(_etk_tree_realize_cb), NULL); - etk_signal_connect("mouse_wheel", ETK_OBJECT(tree), ETK_CALLBACK(_etk_tree_mouse_wheel_cb), NULL); + ETK_WIDGET(tree)->size_allocate = _etk_tree_size_allocate; } /* Destroys the tree */ @@ -402,9 +572,12 @@ { free(tree->columns[i]->title); free(tree->columns[i]); + /* TODO: etk_object_destroy("header"); */ } } free(tree->columns); + /* TODO: */ + /* etk_object_destroy(ETK_OBJECT(tree->grid)); */ } /* Sets the property whose id is "property_id" to the value "value" */ @@ -423,6 +596,9 @@ case ETK_TREE_MULTIPLE_SELECT_PROPERTY: etk_tree_multiple_select_set(tree, etk_property_value_bool_get(value)); break; + case ETK_TREE_HEADERS_VISIBLE_PROPERTY: + etk_tree_headers_visible_set(tree, etk_property_value_bool_get(value)); + break; default: break; } @@ -444,53 +620,108 @@ case ETK_TREE_MULTIPLE_SELECT_PROPERTY: etk_property_value_bool_set(value, tree->multiple_select); break; + case ETK_TREE_HEADERS_VISIBLE_PROPERTY: + etk_property_value_bool_set(value, tree->headers_visible); + break; default: break; } } -/* Moves and resizes the tree */ -static void _etk_tree_move_resize(Etk_Widget *widget, int x, int y, int w, int h) +/* Resizes the tree to the size allocation */ +static void _etk_tree_size_allocate(Etk_Widget *widget, Etk_Geometry geometry) { Etk_Tree *tree; - int num_visible_items; - int num_item_to_add; - int i; + Etk_Size child_request; + Etk_Geometry child_geometry; + int num_visible_cols = 0; + int grid_width = 0, freespace; + int max_header_height = 0; + Etk_Tree_Col *first_visible_col, *last_visible_col; + int xoffset = 0; + float extra_width = 0; + int i, j, k; + + if (!(tree = ETK_TREE(widget))) + return; + + /* Calculate the size of the cols */ + first_visible_col = NULL; + last_visible_col = NULL; + for (i = 0; i < tree->num_cols; i++) + { + if (tree->columns[i]->visible) + { + if (!first_visible_col || first_visible_col->place > tree->columns[i]->place) + first_visible_col = tree->columns[i]; + if (!last_visible_col || last_visible_col->place < tree->columns[i]->place) + last_visible_col = tree->columns[i]; - if (!(tree = ETK_TREE(widget)) || !(tree->built)) + grid_width += tree->columns[i]->width; + num_visible_cols++; + } + } + if (num_visible_cols <= 0) return; - num_visible_items = ceil((float)h / tree->item_height) + 1; - if (num_visible_items < 0) - num_visible_items = 0; - num_item_to_add = num_visible_items - ecore_list_nodes(tree->items_objects); + grid_width += tree->grid->left_padding + tree->grid->right_padding + tree->grid->left_inset + tree->grid->right_inset; + freespace = ETK_MAX(0, geometry.w - grid_width); + extra_width = (float)freespace / num_visible_cols; - if (num_item_to_add > 0) + k = 0; + for (i = 0; i < tree->num_cols; i++) { - Etk_Tree_Item_Objects *item_objects; - - for (i = 0; i < num_item_to_add; i++) + for (j = 0; j < tree->num_cols; j++) { - if (!(item_objects = _etk_tree_item_objects_new(tree))) + if (tree->columns[j]->place == i) + { + if (!tree->columns[j]->visible) + break; + + + tree->columns[j]->xoffset = xoffset; + tree->columns[j]->visible_width = tree->columns[j]->width; + if (tree->columns[j] == last_visible_col) + tree->columns[j]->visible_width += freespace; + xoffset += tree->columns[j]->visible_width; + k++; break; - ecore_list_append(tree->items_objects, item_objects); + } } } - else if (num_item_to_add < 0) + + /* Allocate size for the headers */ + if (tree->headers_visible) { - for (i = 0; i < -num_item_to_add; i++) + for (i = 0; i < tree->num_cols; i++) { - if (!ecore_list_goto_last(tree->items_objects)) - break; - _etk_tree_item_objects_free(ecore_list_current(tree->items_objects), tree); - ecore_list_remove(tree->items_objects); + etk_widget_size_request(tree->columns[i]->header, &child_request); + if (child_request.h > max_header_height) + max_header_height = child_request.h; } - } - evas_object_move(tree->clip, x, y); - evas_object_resize(tree->clip, w, h); + for (i = 0; i < tree->num_cols; i++) + { + child_geometry.x = geometry.x + tree->columns[i]->xoffset + tree->grid->left_padding; + if (tree->columns[i] != first_visible_col) + child_geometry.x += tree->grid->left_inset; + child_geometry.y = geometry.y; + + child_geometry.w = tree->columns[i]->visible_width; + if (tree->columns[i] == first_visible_col) + child_geometry.w += tree->grid->left_inset; + if (tree->columns[i] == last_visible_col) + child_geometry.w += tree->grid->right_inset; - _etk_tree_update(tree); + child_geometry.h = max_header_height; + etk_widget_size_allocate(tree->columns[i]->header, child_geometry); + } + } + + /* Allocate size for the tree grid */ + geometry.y += max_header_height; + geometry.h -= max_header_height; + etk_widget_size_allocate(tree->grid, geometry); } /************************** @@ -499,20 +730,24 @@ * **************************/ +/************************** + * Tree Grid + **************************/ + /* Called when the tree is realized */ -static void _etk_tree_realize_cb(Etk_Object *object, void *data) +static void _etk_grid_realize_cb(Etk_Object *object, void *data) { const char *data_value; Etk_Tree *tree; - Etk_Widget *tree_widget; + Etk_Widget *grid; Evas *evas; int i; - if (!(tree_widget = ETK_WIDGET(object)) || !tree_widget->theme_object) + if (!(grid = ETK_WIDGET(object)) || !grid->theme_object) return; - tree = ETK_TREE(tree_widget); - - data_value = edje_object_data_get(tree_widget->theme_object, "separator_color"); + tree = ETK_TREE_GRID(grid)->tree; + + data_value = edje_object_data_get(grid->theme_object, "separator_color"); if (!data_value || sscanf(data_value, "%d %d %d %d", &tree->separator_color.r, &tree->separator_color.g, &tree->separator_color.b, &tree->separator_color.a) != 4) { tree->separator_color.r = 255; @@ -521,7 +756,7 @@ tree->separator_color.a = 0; } - data_value = edje_object_data_get(tree_widget->theme_object, "row_color1"); + data_value = edje_object_data_get(grid->theme_object, "row_color1"); if (!data_value || sscanf(data_value, "%d %d %d %d", &tree->row_color1.r, &tree->row_color1.g, &tree->row_color1.b, &tree->row_color1.a) != 4) { tree->row_color1.r = 255; @@ -530,7 +765,7 @@ tree->row_color1.a = 0; } - data_value = edje_object_data_get(tree_widget->theme_object, "row_color2"); + data_value = edje_object_data_get(grid->theme_object, "row_color2"); if (!data_value || sscanf(data_value, "%d %d %d %d", &tree->row_color2.r, &tree->row_color2.g, &tree->row_color2.b, &tree->row_color2.a) != 4) { tree->row_color2.r = tree->row_color1.r; @@ -539,7 +774,7 @@ tree->row_color2.a = tree->row_color1.a; } - data_value = edje_object_data_get(tree_widget->theme_object, "row_selected_color"); + data_value = edje_object_data_get(grid->theme_object, "row_selected_color"); if (!data_value || sscanf(data_value, "%d %d %d %d", &tree->row_selected_color.r, &tree->row_selected_color.g, &tree->row_selected_color.b, &tree->row_selected_color.a) != 4) { tree->row_selected_color.r = tree->row_color1.r - 50; @@ -550,49 +785,54 @@ if (tree->item_height < 10) { - data_value = edje_object_data_get(tree_widget->theme_object, "item_height"); + data_value = edje_object_data_get(grid->theme_object, "item_height"); if (!data_value || sscanf(data_value, "%d", &tree->item_height) != 1 || tree->item_height < 10) tree->item_height = 10; } if (tree->image_height < 6) { - data_value = edje_object_data_get(tree_widget->theme_object, "image_height"); + data_value = edje_object_data_get(grid->theme_object, "image_height"); if (!data_value || sscanf(data_value, "%d", &tree->image_height) != 1 || tree->image_height < 6 || tree->image_height > tree->item_height) tree->image_height = tree->item_height - 4; } if (tree->expander_size < 6) { - data_value = edje_object_data_get(tree_widget->theme_object, "expander_size"); + data_value = edje_object_data_get(grid->theme_object, "expander_size"); if (!data_value || sscanf(data_value, "%d", &tree->expander_size) != 1 || tree->expander_size < 6 || tree->expander_size > tree->item_height) tree->expander_size = tree->item_height - 4; } - if ((evas = etk_widget_toplevel_evas_get(tree_widget))) + if ((evas = etk_widget_toplevel_evas_get(grid))) { tree->clip = evas_object_rectangle_add(evas); - etk_widget_member_object_add(tree_widget, tree->clip); + evas_object_show(tree->clip); + etk_widget_member_object_add(grid, tree->clip); } for (i = 0; i < tree->num_cols; i++) _etk_tree_col_realize(tree, i); } -/* Called when the mouse wheel is used over the tree. TODO: scrollbars */ -static void _etk_tree_mouse_wheel_cb(Etk_Object *object, void *event_info, void *data) +/* Called when the mouse wheel is used over the tree grid. TODO: scrollbars */ +static void _etk_grid_mouse_wheel_cb(Etk_Object *object, void *event_info, void *data) { Etk_Tree *tree; Etk_Event_Mouse_Wheel *event; - if (!(tree = ETK_TREE(object)) || !(event = event_info)) + if (!object || !(tree = ETK_TREE_GRID(object)->tree) || !(event = event_info)) return; - tree->scroll_percent += event->z * ((float)3 / tree->root.num_visible_children); - tree->scroll_percent = ETK_CLAMP(tree->scroll_percent, 0.0, 1.0); + tree->xscroll_percent += event->z * ((float)3 / tree->root.num_visible_children); + tree->xscroll_percent = ETK_CLAMP(tree->xscroll_percent, 0.0, 1.0); _etk_tree_update(tree); } +/************************** + * Tree + **************************/ + /* Called when an expander is clicked */ static void _etk_tree_expander_clicked_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { @@ -620,6 +860,112 @@ _etk_tree_node_select(row->tree, &row->node, event->modifiers); } +/* Called when the user presses a column header */ +static void _etk_tree_header_mouse_down_cb(Etk_Object *object, void *event, void *data) +{ + Etk_Tree_Col *col; + Etk_Event_Mouse_Up_Down *down_event; + + if (!(col = data) || !(down_event = event)) + return; + + col->tree->column_to_resize = etk_tree_col_to_resize_get(col, down_event->widget.x); +} + +/* Called when the user presses a column header */ +static void _etk_tree_header_mouse_up_cb(Etk_Object *object, void *event, void *data) +{ + Etk_Tree_Col *col; + + if (!(col = data)) + return; + + if (col->tree->column_to_resize) + col->tree->column_to_resize = NULL; + else + { + /* TODO: sort */ + } +} + +/* Called when the mouse is moved above a column header */ +static void _etk_tree_header_mouse_move_cb(Etk_Object *object, void *event, void *data) +{ + Etk_Tree_Col *col; + Etk_Event_Mouse_Move *move_event; + int new_size; + + if (!(col = data) || !(move_event = event)) + return; + + if (col->tree->column_to_resize) + { + new_size = move_event->cur.canvas.x - col->tree->column_to_resize->header->geometry.x; + if (col->tree->column_to_resize->place == 0) + new_size -= col->tree->grid->left_inset; + new_size = ETK_MAX(col->tree->column_to_resize->min_width, new_size); + + if (new_size != col->tree->column_to_resize->width) + { + col->tree->column_to_resize->width = new_size; + etk_widget_resize_queue(ETK_WIDGET(col->tree)); + } + } + else + { + Etk_Bool show_resize_pointer = FALSE; + + show_resize_pointer = (etk_tree_col_to_resize_get(col, move_event->cur.widget.x) != NULL); + + if (show_resize_pointer && !col->tree->resize_pointer_shown) + { + etk_toplevel_widget_pointer_push(ETK_WIDGET(col->tree)->toplevel_parent, ETK_POINTER_H_DOUBLE_ARROW); + col->tree->resize_pointer_shown = TRUE; + } + else if (!show_resize_pointer && col->tree->resize_pointer_shown) + { + etk_toplevel_widget_pointer_pop(ETK_WIDGET(col->tree)->toplevel_parent, ETK_POINTER_H_DOUBLE_ARROW); + col->tree->resize_pointer_shown = FALSE; + } + } +} + +/* Called when the mouse enters a column header */ +static void _etk_tree_header_mouse_in_cb(Etk_Object *object, void *event, void *data) +{ + Etk_Event_Mouse_In_Out *in_event; + Etk_Tree_Col *col; + Etk_Bool show_resize_pointer = FALSE; + + if (!(col = data) || !(in_event = event)) + return; + + show_resize_pointer = (etk_tree_col_to_resize_get(col, in_event->widget.x) != NULL); + + if (show_resize_pointer && !col->tree->resize_pointer_shown) + { + etk_toplevel_widget_pointer_push(ETK_WIDGET(col->tree)->toplevel_parent, ETK_POINTER_H_DOUBLE_ARROW); + col->tree->resize_pointer_shown = TRUE; + } + else if (!show_resize_pointer && col->tree->resize_pointer_shown) + { + etk_toplevel_widget_pointer_pop(ETK_WIDGET(col->tree)->toplevel_parent, ETK_POINTER_H_DOUBLE_ARROW); + col->tree->resize_pointer_shown = FALSE; + } +} + +/* Called when the mouse leaves a column header */ +static void _etk_tree_header_mouse_out_cb(Etk_Object *object, void *event, void *data) +{ + Etk_Tree_Col *col; + + if (!(col = data) || !col->tree->resize_pointer_shown) + return; + + etk_toplevel_widget_pointer_pop(ETK_WIDGET(col->tree)->toplevel_parent, ETK_POINTER_H_DOUBLE_ARROW); + col->tree->resize_pointer_shown = FALSE; +} + /************************** * * Private functions @@ -634,17 +980,17 @@ int x, y, w, h; int i; - if (!tree) + if (!tree || !tree->grid) return; - x = ETK_WIDGET(tree)->inner_geometry.x; - y = ETK_WIDGET(tree)->inner_geometry.y; - w = ETK_WIDGET(tree)->inner_geometry.w; - h = ETK_WIDGET(tree)->inner_geometry.h; + x = tree->grid->inner_geometry.x; + y = tree->grid->inner_geometry.y; + w = tree->grid->inner_geometry.w; + h = tree->grid->inner_geometry.h; for (i = 0; i < tree->num_cols; i++) { - if (tree->columns[i]->xoffset > w) + if (tree->columns[i]->xoffset > w || !tree->columns[i]->visible) { evas_object_hide(tree->columns[i]->clip); evas_object_hide(tree->columns[i]->separator); @@ -654,20 +1000,19 @@ evas_object_show(tree->columns[i]->clip); evas_object_move(tree->columns[i]->clip, x + tree->columns[i]->xoffset, y); - if (tree->columns[i]->xoffset + tree->columns[i]->width > w) + if (tree->columns[i]->xoffset + tree->columns[i]->visible_width > w) { ... [truncated message content] |
From: <enl...@li...> - 2005-10-23 08:05:46
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default/macros Added Files: scrollbar.edc Log Message: A lot of changes, most significant are: * [Tree] A tree can now have resizable column headers * [Tree] Fix the rendering of the first column of a tree in the LIST mode * [Scale] Implemented * [Scrollbar] Implemented * XCursor Support * Should fix the amd64 segv (I need a confirmation) * A lot of invisible things, bug fixes and mem leaks solved * The canvas is broken |
From: <enl...@li...> - 2005-10-23 08:06:16
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default/widgets Modified Files: scrollbar.edc tree.edc windows.edc Log Message: A lot of changes, most significant are: * [Tree] A tree can now have resizable column headers * [Tree] Fix the rendering of the first column of a tree in the LIST mode * [Scale] Implemented * [Scrollbar] Implemented * XCursor Support * Should fix the amd64 segv (I need a confirmation) * A lot of invisible things, bug fixes and mem leaks solved * The canvas is broken =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/widgets/scrollbar.edc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- scrollbar.edc 1 Oct 2005 16:29:44 -0000 1.1 +++ scrollbar.edc 23 Oct 2005 08:05:34 -0000 1.2 @@ -1,6 +1,6 @@ group { name: "hscrollbar"; - min: 40 16; + min: 68 18; parts { part { name: "trough"; @@ -16,245 +16,47 @@ } image { normal: "hscrollbar_trough.png"; - border: 6 6 6 6; + border: 8 8 8 8; } } } part { - name: "left_left_arrow"; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 0.5; - offset: -1 -8; - } - rel2 { - relative: 0.0 0.5; - offset: 16 9; - } - image { - normal: "scrollbar_left_arrow.png"; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - image { - normal: "scrollbar_left_arrow_down.png"; - } - } - } - part { - name: "right_right_arrow"; - description { - state: "default" 0.0; - rel1 { - relative: 1.0 0.5; - offset: -17 -8; - } - rel2 { - relative: 1.0 0.5; - offset: 0 9; - } - image { - normal: "scrollbar_right_arrow.png"; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - image { - normal: "scrollbar_right_arrow_down.png"; - } - } - } - part { - name: "right_left_arrow"; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 0.0; - offset: -18 0; - to: "right_right_arrow"; - } - rel2 { - relative: 0.0 1.0; - offset: -1 -1; - to: "right_right_arrow"; - } - image { - normal: "scrollbar_left_arrow.png"; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - image { - normal: "scrollbar_left_arrow_down.png"; - } - } - } - part { - name: "scrollbar_bar_confine"; + name: "confine"; type: RECT; description { state: "default" 0.0; visible: 0; rel1 { - relative: 1.0 0.5; - offset: 0 9; - to_x: "left_left_arrow"; - } - rel2 { relative: 0.0 0.5; - offset: 0 10; - to_x: "right_left_arrow"; - } - } - } - part { - name: "drag"; - dragable { - confine: "scrollbar_bar_confine"; - x: 1 1 1; - y: 0 0 0; - } - description { - state: "default" 0.0; - min: 58 18; - max: 58 18; - image { - normal: "hhandle.png"; - border: 10 10 0 0; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - image { - normal: "hhandle_down.png"; - } - } - } - part { - name: "drag_thumb"; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { - relative: 0.5 0.5; - offset: -9 -4; - to: "drag"; - } - rel2 { - relative: 0.5 0.5; - offset: 6 1; - to: "drag"; - } - image { - normal: "hhandle_thumb.png"; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - rel1 { - offset: -8 -3; + offset: 18 -6; } rel2 { - offset: 7 2; + relative: 1.0 0.5; + offset: -35 7; } } } + SCROLLBAR_BUTTON("left_left_arrow", 0.0, 0.5, -1, -8, "scrollbar_arrow_left.png") + SCROLLBAR_BUTTON("right_left_arrow", 1.0, 0.5, -34, -8, "scrollbar_arrow_left.png") + SCROLLBAR_BUTTON("right_right_arrow", 1.0, 0.5, -18, -8, "scrollbar_arrow_right.png") } programs { - program { - name: "hscrollbar_drag_down"; - signal: "mouse,down,1"; - source: "drag"; - action: STATE_SET "down" 0.0; - target: "drag"; - target: "drag_thumb"; - } - program { - name: "hscrollbar_drag_up"; - signal: "mouse,up,1"; - source: "drag"; - action: STATE_SET "default" 0.0; - target: "drag"; - target: "drag_thumb"; - } - program { - name: "left_left_arrow_down"; - signal: "mouse,down,1"; - source: "left_left_arrow"; - action: STATE_SET "down" 0.0; - target: "left_left_arrow"; - after: "emit_scroll_left_start"; - } - program { - name: "left_left_arrow_up"; - signal: "mouse,up,1"; - source: "left_left_arrow"; - action: STATE_SET "default" 0.0; - target: "left_left_arrow"; - after: "emit_scroll_left_stop"; - } - program { - name: "right_left_arrow_down"; - signal: "mouse,down,1"; - source: "right_left_arrow"; - action: STATE_SET "down" 0.0; - target: "right_left_arrow"; - after: "emit_scroll_left_start"; - } - program { - name: "right_left_arrow_up"; - signal: "mouse,up,1"; - source: "right_left_arrow"; - action: STATE_SET "default" 0.0; - target: "right_left_arrow"; - after: "emit_scroll_left_stop"; - } - program { - name: "right_right_arrow_down"; - signal: "mouse,down,1"; - source: "right_right_arrow"; - action: STATE_SET "down" 0.0; - target: "right_right_arrow"; - after: "emit_scroll_right_start"; - } - program { - name: "right_right_arrow_up"; - signal: "mouse,up,1"; - source: "right_right_arrow"; - action: STATE_SET "default" 0.0; - target: "right_right_arrow"; - after: "emit_scroll_right_stop"; - } - program { - name: "emit_scroll_left_start"; - action: SIGNAL_EMIT "scroll_left_start" ""; - } - program { - name: "emit_scroll_left_stop"; - action: SIGNAL_EMIT "scroll_left_stop" ""; - } - program { - name: "emit_scroll_right_start"; - action: SIGNAL_EMIT "scroll_right_start" ""; - } - program { - name: "emit_scroll_right_stop"; - action: SIGNAL_EMIT "scroll_right_stop" ""; - } + SCROLLBAR_BUTTON_PROG("left_left_arrow", "left") + SCROLLBAR_BUTTON_PROG("right_left_arrow", "left") + SCROLLBAR_BUTTON_PROG("right_right_arrow", "right") + } +} +group { + name: "hscrollbar_drag"; + min: 14 0; + parts { + SCROLLBAR_DRAG("drag", 0.0, 0.0, -5, -2, 1.0, 1.0, 4, 1, "scrollbar_hdrag_thumb.png") } } - group { name: "vscrollbar"; - min: 16 40; + min: 18 68; parts { part { name: "trough"; @@ -270,237 +72,40 @@ } image { normal: "vscrollbar_trough.png"; - border: 6 6 6 6; + border: 8 8 8 8; } } } part { - name: "top_top_arrow"; - description { - state: "default" 0.0; - rel1 { - relative: 0.5 0.0; - offset: -8 -1; - } - rel2 { - relative: 0.5 0.0; - offset: 9 16; - } - image { - normal: "scrollbar_top_arrow.png"; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - image { - normal: "scrollbar_top_arrow_down.png"; - } - } - } - part { - name: "bottom_bottom_arrow"; - description { - state: "default" 0.0; - rel1 { - relative: 0.5 1.0; - offset: -8 -17; - } - rel2 { - relative: 0.5 1.0; - offset: 9 0; - } - image { - normal: "scrollbar_bottom_arrow.png"; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - image { - normal: "scrollbar_bottom_arrow_down.png"; - } - } - } - part { - name: "bottom_top_arrow"; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 0.0; - offset: 0 -18; - to: "bottom_bottom_arrow"; - } - rel2 { - relative: 1.0 0.0; - offset: -1 -1; - to: "bottom_bottom_arrow"; - } - image { - normal: "scrollbar_top_arrow.png"; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - image { - normal: "scrollbar_top_arrow_down.png"; - } - } - } - part { - name: "scrollbar_bar_confine"; + name: "confine"; type: RECT; description { state: "default" 0.0; visible: 0; rel1 { - relative: 0.5 1.0; - offset: 9 0; - to_y: "top_top_arrow"; - } - rel2 { relative: 0.5 0.0; - offset: 10 0; - to_y: "bottom_top_arrow"; - } - } - } - part { - name: "drag"; - dragable { - confine: "scrollbar_bar_confine"; - x: 0 0 0; - y: 1 1 1; - } - description { - state: "default" 0.0; - min: 18 58; - max: 18 58; - image { - normal: "vhandle.png"; - border: 0 0 10 10; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - image { - normal: "vhandle_down.png"; - } - } - } - part { - name: "drag_thumb"; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { - relative: 0.5 0.5; - offset: -4 -9; - to: "drag"; - } - rel2 { - relative: 0.5 0.5; - offset: 1 6; - to: "drag"; - } - image { - normal: "vhandle_thumb.png"; - } - } - description { - state: "down" 0.0; - inherit: "default" 0.0; - rel1 { - offset: -3 -8; + offset: -6 18; } rel2 { - offset: 2 7; + relative: 0.5 1.0; + offset: 7 -35; } } } + SCROLLBAR_BUTTON("up_up_arrow", 0.5, 0.0, -8, -1, "scrollbar_arrow_up.png") + SCROLLBAR_BUTTON("down_up_arrow", 0.5, 1.0, -8, -34, "scrollbar_arrow_down.png") + SCROLLBAR_BUTTON("down_down_arrow", 0.5, 1.0, -8, -18, "scrollbar_arrow_down.png") } programs { - program { - name: "vscrollbar_drag_down"; - signal: "mouse,down,1"; - source: "drag"; - action: STATE_SET "down" 0.0; - target: "drag"; - target: "drag_thumb"; - } - program { - name: "vscrollbar_drag_up"; - signal: "mouse,up,1"; - source: "drag"; - action: STATE_SET "default" 0.0; - target: "drag"; - target: "drag_thumb"; - } - program { - name: "top_top_arrow_down"; - signal: "mouse,down,1"; - source: "top_top_arrow"; - action: STATE_SET "down" 0.0; - target: "top_top_arrow"; - after: "emit_scroll_top_start"; - } - program { - name: "top_top_arrow_up"; - signal: "mouse,up,1"; - source: "top_top_arrow"; - action: STATE_SET "default" 0.0; - target: "top_top_arrow"; - after: "emit_scroll_top_stop"; - } - program { - name: "bottom_top_arrow_down"; - signal: "mouse,down,1"; - source: "bottom_top_arrow"; - action: STATE_SET "down" 0.0; - target: "bottom_top_arrow"; - after: "emit_scroll_top_start"; - } - program { - name: "bottom_top_arrow_up"; - signal: "mouse,up,1"; - source: "bottom_top_arrow"; - action: STATE_SET "default" 0.0; - target: "bottom_top_arrow"; - after: "emit_scroll_top_stop"; - } - program { - name: "bottom_bottom_arrow_down"; - signal: "mouse,down,1"; - source: "bottom_bottom_arrow"; - action: STATE_SET "down" 0.0; - target: "bottom_bottom_arrow"; - after: "emit_scroll_bottom_start"; - } - program { - name: "bottom_bottom_arrow_up"; - signal: "mouse,up,1"; - source: "bottom_bottom_arrow"; - action: STATE_SET "default" 0.0; - target: "bottom_bottom_arrow"; - after: "emit_scroll_bottom_stop"; - } - program { - name: "emit_scroll_top_start"; - action: SIGNAL_EMIT "scroll_top_start" ""; - } - program { - name: "emit_scroll_top_stop"; - action: SIGNAL_EMIT "scroll_top_stop" ""; - } - program { - name: "emit_scroll_bottom_start"; - action: SIGNAL_EMIT "scroll_bottom_start" ""; - } - program { - name: "emit_scroll_bottom_stop"; - action: SIGNAL_EMIT "scroll_bottom_stop" ""; - } + SCROLLBAR_BUTTON_PROG("up_up_arrow", "up") + SCROLLBAR_BUTTON_PROG("down_up_arrow", "up") + SCROLLBAR_BUTTON_PROG("down_down_arrow", "down") + } +} +group { + name: "vscrollbar_drag"; + min: 0 14; + parts { + SCROLLBAR_DRAG("drag", 0.0, 0.0, -2, -5, 1.0, 1.0, 1, 4, "scrollbar_vdrag_thumb.png") } } =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/widgets/tree.edc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- tree.edc 7 Oct 2005 21:33:42 -0000 1.2 +++ tree.edc 23 Oct 2005 08:05:34 -0000 1.3 @@ -96,7 +96,9 @@ } group { name: "tree_header"; - min: 0 16; + data { + item: "inset" "5 5 5 5"; + } parts { part { name: "tree_header"; @@ -112,38 +114,32 @@ } image { normal: "tree_header_inactive.png"; - border: 0 2 0 2; + border: 2 2 0 3; } } description { - state: "active" 0.0; + state: "over" 0.0; inherit: "default" 0.0; image { normal: "tree_header_active.png"; } } } - part { - name: "title"; - type: TEXT; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 0.0; - offset: 5 1; - } - rel2 { - relative: 1.0 1.0; - offset: -1 -1; - } - color: 0 0 0 255; - text { - text: "Title"; - font: "Vera"; - align: 0.0 0.5; - size: 10; - } - } + } + programs { + program { + name: "header_enter"; + signal: "enter"; + source: ""; + action: STATE_SET "over" 0.0; + target: "tree_header"; + } + program { + name: "header_leaver"; + signal: "leave"; + source: ""; + action: STATE_SET "default" 0.0; + target: "tree_header"; } } } =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/widgets/windows.edc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- windows.edc 1 Oct 2005 16:29:44 -0000 1.1 +++ windows.edc 23 Oct 2005 08:05:34 -0000 1.2 @@ -1,5 +1,8 @@ group { name: "window"; + data { + item: "inset" "5 5 5 5"; + } parts { part { name: "background"; |
From: <enl...@li...> - 2005-10-23 08:06:16
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default Modified Files: default.edc Log Message: A lot of changes, most significant are: * [Tree] A tree can now have resizable column headers * [Tree] Fix the rendering of the first column of a tree in the LIST mode * [Scale] Implemented * [Scrollbar] Implemented * XCursor Support * Should fix the amd64 segv (I need a confirmation) * A lot of invisible things, bug fixes and mem leaks solved * The canvas is broken =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/default.edc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- default.edc 7 Oct 2005 22:34:43 -0000 1.3 +++ default.edc 23 Oct 2005 08:05:34 -0000 1.4 @@ -1,4 +1,5 @@ #include "macros/focus_rect.edc" +#include "macros/scrollbar.edc" fonts { font: "Vera.ttf" "Vera"; } |
From: <enl...@li...> - 2005-10-23 08:06:16
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default/images Modified Files: hscrollbar_trough.png images.edc tree_bg.png tree_header_active.png tree_header_inactive.png tree_over.png vscrollbar_trough.png Added Files: scrollbar_button.png scrollbar_button_shadow1.png scrollbar_button_shadow2.png scrollbar_drag_button.png Removed Files: border2.png button_toggled.xcf scrollbar_bottom_arrow.png scrollbar_bottom_arrow_down.png scrollbar_left_arrow.png scrollbar_left_arrow_down.png scrollbar_right_arrow.png scrollbar_right_arrow_down.png scrollbar_top_arrow.png scrollbar_top_arrow_down.png Log Message: A lot of changes, most significant are: * [Tree] A tree can now have resizable column headers * [Tree] Fix the rendering of the first column of a tree in the LIST mode * [Scale] Implemented * [Scrollbar] Implemented * XCursor Support * Should fix the amd64 segv (I need a confirmation) * A lot of invisible things, bug fixes and mem leaks solved * The canvas is broken =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/images/hscrollbar_trough.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvs4mpTRn and /tmp/cvsPpwxzv differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/images/images.edc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- images.edc 7 Oct 2005 21:33:42 -0000 1.2 +++ images.edc 23 Oct 2005 08:05:34 -0000 1.3 @@ -25,14 +25,16 @@ image: "vscale_bar.png" COMP; image: "hscrollbar_trough.png" COMP; image: "vscrollbar_trough.png" COMP; - image: "scrollbar_left_arrow.png" COMP; - image: "scrollbar_left_arrow_down.png" COMP; - image: "scrollbar_right_arrow.png" COMP; - image: "scrollbar_right_arrow_down.png" COMP; - image: "scrollbar_top_arrow.png" COMP; - image: "scrollbar_top_arrow_down.png" COMP; - image: "scrollbar_bottom_arrow.png" COMP; - image: "scrollbar_bottom_arrow_down.png" COMP; + image: "scrollbar_button.png" COMP; + image: "scrollbar_button_shadow1.png" COMP; + image: "scrollbar_button_shadow2.png" COMP; + image: "scrollbar_arrow_up.png" COMP; + image: "scrollbar_arrow_down.png" COMP; + image: "scrollbar_arrow_left.png" COMP; + image: "scrollbar_arrow_right.png" COMP; + image: "scrollbar_drag_button.png" COMP; + image: "scrollbar_hdrag_thumb.png" COMP; + image: "scrollbar_vdrag_thumb.png" COMP; image: "tree_bg.png" COMP; image: "tree_over.png" COMP; image: "tree_header_inactive.png" COMP; =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/images/tree_bg.png,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 Binary files /tmp/cvsB3rhqw and /tmp/cvsJOFKLE differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/images/tree_header_active.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvsT3Vzu7 and /tmp/cvsBVgash differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/images/tree_header_inactive.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvs64jpdr and /tmp/cvsHHUnZB differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/images/tree_over.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvsKfYmIs and /tmp/cvsGXypWD differ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/images/vscrollbar_trough.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 Binary files /tmp/cvs55xcrv and /tmp/cvsLjnWLG differ |
From: <enl...@li...> - 2005-10-23 08:06:16
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk Modified Files: COPYING TODO Log Message: A lot of changes, most significant are: * [Tree] A tree can now have resizable column headers * [Tree] Fix the rendering of the first column of a tree in the LIST mode * [Scale] Implemented * [Scrollbar] Implemented * XCursor Support * Should fix the amd64 segv (I need a confirmation) * A lot of invisible things, bug fixes and mem leaks solved * The canvas is broken =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/COPYING,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- COPYING 1 Oct 2005 16:29:44 -0000 1.1 +++ COPYING 23 Oct 2005 08:05:32 -0000 1.2 @@ -1,504 +1,20 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 +Copyright (C) 2005 Simon TRENY and various contributors (see AUTHORS) - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - +The above copyright notice and this permission notice shall be included in +all copies of the Software, its documentation and marketing & publicity +materials, and acknowledgment shall be given in the documentation, materials +and software packages that this Software was used. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/TODO,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- TODO 1 Oct 2005 16:29:44 -0000 1.1 +++ TODO 23 Oct 2005 08:05:32 -0000 1.2 @@ -1,6 +0,0 @@ -expand empty rows/cols? -fix eclair playlist container (static = NULL) -eclair xinerama remember -Widget creation on construction, not on realize, -Return accum -swapped for callbacks \ No newline at end of file |
From: <enl...@li...> - 2005-10-23 08:06:17
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/po Modified Files: fr.po Log Message: A lot of changes, most significant are: * [Tree] A tree can now have resizable column headers * [Tree] Fix the rendering of the first column of a tree in the LIST mode * [Scale] Implemented * [Scrollbar] Implemented * XCursor Support * Should fix the amd64 segv (I need a confirmation) * A lot of invisible things, bug fixes and mem leaks solved * The canvas is broken =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/po/fr.po,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- fr.po 16 Oct 2005 10:44:00 -0000 1.2 +++ fr.po 23 Oct 2005 08:05:34 -0000 1.3 @@ -16,8 +16,8 @@ "Content-Transfer-Encoding: 8bit\n" #: src/bin/etk_button_test.c:28 -msgid "Button test" -msgstr "Test Bouton" +msgid "Etk Button test" +msgstr "Test Bouton Etk" #: src/bin/etk_button_test.c:35 msgid "Normal button" @@ -73,7 +73,7 @@ #: src/bin/etk_scale_test.c:22 msgid "Etk Scale test" -msgstr "Test barre de defilement Etk" +msgstr "Test Scale Etk" #: src/bin/etk_table_test.c:25 msgid "Etk Table Test" @@ -85,7 +85,7 @@ #: src/bin/etk_table_test.c:36 msgid "App name" -msgstr "Nom app" +msgstr "Nom de l'application" #: src/bin/etk_table_test.c:39 msgid "Generic Info" @@ -101,11 +101,11 @@ #: src/bin/etk_table_test.c:48 msgid "Window name" -msgstr "Nom fenetre" +msgstr "Nom de la fenetre" #: src/bin/etk_table_test.c:51 msgid "Window class" -msgstr "Classe fenetre" +msgstr "Classe de la fenetre" #: src/bin/etk_table_test.c:54 msgid "Startup notify" |
From: <enl...@li...> - 2005-10-23 08:06:17
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/src/bin Modified Files: etk_button_test.c etk_canvas_test.c etk_colorpicker_test.c etk_scale_test.c etk_table_test.c etk_test.h etk_tree_test.c Log Message: A lot of changes, most significant are: * [Tree] A tree can now have resizable column headers * [Tree] Fix the rendering of the first column of a tree in the LIST mode * [Scale] Implemented * [Scrollbar] Implemented * XCursor Support * Should fix the amd64 segv (I need a confirmation) * A lot of invisible things, bug fixes and mem leaks solved * The canvas is broken =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_button_test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_button_test.c 16 Oct 2005 00:05:57 -0000 1.2 +++ etk_button_test.c 23 Oct 2005 08:05:34 -0000 1.3 @@ -25,7 +25,7 @@ } win = etk_window_new(); - etk_window_title_set(ETK_WINDOW(win), _("Button test")); + etk_window_title_set(ETK_WINDOW(win), _("Etk Button Test")); etk_signal_connect("delete_event", ETK_OBJECT(win), ETK_CALLBACK(_etk_test_button_window_deleted_cb), win); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_canvas_test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_canvas_test.c 16 Oct 2005 00:05:57 -0000 1.2 +++ etk_canvas_test.c 23 Oct 2005 08:05:34 -0000 1.3 @@ -56,6 +56,7 @@ return; object = evas_object_rectangle_add(evas); + evas_object_show(object); etk_canvas_object_add(canvas, object); x = rand() % 300; @@ -74,6 +75,5 @@ //printf("%d %d %d %d / %d %d %d %d\n", x, y, w, h, r, g, b, a); - evas_object_show(object); evas_object_raise(object); } =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_colorpicker_test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_colorpicker_test.c 16 Oct 2005 00:05:57 -0000 1.2 +++ etk_colorpicker_test.c 23 Oct 2005 08:05:34 -0000 1.3 @@ -19,7 +19,6 @@ return; } - win = etk_window_new(); etk_window_title_set(ETK_WINDOW(win), _("Etk Color Picker")); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_scale_test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_scale_test.c 16 Oct 2005 00:05:57 -0000 1.2 +++ etk_scale_test.c 23 Oct 2005 08:05:34 -0000 1.3 @@ -6,11 +6,20 @@ return 1; } +static void _etk_test_scale_value_changed(Etk_Object *object, double value, void *data) +{ + char string[256]; + + snprintf(string, 255, "%'.2f", value); + etk_label_set(ETK_LABEL(data), string); +} + void etk_test_scale_window_create(void *data) { static Etk_Widget *win = NULL; - Etk_Widget *hbox; + Etk_Widget *table; Etk_Widget *scale; + Etk_Widget *label; if (win) { @@ -23,18 +32,24 @@ etk_signal_connect("delete_event", ETK_OBJECT(win), ETK_CALLBACK(_etk_test_scale_window_deleted_cb), win); - hbox = etk_hbox_new(TRUE, 3); - etk_container_add(ETK_CONTAINER(win), hbox); - etk_widget_show(hbox); - - scale = etk_widget_new(ETK_BIN_TYPE, "theme_group", "hscale", "focusable", TRUE, NULL); - etk_widget_size_request_set(scale, 70, -1); - etk_box_pack_start(ETK_BOX(hbox), scale, TRUE, TRUE, 0); - etk_widget_show(scale); - scale = etk_widget_new(ETK_BIN_TYPE, "theme_group", "vscale", "focusable", TRUE, NULL); - etk_widget_size_request_set(scale, -1, 70); - etk_box_pack_start(ETK_BOX(hbox), scale, TRUE, TRUE, 0); - etk_widget_show(scale); + table = etk_table_new(2, 2, FALSE); + etk_container_add(ETK_CONTAINER(win), table); + + scale = etk_hscale_new(0.0, 255.0, 128.0, 1.0, 10.0); + etk_widget_size_request_set(scale, 70, 70); + etk_table_attach_defaults(ETK_TABLE(table), scale, 0, 0, 0, 0); + + label = etk_label_new("128.00"); + etk_table_attach(ETK_TABLE(table), label, 0, 0, 1, 1, 0, 0, ETK_FILL_POLICY_NONE); + etk_signal_connect("value_changed", ETK_OBJECT(scale), ETK_CALLBACK(_etk_test_scale_value_changed), label); + + scale = etk_vscale_new(0.0, 255.0, 128.0, 1.0, 10.0); + etk_widget_size_request_set(scale, 70, 70); + etk_table_attach_defaults(ETK_TABLE(table), scale, 1, 1, 0, 0); + + label = etk_label_new("128.00"); + etk_table_attach(ETK_TABLE(table), label, 1, 1, 1, 1, 0, 0, ETK_FILL_POLICY_NONE); + etk_signal_connect("value_changed", ETK_OBJECT(scale), ETK_CALLBACK(_etk_test_scale_value_changed), label); - etk_widget_show(win); + etk_widget_show_all(win); } =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_table_test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_table_test.c 16 Oct 2005 00:05:57 -0000 1.2 +++ etk_table_test.c 23 Oct 2005 08:05:34 -0000 1.3 @@ -27,7 +27,7 @@ etk_signal_connect("delete_event", ETK_OBJECT(win), ETK_CALLBACK(_etk_test_table_window_deleted_cb), win); image = etk_image_new_from_file(PACKAGE_DATA_DIR "/images/open.png"); - widget[0] = etk_button_new_with_label(_("Set Icon")); + widget[0] = etk_button_new_with_label("Set Icon"); etk_button_image_set(ETK_BUTTON(widget[0]), ETK_IMAGE(image)); widget[20] = etk_alignment_new(0.5, 0.5, 0.0, 0.0); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_test.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_test.h 16 Oct 2005 00:05:57 -0000 1.2 +++ etk_test.h 23 Oct 2005 08:05:34 -0000 1.3 @@ -3,12 +3,6 @@ #include "Etk.h" -/* Gettext */ -#include <libintl.h> -#define _(String) gettext (String) -#define gettext_noop(String) String -#define N_(String) gettext_noop (String) - typedef struct _Etk_Test_Set Etk_Test_Set; struct _Etk_Test_Set { =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_tree_test.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- etk_tree_test.c 16 Oct 2005 00:05:57 -0000 1.6 +++ etk_tree_test.c 23 Oct 2005 08:05:34 -0000 1.7 @@ -38,13 +38,13 @@ /* The tree: */ tree = etk_tree_new(); - etk_widget_size_request_set(tree, 300, 400); + etk_widget_size_request_set(tree, 320, 400); etk_table_attach_defaults(ETK_TABLE(table), tree, 0, 0, 1, 1); etk_tree_mode_set(ETK_TREE(tree), ETK_TREE_MODE_TREE); - col1 = etk_tree_col_new(ETK_TREE(tree), _("Column 1"), ETK_TREE_COL_ICON_TEXT); - col2 = etk_tree_col_new(ETK_TREE(tree), _("Column 2"), ETK_TREE_COL_INT); - col3 = etk_tree_col_new(ETK_TREE(tree), _("Column 3"), ETK_TREE_COL_IMAGE); + col1 = etk_tree_col_new(ETK_TREE(tree), _("Column 1"), ETK_TREE_COL_ICON_TEXT, 10, 100, TRUE); + col2 = etk_tree_col_new(ETK_TREE(tree), _("Column 2"), ETK_TREE_COL_INT, 10, 100, TRUE); + col3 = etk_tree_col_new(ETK_TREE(tree), _("Column 3"), ETK_TREE_COL_IMAGE, 10, 100, TRUE); etk_tree_build(ETK_TREE(tree)); etk_tree_freeze(ETK_TREE(tree)); @@ -62,13 +62,13 @@ /* The list: */ tree = etk_tree_new(); - etk_widget_size_request_set(tree, 300, 400); + etk_widget_size_request_set(tree, 320, 400); etk_table_attach_defaults(ETK_TABLE(table), tree, 1, 1, 1, 1); etk_tree_multiple_select_set(ETK_TREE(tree), TRUE); - col1 = etk_tree_col_new(ETK_TREE(tree), _("Column 1"), ETK_TREE_COL_TEXT); - col2 = etk_tree_col_new(ETK_TREE(tree), _("Column 2"), ETK_TREE_COL_INT); - col3 = etk_tree_col_new(ETK_TREE(tree), _("Column 3"), ETK_TREE_COL_IMAGE); + col1 = etk_tree_col_new(ETK_TREE(tree), _("Column 1"), ETK_TREE_COL_TEXT, 10, 100, TRUE); + col2 = etk_tree_col_new(ETK_TREE(tree), _("Column 2"), ETK_TREE_COL_INT, 10, 100, TRUE); + col3 = etk_tree_col_new(ETK_TREE(tree), _("Column 3"), ETK_TREE_COL_IMAGE, 10, 100, TRUE); etk_tree_build(ETK_TREE(tree)); etk_tree_freeze(ETK_TREE(tree)); |
From: <enl...@li...> - 2005-10-23 08:25:39
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default/images Added Files: scrollbar_arrow_down.png scrollbar_arrow_left.png scrollbar_arrow_right.png scrollbar_arrow_up.png scrollbar_hdrag_thumb.png scrollbar_vdrag_thumb.png Log Message: Oops... And I forgot one important change: * Etk is now under the BSD licence |
From: <enl...@li...> - 2005-10-23 09:30:12
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/src/lib Modified Files: etk_separator.c etk_separator.h etk_utils.h Log Message: * Fix the separator * Better implementation of gettext ---------------------------------------------------------------------- =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_separator.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_separator.c 23 Oct 2005 09:06:53 -0000 1.1 +++ etk_separator.c 23 Oct 2005 09:30:06 -0000 1.2 @@ -1,14 +1,12 @@ -/** @file etk_hseparator.c */ -#include "etk_hseparator.h" +/** @file etk_separator.c */ +#include "etk_separator.h" #include <stdlib.h> -#include <string.h> /** * @addtogroup Etk_Separator * @{ */ - /************************** * * Implementation =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_separator.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_separator.h 23 Oct 2005 09:06:53 -0000 1.1 +++ etk_separator.h 23 Oct 2005 09:30:06 -0000 1.2 @@ -1,6 +1,6 @@ -/** @file etk_hseparator.h */ -#ifndef _ETK_HSEPARATOR_H_ -#define _ETK_HSEPARATOR_H_ +/** @file etk_separator.h */ +#ifndef _ETK_SEPARATOR_H_ +#define _ETK_SEPARATOR_H_ #include "etk_widget.h" #include "etk_types.h" @@ -17,18 +17,6 @@ /** @brief Checks if the object is an Etk_HSeparator */ #define ETK_IS_HSEPARATOR(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_HSEPARATOR_TYPE)) -struct _Etk_HSeparator -{ - /* private: */ - /* Inherit from Etk_Widget */ - Etk_Widget widget; -}; - -Etk_Type *etk_hseparator_type_get(); -Etk_Widget *etk_hseparator_new(); - - - /** @brief Gets the type of a vseparator */ #define ETK_VSEPARATOR_TYPE (etk_vseparator_type_get()) /** @brief Casts the object to an Etk_VSeparator */ @@ -36,6 +24,13 @@ /** @brief Checks if the object is an Etk_VSeparator */ #define ETK_IS_VSEPARATOR(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_VSEPARATOR_TYPE)) +struct _Etk_HSeparator +{ + /* private: */ + /* Inherit from Etk_Widget */ + Etk_Widget widget; +}; + struct _Etk_VSeparator { /* private: */ @@ -43,10 +38,12 @@ Etk_Widget widget; }; +Etk_Type *etk_hseparator_type_get(); +Etk_Widget *etk_hseparator_new(); + Etk_Type *etk_vseparator_type_get(); Etk_Widget *etk_vseparator_new(); - /** @} */ #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_utils.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- etk_utils.h 23 Oct 2005 08:05:35 -0000 1.3 +++ etk_utils.h 23 Oct 2005 09:30:06 -0000 1.4 @@ -3,16 +3,14 @@ #define _ETK_UTILS_H_ #include <stdio.h> -#include <libintl.h> #include "config.h" /* Gettext */ -#ifndef _ - #ifdef HAVE_GETTEXT - #define _(string) gettext(string) - #else - #define _(string) (string) - #endif +#ifdef HAVE_GETTEXT + #include <libintl.h> + #define _(string) gettext(string) +#else + #define _(string) string #endif /** @brief Gets the max of the two values */ |
From: <enl...@li...> - 2005-10-23 10:09:57
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : proto Dir : e17/proto/etk/src/lib Modified Files: etk_utils.h Log Message: * Temporary fix for gettext =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_utils.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- etk_utils.h 23 Oct 2005 09:30:06 -0000 1.4 +++ etk_utils.h 23 Oct 2005 10:09:45 -0000 1.5 @@ -3,15 +3,10 @@ #define _ETK_UTILS_H_ #include <stdio.h> -#include "config.h" +#include <libintl.h> /* Gettext */ -#ifdef HAVE_GETTEXT - #include <libintl.h> - #define _(string) gettext(string) -#else - #define _(string) string -#endif +#define _(string) gettext(string) /** @brief Gets the max of the two values */ #define ETK_MAX(v1, v2) (((v1) > (v2)) ? (v1) : (v2)) |