From: <no-...@en...> - 2008-09-01 18:33:27
|
Author: pfritz Date: 2008-09-01 11:33:25 -0700 (Mon, 01 Sep 2008) New Revision: 35778 Modified: trunk/ewl/src/lib/ewl_list.c Log: call the count function only once, thanks to Sebastian Misuraca Modified: trunk/ewl/src/lib/ewl_list.c =================================================================== --- trunk/ewl/src/lib/ewl_list.c 2008-09-01 16:01:35 UTC (rev 35777) +++ trunk/ewl/src/lib/ewl_list.c 2008-09-01 18:33:25 UTC (rev 35778) @@ -75,7 +75,7 @@ const Ewl_View *view; void *mvc_data; void *pr_data; - int i; + unsigned int i, count; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(w); @@ -94,9 +94,12 @@ || !model || !view || !mvc_data) DRETURN(DLEVEL_STABLE); + /* get the number of rows */ + count = model->count(mvc_data); + /* create all the widgets and pack into the container */ ewl_container_reset(EWL_CONTAINER(list)); - for (i = 0; i < (int)model->count(mvc_data); i++) + for (i = 0; i < count; i++) { Ewl_Widget *o, *cell; |
From: <no-...@en...> - 2008-09-01 18:48:42
|
Author: pfritz Date: 2008-09-01 11:48:40 -0700 (Mon, 01 Sep 2008) New Revision: 35779 Modified: trunk/ewl/src/lib/ewl_freebox_mvc.c Log: formatting, remove unneeded cast Modified: trunk/ewl/src/lib/ewl_freebox_mvc.c =================================================================== --- trunk/ewl/src/lib/ewl_freebox_mvc.c 2008-09-01 18:33:25 UTC (rev 35778) +++ trunk/ewl/src/lib/ewl_freebox_mvc.c 2008-09-01 18:48:40 UTC (rev 35779) @@ -163,10 +163,10 @@ if ((!ewl_mvc_dirty_get(EWL_MVC(fb_mvc))) || !model || !view || !mvc_data) DRETURN(DLEVEL_STABLE); - + ewl_container_reset(EWL_CONTAINER(fb_mvc)); - count = (unsigned int)model->count(mvc_data); - for (i = 0; i < count; i++) + count = model->count(mvc_data); + for (i = 0; i < count; i++) { Ewl_Widget *o, *cell; |
From: <no-...@en...> - 2008-09-01 19:20:00
|
Author: pfritz Date: 2008-09-01 12:19:58 -0700 (Mon, 01 Sep 2008) New Revision: 35780 Modified: trunk/ewl/src/lib/ewl_image.c trunk/ewl/src/lib/ewl_spinner.c trunk/ewl/src/lib/ewl_tree_view_plain.c trunk/ewl/src/lib/ewl_tree_view_scrolled.c Log: warnings-- Modified: trunk/ewl/src/lib/ewl_image.c =================================================================== --- trunk/ewl/src/lib/ewl_image.c 2008-09-01 18:48:40 UTC (rev 35779) +++ trunk/ewl/src/lib/ewl_image.c 2008-09-01 19:19:58 UTC (rev 35780) @@ -91,7 +91,7 @@ static Ewl_Widget * ewl_image_view_cb_header_fetch(void *data, unsigned int col __UNUSED__, - void *pr_data) + void *pr_data __UNUSED__) { Ewl_Widget *image; Modified: trunk/ewl/src/lib/ewl_spinner.c =================================================================== --- trunk/ewl/src/lib/ewl_spinner.c 2008-09-01 18:48:40 UTC (rev 35779) +++ trunk/ewl/src/lib/ewl_spinner.c 2008-09-01 19:19:58 UTC (rev 35780) @@ -183,7 +183,7 @@ DRETURN_INT(s->digits, DLEVEL_STABLE); } -static int +static unsigned int ewl_spinner_digits_calc(double val) { int dig; @@ -221,9 +221,8 @@ Ewl_Range *r; char buffer[128]; char *ptr = buffer; - int digits; - int min_digits; - int max_digits; + unsigned int digits; + unsigned int min_digits, max_digits; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(w); @@ -243,20 +242,20 @@ digits = sizeof(buffer) - 1; memset(ptr, '9', digits); ptr += digits; - if (s->digits && (ptr - buffer < sizeof(buffer) - 1)) + if (s->digits && ((size_t)(ptr - buffer) < sizeof(buffer) - 1)) ptr += ecore_strlcpy(ptr, nl_langinfo(RADIXCHAR), sizeof(buffer) - (ptr - buffer)); /* since the order doesn't matter we are appending the minus sign * at the end */ - if (ptr - buffer < sizeof(buffer) - 1 - && (r->min_val < 0 || r->max_val < 0)) + if ((size_t)(ptr - buffer) < sizeof(buffer) - 1 + && (r->min_val < 0.0 || r->max_val < 0.0)) { *ptr = '-'; ptr++; } /* and append a character so that we have enough space for the cursor */ - if (ptr - buffer < sizeof(buffer) - 1) + if ((size_t)(ptr - buffer) < sizeof(buffer) - 1) { *ptr = 'W'; ptr++; Modified: trunk/ewl/src/lib/ewl_tree_view_plain.c =================================================================== --- trunk/ewl/src/lib/ewl_tree_view_plain.c 2008-09-01 18:48:40 UTC (rev 35779) +++ trunk/ewl/src/lib/ewl_tree_view_plain.c 2008-09-01 19:19:58 UTC (rev 35780) @@ -35,7 +35,7 @@ ewl_tree_view_plain_cb_widget_fetch(void *data __UNUSED__, unsigned int row __UNUSED__, unsigned int col __UNUSED__, - void *pr_data) + void *pr_data __UNUSED__) { Ewl_Widget *plain; Modified: trunk/ewl/src/lib/ewl_tree_view_scrolled.c =================================================================== --- trunk/ewl/src/lib/ewl_tree_view_scrolled.c 2008-09-01 18:48:40 UTC (rev 35779) +++ trunk/ewl/src/lib/ewl_tree_view_scrolled.c 2008-09-01 19:19:58 UTC (rev 35780) @@ -35,7 +35,7 @@ ewl_tree_view_cb_widget_fetch(void *data __UNUSED__, unsigned int col __UNUSED__, unsigned int row __UNUSED__, - void *pr_data) + void *pr_data __UNUSED__) { Ewl_Widget *tree; |
From: <no-...@en...> - 2008-09-07 18:21:40
|
Author: pfritz Date: 2008-09-07 11:21:39 -0700 (Sun, 07 Sep 2008) New Revision: 35870 Modified: trunk/ewl/src/lib/ewl_embed.c trunk/ewl/src/lib/ewl_embed.h trunk/ewl/src/lib/ewl_misc.c trunk/ewl/src/lib/ewl_window.c Log: don't call evas_render() for embeds Modified: trunk/ewl/src/lib/ewl_embed.c =================================================================== --- trunk/ewl/src/lib/ewl_embed.c 2008-09-07 16:56:40 UTC (rev 35869) +++ trunk/ewl/src/lib/ewl_embed.c 2008-09-07 18:21:39 UTC (rev 35870) @@ -270,7 +270,7 @@ DCHECK_PARAM_PTR(embed); DCHECK_TYPE(embed, EWL_EMBED_TYPE); - embed->focus = f; + embed->focus = !!f; if (embed->smart) evas_object_focus_set(embed->smart, f); @@ -2097,6 +2097,52 @@ } /** + * @param embed: the embed to inidicate if it is rendered by ewl + * @param f: boolean to determine if the embed is rendered by ewl or not + * @return Returns no value. + * @brief Sets the boolean flag in the embed to determine if the embed is + * rendered by ewl + * + * If the flag is set to true, ewl_engine_canvas_render() is called by ewl + * for this embed during the render phase, other wise the embed or another + * infrastructure has to render the canvas itself. For example a plain + * ewl_embed (what you get with ewl_embed_new()) with the evas backend will + * have this flag set to @c FALSE by default, because the evas_render() call + * is done by ecore_evas. For a ewl_window, however, the flag is set to + * @c TRUE by default, so ewl will call the canvas render function. + * + * Use this function only if you really know what you are doing. The default + * setting should work fine in anycase. + */ +void +ewl_embed_render_set(Ewl_Embed *embed, unsigned int f) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(embed); + DCHECK_TYPE(embed, EWL_EMBED_TYPE); + + embed->render = !!f; + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +/** + * @param embed: the embed + * @return Returns a boolean indicating if the embed is rendered by ewl + * @brief Retrieve the boolean value that indicates if the emebd is rendered + * by ewl. + */ +unsigned int +ewl_embed_render_get(Ewl_Embed *embed) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET(embed, FALSE); + DCHECK_TYPE_RET(embed, EWL_EMBED_TYPE, FALSE); + + DRETURN_INT(embed->render, DLEVEL_STABLE); +} + +/** * @param emb: The embed to work with * @return Returns no value * @brief This will destroy the object cache associated with the embed object Modified: trunk/ewl/src/lib/ewl_embed.h =================================================================== --- trunk/ewl/src/lib/ewl_embed.h 2008-09-07 16:56:40 UTC (rev 35869) +++ trunk/ewl/src/lib/ewl_embed.h 2008-09-07 18:21:39 UTC (rev 35870) @@ -89,10 +89,15 @@ int y; /**< Screen relative vertical position of window */ int dnd_count; /**< DND aware widget count */ - int focus; /**< Indicates if it receives focus */ Ewl_Dnd_Types dnd_types; /**< The dnd type */ Ewl_Widget *dnd_last_position; /**< The last dnd position */ + + unsigned char focus:1; /**< Indicates if it receives focus */ + unsigned char render:1; /**< Indicates if the embed needs + to be rendered by ewl, or if + it is done elsewhere, by + ecore_evas for example */ }; Ewl_Widget *ewl_embed_new(void); @@ -173,6 +178,9 @@ void ewl_embed_selection_text_set(Ewl_Embed *emb, const char *txt); +void ewl_embed_render_set(Ewl_Embed *emb, unsigned int render); +unsigned int ewl_embed_render_get(Ewl_Embed *emb); + void ewl_embed_cache_cleanup(Ewl_Embed *emb); /* Modified: trunk/ewl/src/lib/ewl_misc.c =================================================================== --- trunk/ewl/src/lib/ewl_misc.c 2008-09-07 16:56:40 UTC (rev 35869) +++ trunk/ewl/src/lib/ewl_misc.c 2008-09-07 18:21:39 UTC (rev 35870) @@ -533,7 +533,8 @@ render_time = ecore_time_get(); } - ewl_engine_canvas_render(emb); + if (ewl_embed_render_get(emb)) + ewl_engine_canvas_render(emb); if (ewl_config_cache.evas_render) printf("Render time: %f seconds\n", Modified: trunk/ewl/src/lib/ewl_window.c =================================================================== --- trunk/ewl/src/lib/ewl_window.c 2008-09-07 16:56:40 UTC (rev 35869) +++ trunk/ewl/src/lib/ewl_window.c 2008-09-07 18:21:39 UTC (rev 35870) @@ -53,6 +53,7 @@ ewl_widget_appearance_set(EWL_WIDGET(w), EWL_WINDOW_TYPE); ewl_widget_inherit(EWL_WIDGET(w), EWL_WINDOW_TYPE); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_FILL); + ewl_embed_render_set(EWL_EMBED(w), TRUE); ewl_callback_prepend(EWL_WIDGET(w), EWL_CALLBACK_REALIZE, ewl_window_cb_realize, NULL); |
From: <no-...@en...> - 2008-09-07 22:47:57
|
Author: pfritz Date: 2008-09-07 15:47:56 -0700 (Sun, 07 Sep 2008) New Revision: 35874 Modified: trunk/ewl/src/lib/ewl_combo.c trunk/ewl/src/lib/ewl_tree.c Log: use the functions, instead of the stucture directly Modified: trunk/ewl/src/lib/ewl_combo.c =================================================================== --- trunk/ewl/src/lib/ewl_combo.c 2008-09-07 22:29:14 UTC (rev 35873) +++ trunk/ewl/src/lib/ewl_combo.c 2008-09-07 22:47:56 UTC (rev 35874) @@ -313,7 +313,7 @@ combo = EWL_COMBO(mvc); view = ewl_mvc_view_get(mvc); - pr_data = EWL_MVC(combo)->private_data; + pr_data = ewl_mvc_private_data_get(EWL_MVC(combo)); if (!ewl_mvc_data_get(mvc)) DRETURN(DLEVEL_STABLE); @@ -481,7 +481,7 @@ if (view->fetch && model->fetch) { item = view->fetch(model->fetch(mvc_data, i, 0), i, 0, - EWL_MVC(combo)->private_data); + ewl_mvc_private_data_get(EWL_MVC(combo))); ewl_container_child_append(EWL_CONTAINER(o), item); ewl_widget_show(item); } Modified: trunk/ewl/src/lib/ewl_tree.c =================================================================== --- trunk/ewl/src/lib/ewl_tree.c 2008-09-07 22:29:14 UTC (rev 35873) +++ trunk/ewl/src/lib/ewl_tree.c 2008-09-07 22:47:56 UTC (rev 35874) @@ -745,6 +745,7 @@ void *mvc_data, unsigned int column) { Ewl_Widget *c; + void *pr_data; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(tree); @@ -762,12 +763,12 @@ DRETURN(DLEVEL_STABLE); } + pr_data = ewl_mvc_private_data_get(EWL_MVC(tree)); if (model->header) c = view->header_fetch(model->header(mvc_data, column), - column, EWL_MVC(tree)->private_data); + column, pr_data); else - c = view->header_fetch(NULL, column, - EWL_MVC(tree)->private_data); + c = view->header_fetch(NULL, column, pr_data); /* XXX is this really a good idea to override the user's flags ? */ ewl_object_fill_policy_set(EWL_OBJECT(c), |
From: <no-...@en...> - 2008-09-10 10:44:34
|
Author: pfritz Date: 2008-09-10 03:44:31 -0700 (Wed, 10 Sep 2008) New Revision: 35927 Modified: trunk/ewl/src/lib/ewl_container.c trunk/ewl/src/lib/ewl_widget.c Log: - add warnings and comments - use ewl_widget_reparent() instead of directly calling the cb Modified: trunk/ewl/src/lib/ewl_container.c =================================================================== --- trunk/ewl/src/lib/ewl_container.c 2008-09-10 07:31:44 UTC (rev 35926) +++ trunk/ewl/src/lib/ewl_container.c 2008-09-10 10:44:31 UTC (rev 35927) @@ -399,8 +399,11 @@ DRETURN(DLEVEL_STABLE); } - if (!pc->children) + if (!pc->children) { + DWARNING("The container %p (%s) doesn't have a children list", + pc, ewl_widget_appearance_get(EWL_WIDGET(pc))); DRETURN(DLEVEL_STABLE); + } /* * Traverse the list to the child. @@ -410,8 +413,13 @@ /* * If the child isn't found, then this isn't it's parent. */ - if (!temp) + if (!temp) { + DWARNING("The container %p (%s) is not a parent of the widget " + "%p (%s)!", + pc, ewl_widget_appearance_get(EWL_WIDGET(pc)), + child, ewl_widget_appearance_get(child)); DRETURN(DLEVEL_STABLE); + } /* get the index of the widget we are removing */ idx = ecore_dlist_index(pc->children); Modified: trunk/ewl/src/lib/ewl_widget.c =================================================================== --- trunk/ewl/src/lib/ewl_widget.c 2008-09-10 07:31:44 UTC (rev 35926) +++ trunk/ewl/src/lib/ewl_widget.c 2008-09-10 10:44:31 UTC (rev 35927) @@ -824,7 +824,11 @@ tmp = tmp->parent; } - /* set the parent to NULL before doing the child remove */ + /* + * set the parent to NULL before doing the child remove, because + * ewl_container_child_remove() will call this function if there + * is still a parent set + */ w->parent = NULL; /* @@ -840,7 +844,7 @@ */ w->parent = p; - ewl_callback_call_with_event_data(w, EWL_CALLBACK_REPARENT, p); + ewl_widget_reparent(w); DLEAVE_FUNCTION(DLEVEL_STABLE); } |
From: <no-...@en...> - 2008-09-10 22:05:29
|
Author: pfritz Date: 2008-09-10 15:05:22 -0700 (Wed, 10 Sep 2008) New Revision: 35935 Modified: trunk/ewl/src/lib/ewl_events.h Log: formatting Modified: trunk/ewl/src/lib/ewl_events.h =================================================================== --- trunk/ewl/src/lib/ewl_events.h 2008-09-10 18:58:18 UTC (rev 35934) +++ trunk/ewl/src/lib/ewl_events.h 2008-09-10 22:05:22 UTC (rev 35935) @@ -48,8 +48,8 @@ */ struct Ewl_Event_Key { - unsigned int modifiers; /**< Key modifiers that were pressed */ - char *keyname; /**< Name of the key that was pressed */ + unsigned int modifiers; /**< Key modifiers that were pressed */ + char *keyname; /**< Name of the key that was pressed */ }; /** @@ -68,7 +68,7 @@ */ struct Ewl_Event_Key_Down { - Ewl_Event_Key base; /**< Basic key information */ + Ewl_Event_Key base; /**< Basic key information */ }; /** @@ -87,7 +87,7 @@ */ struct Ewl_Event_Key_Up { - Ewl_Event_Key base; /**< Basic key information */ + Ewl_Event_Key base; /**< Basic key information */ }; /** @@ -107,8 +107,8 @@ struct Ewl_Event_Mouse { unsigned int modifiers; /**< Modifiers that were pressed */ - int x; /**< X coordinate the mouse release occurred at */ - int y; /**< Y coordinate the mouse release occurred at */ + int x; /**< X coordinate the mouse release occurred at */ + int y; /**< Y coordinate the mouse release occurred at */ }; /** @@ -127,9 +127,9 @@ */ struct Ewl_Event_Mouse_Down { - Ewl_Event_Mouse base; /**< Base mouse information */ - int button; /**< The mouse button that was released */ - int clicks; /**< Number of consecutive clicks */ + Ewl_Event_Mouse base; /**< Base mouse information */ + int button; /**< The mouse button that was released */ + int clicks; /**< Number of consecutive clicks */ }; /** @@ -148,8 +148,8 @@ */ struct Ewl_Event_Mouse_Up { - Ewl_Event_Mouse base; /**< Base mouse information */ - int button; /**< The mouse button that was released */ + Ewl_Event_Mouse base; /**< Base mouse information */ + int button; /**< The mouse button that was released */ }; /** @@ -168,7 +168,7 @@ */ struct Ewl_Event_Mouse_Move { - Ewl_Event_Mouse base; /**< Base mouse information */ + Ewl_Event_Mouse base; /**< Base mouse information */ }; /** @@ -187,7 +187,7 @@ */ struct Ewl_Event_Mouse_In { - Ewl_Event_Mouse base; /**< Base mouse information */ + Ewl_Event_Mouse base; /**< Base mouse information */ }; /** @@ -206,7 +206,7 @@ */ struct Ewl_Event_Mouse_Out { - Ewl_Event_Mouse base; /**< Base mouse information */ + Ewl_Event_Mouse base; /**< Base mouse information */ }; /** @@ -225,8 +225,8 @@ */ struct Ewl_Event_Mouse_Wheel { - Ewl_Event_Mouse base; /**< Base mouse information */ - int z; /**< Z value of mouse wheel */ + Ewl_Event_Mouse base; /**< Base mouse information */ + int z; /**< Z value of mouse wheel */ int dir; /**< Direction mouse wheel scrolled */ }; @@ -246,8 +246,8 @@ */ struct Ewl_Dnd_Types { - int num_types; /**< The number of DND types */ - char** types; /**< The list of DND types */ + int num_types; /**< The number of DND types */ + char **types; /**< The list of DND types */ }; /** @@ -266,8 +266,8 @@ */ struct Ewl_Event_Dnd_Position { - int x; /**< X coordinate the mouse moved to */ - int y; /**< Y coordinate the mouse moved to */ + int x; /**< X coordinate the mouse moved to */ + int y; /**< Y coordinate the mouse moved to */ }; /** @@ -286,9 +286,9 @@ */ struct Ewl_Event_Dnd_Drop { - int x; /**< X coordinate the mouse moved to */ - int y; /**< Y coordinate the mouse moved to */ - void* data; /**< Data from drop source */ + int x; /**< X coordinate the mouse moved to */ + int y; /**< Y coordinate the mouse moved to */ + void *data; /**< Data from drop source */ }; /** @@ -307,10 +307,10 @@ */ struct Ewl_Event_Dnd_Data_Received { - char *type; /**< Type of data from drop source */ - void *data; /**< Data from drop source */ - unsigned int len; /**< Length of received data */ - unsigned int format; /**< Bit format of received data */ + char *type; /**< Type of data from drop source */ + void *data; /**< Data from drop source */ + unsigned int len; /**< Length of received data */ + unsigned int format; /**< Bit format of received data */ }; /** @@ -349,7 +349,7 @@ */ struct Ewl_Event_Action_Response { - unsigned int response; /**< The response ID */ + unsigned int response; /**< The response ID */ }; /** |
From: Enlightenment S. <no-...@en...> - 2008-10-01 00:17:36
|
Log: simplyfy the utf8-validation code and some comments Author: pfritz Date: 2008-09-30 17:17:26 -0700 (Tue, 30 Sep 2008) New Revision: 36368 Modified: trunk/ewl/src/lib/ewl_text.c Modified: trunk/ewl/src/lib/ewl_text.c =================================================================== --- trunk/ewl/src/lib/ewl_text.c 2008-09-30 23:54:31 UTC (rev 36367) +++ trunk/ewl/src/lib/ewl_text.c 2008-10-01 00:17:26 UTC (rev 36368) @@ -3026,44 +3026,48 @@ DCHECK_PARAM_PTR_RET(c, FALSE); t = (unsigned const char *)c; - if (!t) DRETURN_INT(FALSE, DLEVEL_STABLE); /* check for ascii chars first */ if (t[0] < 0x80) DRETURN_INT(TRUE, DLEVEL_STABLE); + /* the first byte will give use the length of the character, we + * already checked if it is an ASCII, wrong lengths like 1 and 5 + * are catched by the switch. + * So we only have to check if the following bytes are valid UTF-8 + * trailing bytes. UTF-8 trailing bytes are the values between + * 0x80 and 0xBF, or in other words everthing that looks like this + * 0b10xxxxxx. Anding this with 0b11000000 (0xc0) must result in + * 0b10000000 (0x80) else it is not a legal UTF-8 trailing byte + * and thus not a valid utf8 character. + */ switch (EWL_TEXT_CHAR_BYTE_LEN(t)) { - case 2: /* 2 byte */ - if ((t[1] & 0xc0) != 0x80) + case 4: + if ((*(++t) & 0xc0) != 0x80) DRETURN_INT(FALSE, DLEVEL_STABLE); - break; - - case 3: /* 3 byte */ - if (((t[1] & 0xc0) != 0x80) - || ((t[2] & 0xc0) != 0x80)) + /* fall through */ + case 3: + if ((*(++t) & 0xc0) != 0x80) DRETURN_INT(FALSE, DLEVEL_STABLE); - break; - - case 4: /* 4 byte */ - if (((t[1] & 0xc0) != 0x80) - || ((t[2] & 0xc0) != 0x80) - || ((t[3] & 0xc0) != 0x80)) + /* fall through */ + case 2: + if ((*(++t) & 0xc0) != 0x80) DRETURN_INT(FALSE, DLEVEL_STABLE); - break; + DRETURN_INT(TRUE, DLEVEL_STABLE); default: - /* this is actually: - * case 1: - * We already checked if it is a 7-bit ASCII character, - * so anything else with the length of 1 byte is not - * a valid utf8 character - * case 5: case 6: - * Although a character sequences of the length 5 or 6 - * is possible it is not a legal utf8 character */ - DRETURN_INT(FALSE, DLEVEL_STABLE); + /* this is actually: + * case 1: + * We already checked if it is a 7-bit ASCII character, + * so anything else with the length of 1 byte is not + * a valid utf8 character + * case 5: case 6: + * Although a character sequence of the length 5 or 6 + * is possible it is not a legal utf8 character */ + break; } - DRETURN_INT(TRUE, DLEVEL_STABLE); + DRETURN_INT(FALSE, DLEVEL_STABLE); } /* |
From: Enlightenment S. <no-...@en...> - 2008-10-09 13:06:37
|
Log: formating Author: pfritz Date: 2008-10-09 06:06:31 -0700 (Thu, 09 Oct 2008) New Revision: 36546 Modified: trunk/ewl/src/lib/ewl_filepicker.h Modified: trunk/ewl/src/lib/ewl_filepicker.h =================================================================== --- trunk/ewl/src/lib/ewl_filepicker.h 2008-10-09 12:30:19 UTC (rev 36545) +++ trunk/ewl/src/lib/ewl_filepicker.h 2008-10-09 13:06:31 UTC (rev 36546) @@ -47,19 +47,19 @@ */ struct Ewl_Filepicker { - Ewl_Box box; /**< Inherit from Ewl_Box */ + Ewl_Box box; /**< Inherit from Ewl_Box */ - Ewl_Widget *file_list; /**< The file list widet */ + Ewl_Widget *file_list; /**< The file list widet */ - Ewl_Widget *type_combo; /**< File type combo */ - Ewl_Widget *file_entry; /**< Filename entry box */ - Ewl_Widget *favorites_box; /**< Favoirte directory box */ - Ewl_Widget *path_combo; /**< Path combo box */ - Ewl_Widget *dir_button; /**< Button to create a directory */ - Ewl_Widget *ret_button; /**< The save/open button */ + Ewl_Widget *type_combo; /**< File type combo */ + Ewl_Widget *file_entry; /**< Filename entry box */ + Ewl_Widget *favorites_box; /**< Favoirte directory box */ + Ewl_Widget *path_combo; /**< Path combo box */ + Ewl_Widget *dir_button; /**< Button to create a directory */ + Ewl_Widget *ret_button; /**< The save/open button */ - Ecore_List *path; /**< The path components */ - Ecore_List *filters; /**< The type filters */ + Ecore_List *path; /**< The path components */ + Ecore_List *filters; /**< The type filters */ struct { @@ -68,7 +68,7 @@ Ewl_Widget *combo; } mvc_filters, mvc_path; - unsigned char show_favorites:1; /**< Show the favorite box */ + unsigned char show_favorites:1; /**< Show the favorite box */ unsigned char saveas_dialog:1; /**< Open or save dialog */ unsigned char ret_dir:1; /**< Allow directories to be returned */ |
From: Enlightenment S. <no-...@en...> - 2008-10-12 13:31:03
|
Log: reorder Author: pfritz Date: 2008-10-12 06:30:54 -0700 (Sun, 12 Oct 2008) New Revision: 36599 Modified: trunk/ewl/src/lib/ewl_filedialog.h Modified: trunk/ewl/src/lib/ewl_filedialog.h =================================================================== --- trunk/ewl/src/lib/ewl_filedialog.h 2008-10-12 11:59:46 UTC (rev 36598) +++ trunk/ewl/src/lib/ewl_filedialog.h 2008-10-12 13:30:54 UTC (rev 36599) @@ -55,8 +55,10 @@ Ewl_Widget *menu; /**< The menu */ }; +Ewl_Widget *ewl_filedialog_new(void); Ewl_Widget *ewl_filedialog_multiselect_new(void); -Ewl_Widget *ewl_filedialog_new(void); +Ewl_Widget *ewl_filedialog_save_as_new(void); + int ewl_filedialog_init(Ewl_Filedialog *fd); void ewl_filedialog_list_view_set(Ewl_Filedialog *fd, @@ -97,7 +99,6 @@ void ewl_filedialog_return_directories_set(Ewl_Filedialog *fd, unsigned int t); unsigned int ewl_filedialog_return_directories_get(Ewl_Filedialog *fd); -Ewl_Widget *ewl_filedialog_save_as_new(void); /* * Internally used callbacks, override at your own risk. |
From: Enlightenment S. <no-...@en...> - 2008-10-12 13:49:36
|
Log: formating Author: pfritz Date: 2008-10-12 06:49:25 -0700 (Sun, 12 Oct 2008) New Revision: 36600 Modified: trunk/ewl/src/lib/ewl_grid.h Modified: trunk/ewl/src/lib/ewl_grid.h =================================================================== --- trunk/ewl/src/lib/ewl_grid.h 2008-10-12 13:30:54 UTC (rev 36599) +++ trunk/ewl/src/lib/ewl_grid.h 2008-10-12 13:49:25 UTC (rev 36600) @@ -41,15 +41,17 @@ */ struct Ewl_Grid_Info { - int current_size; /**< the current size */ - int current_pos; /**< the current position */ - int preferred_size; /**< The greatest preferred size of a widget inside */ + int current_size; /**< the current size */ + int current_pos; /**< the current position */ + int preferred_size; /**< The greatest preferred size of a widget + inside */ union { - int size; /**< The size set by the user */ - float rel_size; /**< The relative size */ - } user; /**< The user set values for the grid */ + int size; /**< The size set by the user */ + float rel_size; /**< The relative size */ + } user; /**< The user set values for the grid */ - Ewl_Grid_Resize_Type resize_type; /**< Are there values set by the user */ + Ewl_Grid_Resize_Type resize_type; /**< Are there values set by the + user */ }; /** @@ -68,22 +70,24 @@ */ struct Ewl_Grid { - Ewl_Container container; /**< Inherit from Ewl_Container */ + Ewl_Container container; /**< Inherit from Ewl_Container */ - Ewl_Grid_Info *col_size; /**< Horizontal/vertical size of the columns */ - Ewl_Grid_Info *row_size; /**< Horizontal/vertical size of the rows */ - unsigned char data_dirty:1; /**< flag if the size of the columns and rows must - be recalculated */ - unsigned char homogeneous_h:1; /**< Horizontal homogeneous flag */ - unsigned char homogeneous_v:1; /**< Vertical homogeneous flag */ + Ewl_Grid_Info *col_size; /**< Horizontal/vertical size of the + columns */ + Ewl_Grid_Info *row_size; /**< Horizontal/vertical size of the + rows */ + unsigned char data_dirty:1; /**< flag if the size of the columns + and rows must be recalculated */ + unsigned char homogeneous_h:1; /**< Horizontal homogeneous flag */ + unsigned char homogeneous_v:1; /**< Vertical homogeneous flag */ - Ewl_Orientation orientation; /**< The grid orientation */ + Ewl_Orientation orientation; /**< The grid orientation */ - int rows; /**< Row count */ - int cols; /**< Column count */ - int space; /**< Space count */ + int rows; /**< Row count */ + int cols; /**< Column count */ + int space; /**< Space count */ - char *map; /**< Map of the child that have a postion */ + char *map; /**< Map of the child that have a postion */ }; /** @@ -96,11 +100,11 @@ */ struct Ewl_Grid_Child { - int start_col; /**< The start column */ - int start_row; /**< The start row */ + int start_col; /**< The start column */ + int start_row; /**< The start row */ - int end_col; /**< The end column */ - int end_row; /**< The end row */ + int end_col; /**< The end column */ + int end_row; /**< The end row */ }; Ewl_Widget *ewl_grid_new(void); |
From: Enlightenment S. <no-...@en...> - 2008-10-15 17:22:39
|
Log: formating Author: pfritz Date: 2008-10-15 10:17:45 -0700 (Wed, 15 Oct 2008) New Revision: 36692 Modified: trunk/ewl/src/lib/ewl_icon.h Modified: trunk/ewl/src/lib/ewl_icon.h =================================================================== --- trunk/ewl/src/lib/ewl_icon.h 2008-10-15 16:47:54 UTC (rev 36691) +++ trunk/ewl/src/lib/ewl_icon.h 2008-10-15 17:17:45 UTC (rev 36692) @@ -44,19 +44,19 @@ */ struct Ewl_Icon { - Ewl_Stock stock; /**< Inherit from Ewl_Box */ - Ewl_Widget *label; /**< The icons label */ - Ewl_Widget *image; /**< The icons image */ - Ewl_Widget *alt; /**< The icons alt text */ - Ewl_Widget *extended; /**< The icons extended information */ + Ewl_Stock stock; /**< Inherit from Ewl_Box */ + Ewl_Widget *label; /**< The icons label */ + Ewl_Widget *image; /**< The icons image */ + Ewl_Widget *alt; /**< The icons alt text */ + Ewl_Widget *extended; /**< The icons extended information */ - char *label_text; /**< The label text */ + char *label_text; /**< The label text */ - unsigned int constrain; /**< The image constrain value */ + unsigned int constrain; /**< The image constrain value */ - Ewl_Icon_Type type; /**< The icons type */ - Ewl_Icon_Part hidden; /**< The hidden part */ - unsigned char editable:1; /**< Is the icon editable? */ + Ewl_Icon_Type type; /**< The icons type */ + Ewl_Icon_Part hidden; /**< The hidden part */ + unsigned char editable:1; /**< Is the icon editable? */ unsigned char compress_label:1; /**< Should the label be compressed? */ unsigned char complex_label:1; /**< Should the label be a Ewl_Text? */ unsigned char thumbnailing:1; /**< Should the image be thumbnailed?*/ |
From: Enlightenment S. <no-...@en...> - 2008-10-16 20:35:39
|
Log: we don't have necessarily an alt widget Author: pfritz Date: 2008-10-16 13:35:29 -0700 (Thu, 16 Oct 2008) New Revision: 36727 Modified: trunk/ewl/src/lib/ewl_icon.c Modified: trunk/ewl/src/lib/ewl_icon.c =================================================================== --- trunk/ewl/src/lib/ewl_icon.c 2008-10-16 20:33:05 UTC (rev 36726) +++ trunk/ewl/src/lib/ewl_icon.c 2008-10-16 20:35:29 UTC (rev 36727) @@ -628,6 +628,9 @@ DCHECK_PARAM_PTR_RET(icon, NULL); DCHECK_TYPE_RET(icon, EWL_ICON_TYPE, NULL); + if (!icon->alt) + DRETURN_PTR(NULL, DLEVEL_STABLE); + DRETURN_PTR(ewl_label_text_get(EWL_LABEL(icon->alt)), DLEVEL_STABLE); } |
From: Enlightenment S. <no-...@en...> - 2008-10-17 12:38:42
|
Log: formating Author: pfritz Date: 2008-10-17 05:12:54 -0700 (Fri, 17 Oct 2008) New Revision: 36752 Modified: trunk/ewl/src/lib/ewl_image.h Modified: trunk/ewl/src/lib/ewl_image.h =================================================================== --- trunk/ewl/src/lib/ewl_image.h 2008-10-17 11:59:49 UTC (rev 36751) +++ trunk/ewl/src/lib/ewl_image.h 2008-10-17 12:12:54 UTC (rev 36752) @@ -48,27 +48,27 @@ */ struct Ewl_Image { - Ewl_Widget widget; /**< Inherit from Ewl_Widget */ - Ewl_Image_Type type; /**< The type of the image */ - void *image; /**< The evas object for the image */ - char *path; /**< The path to the image */ - char *key; /**< The key for the image */ - char proportional; /**< Is the image displayed proportional */ + Ewl_Widget widget; /**< Inherit from Ewl_Widget */ + Ewl_Image_Type type; /**< The type of the image */ + void *image; /**< The evas object for the image */ + char *path; /**< The path to the image */ + char *key; /**< The key for the image */ + char proportional; /**< Is the image displayed proportional */ int ow, /**< Original image width */ - oh; /**< Original image height */ - double sw, /**< Scale width */ - sh; /**< Scale height */ - int cs; /**< Constrain size */ + oh; /**< Original image height */ + double sw, /**< Scale width */ + sh; /**< Scale height */ + int cs; /**< Constrain size */ int aw, /**< Scale width */ - ah; /**< Scale height */ + ah; /**< Scale height */ struct { int set; /**< Tiling set? */ - int x, /**< Tile x start */ - y, /**< Tile y start */ - w, /**< Tile width */ - h; /**< Tile height */ - } tile; /**< Image tiling information */ + int x, /**< Tile x start */ + y, /**< Tile y start */ + w, /**< Tile width */ + h; /**< Tile height */ + } tile; /**< Image tiling information */ }; /** @@ -106,7 +106,7 @@ void ewl_image_file_set(Ewl_Image *i, const char *im, const char *key); void ewl_image_file_path_set(Ewl_Image *i, const char *im); -const char *ewl_image_file_path_get(Ewl_Image *i); +const char *ewl_image_file_path_get(Ewl_Image *i); void ewl_image_file_key_set(Ewl_Image *i, const char *key); const char *ewl_image_file_key_get(Ewl_Image *i); |
From: Enlightenment S. <no-...@en...> - 2008-10-17 14:56:14
|
Log: add missing declaration Author: pfritz Date: 2008-10-17 07:56:05 -0700 (Fri, 17 Oct 2008) New Revision: 36757 Modified: trunk/ewl/src/lib/ewl_text.h Modified: trunk/ewl/src/lib/ewl_text.h =================================================================== --- trunk/ewl/src/lib/ewl_text.h 2008-10-17 14:53:07 UTC (rev 36756) +++ trunk/ewl/src/lib/ewl_text.h 2008-10-17 14:56:05 UTC (rev 36757) @@ -148,6 +148,7 @@ void ewl_text_text_delete(Ewl_Text *t, unsigned int length); void ewl_text_obscure_set(Ewl_Text *t, const char *utf8_character); +const char *ewl_text_obscure_get(Ewl_Text *t); void ewl_text_selectable_set(Ewl_Text *t, unsigned int selectable); unsigned int ewl_text_selectable_get(Ewl_Text *t); |
From: Enlightenment S. <no-...@en...> - 2008-10-18 15:33:52
|
Log: don't freeze if there are too many un-resizeable panes Author: pfritz Date: 2008-10-18 08:33:41 -0700 (Sat, 18 Oct 2008) New Revision: 36781 Modified: trunk/ewl/src/lib/ewl_paned.c Modified: trunk/ewl/src/lib/ewl_paned.c =================================================================== --- trunk/ewl/src/lib/ewl_paned.c 2008-10-18 15:19:39 UTC (rev 36780) +++ trunk/ewl/src/lib/ewl_paned.c 2008-10-18 15:33:41 UTC (rev 36781) @@ -823,10 +823,8 @@ if (p->last_pane) { /* find the index to start with */ - while ((panes[i].pane) && - (panes[i].pane - != p->last_pane)) - i++; + while (i < pane_num + && panes[i].pane != p->last_pane) i++; /* on the next run we don't want to start * with this widget */ p->last_pane = NULL; @@ -841,7 +839,10 @@ int min; if (panes[i].fixed) + { + cur_res--; continue; + } min = layout->minimum_size(EWL_OBJECT(panes[i].pane)); |
From: Enlightenment S. <no-...@en...> - 2008-10-19 16:58:40
|
Log: we don't return a pointer bug an integer Author: pfritz Date: 2008-10-19 09:58:33 -0700 (Sun, 19 Oct 2008) New Revision: 36820 Modified: trunk/ewl/src/lib/ewl_filelist.c trunk/ewl/src/lib/ewl_filelist.h Modified: trunk/ewl/src/lib/ewl_filelist.c =================================================================== --- trunk/ewl/src/lib/ewl_filelist.c 2008-10-19 15:48:35 UTC (rev 36819) +++ trunk/ewl/src/lib/ewl_filelist.c 2008-10-19 16:58:33 UTC (rev 36820) @@ -241,13 +241,13 @@ * @returns Returns the Ewl_Filelist_View used * @brief Gets the filelist view */ -Ewl_Filelist_View * +Ewl_Filelist_View ewl_filelist_view_get(Ewl_Filelist *fl) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(fl, NULL); - DRETURN_PTR(fl->view_flag, DLEVEL_STABLE); + DRETURN_INT(fl->view_flag, DLEVEL_STABLE); } /** Modified: trunk/ewl/src/lib/ewl_filelist.h =================================================================== --- trunk/ewl/src/lib/ewl_filelist.h 2008-10-19 15:48:35 UTC (rev 36819) +++ trunk/ewl/src/lib/ewl_filelist.h 2008-10-19 16:58:33 UTC (rev 36820) @@ -179,7 +179,7 @@ void ewl_filelist_view_set(Ewl_Filelist *fl, Ewl_Filelist_View view); -Ewl_Filelist_View *ewl_filelist_view_get(Ewl_Filelist *fl); +Ewl_Filelist_View ewl_filelist_view_get(Ewl_Filelist *fl); void ewl_filelist_multiselect_set(Ewl_Filelist *fl, |
From: Enlightenment S. <no-...@en...> - 2008-10-19 17:04:55
|
Log: forgot this line Author: pfritz Date: 2008-10-19 10:04:45 -0700 (Sun, 19 Oct 2008) New Revision: 36821 Modified: trunk/ewl/src/lib/ewl_filelist.c Modified: trunk/ewl/src/lib/ewl_filelist.c =================================================================== --- trunk/ewl/src/lib/ewl_filelist.c 2008-10-19 16:58:33 UTC (rev 36820) +++ trunk/ewl/src/lib/ewl_filelist.c 2008-10-19 17:04:45 UTC (rev 36821) @@ -245,7 +245,7 @@ ewl_filelist_view_get(Ewl_Filelist *fl) { DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR_RET(fl, NULL); + DCHECK_PARAM_PTR_RET(fl, EWL_FILELIST_VIEW_ICON); DRETURN_INT(fl->view_flag, DLEVEL_STABLE); } |
From: Enlightenment S. <no-...@en...> - 2008-10-20 09:24:35
|
Log: do not cast the return value to (void *) in DRETURN_PTR, this only prevents the compile to find bugs. Author: pfritz Date: 2008-10-20 02:20:13 -0700 (Mon, 20 Oct 2008) New Revision: 36843 Modified: trunk/ewl/src/lib/ewl_debug.h trunk/ewl/src/lib/ewl_dnd.c trunk/ewl/src/lib/ewl_dnd.h trunk/ewl/src/lib/ewl_filedialog.c trunk/ewl/src/lib/ewl_filedialog.h trunk/ewl/src/lib/ewl_filelist.c trunk/ewl/src/lib/ewl_filepicker.c trunk/ewl/src/lib/ewl_filepicker.h trunk/ewl/src/lib/ewl_image.c trunk/ewl/src/lib/ewl_mvc.c trunk/ewl/src/lib/ewl_paned.c trunk/ewl/src/lib/ewl_radiobutton.c trunk/ewl/src/lib/ewl_text.c trunk/ewl/src/lib/ewl_text_trigger.c trunk/ewl/src/lib/ewl_theme.c trunk/ewl/src/lib/ewl_tree.c trunk/ewl/src/lib/ewl_tree.h Modified: trunk/ewl/src/lib/ewl_debug.h =================================================================== --- trunk/ewl/src/lib/ewl_debug.h 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_debug.h 2008-10-20 09:20:13 UTC (rev 36843) @@ -84,7 +84,7 @@ fprintf(stderr, "<-- %f - %s:%i\tReturning %p in %s();\n", \ ecore_time_get(), __FILE__, __LINE__, (void *) (ptr), __func__); \ } \ - return (void *)(ptr); \ + return ptr; \ } while (0) #define DRETURN_FLOAT(num, lvl) \ @@ -203,7 +203,7 @@ #define DENTER_FUNCTION(lvl) {} #define DLEAVE_FUNCTION(lvl) {} #define DRETURN(lvl) return -#define DRETURN_PTR(ptr, lvl) return (void *)(ptr) +#define DRETURN_PTR(ptr, lvl) return (ptr) #define DRETURN_FLOAT(num, lvl) return num #define DRETURN_INT(num, lvl) return num #define DWARNING(fmt, args...) {} Modified: trunk/ewl/src/lib/ewl_dnd.c =================================================================== --- trunk/ewl/src/lib/ewl_dnd.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_dnd.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -238,7 +238,7 @@ * @return Returns a NULL terminated array of mimetypes widget accepts for DND * @brief: Gets the mimetypes the designated widget can accept for DND */ -const char ** +char ** ewl_dnd_accepted_types_get(Ewl_Widget *w) { const char *types; @@ -472,7 +472,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); if (!types) - DRETURN_PTR(types, DLEVEL_STABLE); + DRETURN_PTR(NULL, DLEVEL_STABLE); /* * Short lists so iterate over multiple times rather than incur Modified: trunk/ewl/src/lib/ewl_dnd.h =================================================================== --- trunk/ewl/src/lib/ewl_dnd.h 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_dnd.h 2008-10-20 09:20:13 UTC (rev 36843) @@ -32,7 +32,7 @@ void ewl_dnd_accepted_types_set(Ewl_Widget *w, const char **types); int ewl_dnd_accepted_types_contains(Ewl_Widget *w, char *type); -const char **ewl_dnd_accepted_types_get(Ewl_Widget *w); +char **ewl_dnd_accepted_types_get(Ewl_Widget *w); void ewl_dnd_disable(void); void ewl_dnd_enable(void); Modified: trunk/ewl/src/lib/ewl_filedialog.c =================================================================== --- trunk/ewl/src/lib/ewl_filedialog.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_filedialog.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -180,14 +180,14 @@ * @return Returns the Ewl_View set on this file dialog * @brief Retrieve the file list view used in this file dialog */ -Ewl_Filelist_View * +Ewl_Filelist_View ewl_filedialog_list_view_get(Ewl_Filedialog *fd) { DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR_RET(fd, NULL); - DCHECK_TYPE_RET(fd, EWL_FILEDIALOG_TYPE, NULL); + DCHECK_PARAM_PTR_RET(fd, EWL_FILELIST_VIEW_ICON); + DCHECK_TYPE_RET(fd, EWL_FILEDIALOG_TYPE, EWL_FILELIST_VIEW_ICON); - DRETURN_PTR(ewl_filepicker_list_view_get(EWL_FILEPICKER(fd->fp)), + DRETURN_INT(ewl_filepicker_list_view_get(EWL_FILEPICKER(fd->fp)), DLEVEL_STABLE); } Modified: trunk/ewl/src/lib/ewl_filedialog.h =================================================================== --- trunk/ewl/src/lib/ewl_filedialog.h 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_filedialog.h 2008-10-20 09:20:13 UTC (rev 36843) @@ -63,7 +63,7 @@ void ewl_filedialog_list_view_set(Ewl_Filedialog *fd, Ewl_Filelist_View view); -Ewl_Filelist_View *ewl_filedialog_list_view_get(Ewl_Filedialog *fd); +Ewl_Filelist_View ewl_filedialog_list_view_get(Ewl_Filedialog *fd); void ewl_filedialog_directory_set(Ewl_Filedialog *fd, const char *dir); Modified: trunk/ewl/src/lib/ewl_filelist.c =================================================================== --- trunk/ewl/src/lib/ewl_filelist.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_filelist.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -246,6 +246,7 @@ { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(fl, EWL_FILELIST_VIEW_ICON); + DCHECK_TYPE_RET(fl, EWL_FILELIST_TYPE, EWL_FILELIST_VIEW_ICON); DRETURN_INT(fl->view_flag, DLEVEL_STABLE); } Modified: trunk/ewl/src/lib/ewl_filepicker.c =================================================================== --- trunk/ewl/src/lib/ewl_filepicker.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_filepicker.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -438,14 +438,14 @@ * @return Returns the current view set on the filepicker * @brief Retrieves the current view used for the file list */ -Ewl_Filelist_View * +Ewl_Filelist_View ewl_filepicker_list_view_get(Ewl_Filepicker *fp) { DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR_RET(fp, NULL); - DCHECK_TYPE_RET(fp, EWL_FILEPICKER_TYPE, NULL); + DCHECK_PARAM_PTR_RET(fp, EWL_FILELIST_VIEW_ICON); + DCHECK_TYPE_RET(fp, EWL_FILEPICKER_TYPE, EWL_FILELIST_VIEW_ICON); - DRETURN_PTR(ewl_filelist_view_get(EWL_FILELIST(fp->file_list)), + DRETURN_INT(ewl_filelist_view_get(EWL_FILELIST(fp->file_list)), DLEVEL_STABLE); } Modified: trunk/ewl/src/lib/ewl_filepicker.h =================================================================== --- trunk/ewl/src/lib/ewl_filepicker.h 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_filepicker.h 2008-10-20 09:20:13 UTC (rev 36843) @@ -107,7 +107,7 @@ void ewl_filepicker_list_view_set(Ewl_Filepicker *fp, Ewl_Filelist_View view); -Ewl_Filelist_View *ewl_filepicker_list_view_get(Ewl_Filepicker *fp); +Ewl_Filelist_View ewl_filepicker_list_view_get(Ewl_Filepicker *fp); Ewl_Filelist_Filter *ewl_filepicker_filter_add(Ewl_Filepicker *fp, const char *name, Modified: trunk/ewl/src/lib/ewl_image.c =================================================================== --- trunk/ewl/src/lib/ewl_image.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_image.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -692,7 +692,7 @@ thumb = NULL; } - DRETURN_PTR(thumb, DLEVEL_STABLE); + DRETURN_PTR(EWL_WIDGET(thumb), DLEVEL_STABLE); } /** Modified: trunk/ewl/src/lib/ewl_mvc.c =================================================================== --- trunk/ewl/src/lib/ewl_mvc.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_mvc.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -1551,7 +1551,7 @@ sel->row = row; sel->column = column; - DRETURN_PTR(sel, DLEVEL_STABLE); + DRETURN_PTR(EWL_SELECTION(sel), DLEVEL_STABLE); } /** @@ -1582,6 +1582,6 @@ sel->end.row = erow; sel->end.column = ecolumn; - DRETURN_PTR(sel, DLEVEL_STABLE); + DRETURN_PTR(EWL_SELECTION(sel), DLEVEL_STABLE); } Modified: trunk/ewl/src/lib/ewl_paned.c =================================================================== --- trunk/ewl/src/lib/ewl_paned.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_paned.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -85,7 +85,7 @@ ewl_widget_destroy(EWL_WIDGET(pane)); pane = NULL; } - DRETURN_PTR(pane, DLEVEL_STABLE); + DRETURN_PTR(EWL_WIDGET(pane), DLEVEL_STABLE); } /** Modified: trunk/ewl/src/lib/ewl_radiobutton.c =================================================================== --- trunk/ewl/src/lib/ewl_radiobutton.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_radiobutton.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -140,7 +140,7 @@ Ewl_Radiobutton * ewl_radiobutton_chain_selected_get(Ewl_Radiobutton *rb) { - Ewl_Checkbutton *c; + Ewl_Radiobutton *c; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(rb, NULL); @@ -159,7 +159,7 @@ ecore_list_first_goto(rb->chain); while ((c = ecore_list_next(rb->chain))) { - if (ewl_checkbutton_is_checked(c)) + if (ewl_checkbutton_is_checked(EWL_CHECKBUTTON(c))) DRETURN_PTR(c, DLEVEL_STABLE); } Modified: trunk/ewl/src/lib/ewl_text.c =================================================================== --- trunk/ewl/src/lib/ewl_text.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_text.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -1069,7 +1069,7 @@ sel = EWL_TEXT_TRIGGER(t->selection); if (sel && ewl_text_trigger_length_get(sel) > 0) - DRETURN_PTR(sel, DLEVEL_STABLE); + DRETURN_PTR(EWL_WIDGET(sel), DLEVEL_STABLE); DRETURN_PTR(NULL, DLEVEL_STABLE); } @@ -3087,7 +3087,7 @@ len = EWL_TEXT_CHAR_BYTE_LEN(text); if (idx) *idx = len; - DRETURN_PTR(text + len, DLEVEL_STABLE); + DRETURN_PTR((char *)(text + len), DLEVEL_STABLE); } static void Modified: trunk/ewl/src/lib/ewl_text_trigger.c =================================================================== --- trunk/ewl/src/lib/ewl_text_trigger.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_text_trigger.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -78,7 +78,7 @@ DRETURN_PTR(NULL, DLEVEL_STABLE); } - DRETURN_PTR(trigger, DLEVEL_STABLE); + DRETURN_PTR(EWL_WIDGET(trigger), DLEVEL_STABLE); } /** @@ -435,7 +435,7 @@ DRETURN_PTR(NULL, DLEVEL_STABLE); } - DRETURN_PTR(area, DLEVEL_STABLE); + DRETURN_PTR(EWL_WIDGET(area), DLEVEL_STABLE); } /** Modified: trunk/ewl/src/lib/ewl_theme.c =================================================================== --- trunk/ewl/src/lib/ewl_theme.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_theme.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -224,6 +224,7 @@ ewl_theme_image_get(Ewl_Widget *w, char *k) { const char *data; + char *ret; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(w, NULL); @@ -252,12 +253,12 @@ char path[PATH_MAX]; snprintf(path, PATH_MAX, "%s/%s", ewl_theme_path, data); - data = strdup(path); + ret = strdup(path); } else - data = strdup(data); + ret = strdup(data); - DRETURN_PTR(data, DLEVEL_STABLE); + DRETURN_PTR(ret, DLEVEL_STABLE); } static void Modified: trunk/ewl/src/lib/ewl_tree.c =================================================================== --- trunk/ewl/src/lib/ewl_tree.c 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_tree.c 2008-10-20 09:20:13 UTC (rev 36843) @@ -407,7 +407,7 @@ * @return Returns the view used to generate the content area * @brief Retrives the view used to generate the tree content area */ -Ewl_View * +const Ewl_View * ewl_tree_content_view_get(Ewl_Tree *tree) { DENTER_FUNCTION(DLEVEL_STABLE); Modified: trunk/ewl/src/lib/ewl_tree.h =================================================================== --- trunk/ewl/src/lib/ewl_tree.h 2008-10-20 09:17:00 UTC (rev 36842) +++ trunk/ewl/src/lib/ewl_tree.h 2008-10-20 09:20:13 UTC (rev 36843) @@ -145,7 +145,7 @@ void ewl_tree_content_view_set(Ewl_Tree *tree, const Ewl_View *view); -Ewl_View *ewl_tree_content_view_get(Ewl_Tree *tree); +const Ewl_View *ewl_tree_content_view_get(Ewl_Tree *tree); Ewl_Tree_Selection_Type ewl_tree_selection_type_get(Ewl_Tree *tree); void ewl_tree_selection_type_set(Ewl_Tree *tree, |
From: Enlightenment S. <no-...@en...> - 2008-10-28 23:09:13
|
Log: smart class changed Author: pfritz Date: 2008-10-28 16:09:10 -0700 (Tue, 28 Oct 2008) New Revision: 37288 Modified: trunk/ewl/src/lib/ewl_widget.c Modified: trunk/ewl/src/lib/ewl_widget.c =================================================================== --- trunk/ewl/src/lib/ewl_widget.c 2008-10-28 22:32:07 UTC (rev 37287) +++ trunk/ewl/src/lib/ewl_widget.c 2008-10-28 23:09:10 UTC (rev 37288) @@ -2454,7 +2454,8 @@ "Ewl Widget Smart Object", EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL }; widget_smart = evas_smart_class_new(&sc); } |
From: Enlightenment S. <no-...@en...> - 2008-10-28 23:10:14
|
Log: undefine __UNUSED__ Author: pfritz Date: 2008-10-28 16:10:09 -0700 (Tue, 28 Oct 2008) New Revision: 37289 Modified: trunk/ewl/src/lib/ewl_base.h Modified: trunk/ewl/src/lib/ewl_base.h =================================================================== --- trunk/ewl/src/lib/ewl_base.h 2008-10-28 23:09:10 UTC (rev 37288) +++ trunk/ewl/src/lib/ewl_base.h 2008-10-28 23:10:09 UTC (rev 37289) @@ -8,6 +8,9 @@ #include <Ecore.h> #include <Ecore_Data.h> +/* Eina is defining __UNUSED__, undefine it, so we can set it to a sane + * value later. Remove that line if some fixed eina */ +#undef __UNUSED__ #include <ewl_enums.h> #include <ewl_object.h> |
From: Enlightenment S. <no-...@en...> - 2008-11-02 14:22:21
|
Log: add getter for the hidden part Author: pfritz Date: 2008-11-02 06:22:17 -0800 (Sun, 02 Nov 2008) New Revision: 37416 Modified: trunk/ewl/src/lib/ewl_toolbar.c trunk/ewl/src/lib/ewl_toolbar.h Modified: trunk/ewl/src/lib/ewl_toolbar.c =================================================================== --- trunk/ewl/src/lib/ewl_toolbar.c 2008-11-02 14:10:11 UTC (rev 37415) +++ trunk/ewl/src/lib/ewl_toolbar.c 2008-11-02 14:22:17 UTC (rev 37416) @@ -135,10 +135,10 @@ } /** - * @param t: The toolbar to set the orientation on + * @param t: The toolbar to set the hidden part * @param part: The Ewl_Icon_Part to hide * @return Returns no value - * @brief Set the orientation of the toolbar + * @brief Hide the given icon part */ void ewl_toolbar_icon_part_hide(Ewl_Toolbar *t, Ewl_Icon_Part part) @@ -164,6 +164,21 @@ } /** + * @param t: The toolbar to get the hidden part + * @return Returns the hidden icon part + * @brief Retrieve the hidden part + */ +Ewl_Icon_Part +ewl_toolbar_icon_part_hidden_get(Ewl_Toolbar *t) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET(t, EWL_ICON_PART_NONE); + DCHECK_TYPE_RET(t, EWL_TOOLBAR_TYPE, EWL_ICON_PART_NONE); + + DRETURN_INT(t->hidden, DLEVEL_STABLE); +} + +/** * @internal * @param c: The container to work with * @param w: The widget to work with Modified: trunk/ewl/src/lib/ewl_toolbar.h =================================================================== --- trunk/ewl/src/lib/ewl_toolbar.h 2008-11-02 14:10:11 UTC (rev 37415) +++ trunk/ewl/src/lib/ewl_toolbar.h 2008-11-02 14:22:17 UTC (rev 37416) @@ -47,6 +47,7 @@ Ewl_Menubar menubar; /**< Inherit from Ewl_Menubar */ Ewl_Icon_Part hidden; /**< which part of icons should be hidden */ }; + Ewl_Widget *ewl_htoolbar_new(void); Ewl_Widget *ewl_vtoolbar_new(void); @@ -57,6 +58,7 @@ Ewl_Orientation ewl_toolbar_orientation_get(Ewl_Toolbar *t); void ewl_toolbar_icon_part_hide(Ewl_Toolbar *t, Ewl_Icon_Part part); +Ewl_Icon_Part ewl_toolbar_icon_part_hidden_get(Ewl_Toolbar *t); /* * Internal functions |
From: Enlightenment S. <no-...@en...> - 2008-11-02 15:32:59
|
Log: formating Author: pfritz Date: 2008-11-02 07:32:57 -0800 (Sun, 02 Nov 2008) New Revision: 37419 Modified: trunk/ewl/src/lib/ewl_scrollpane.h Modified: trunk/ewl/src/lib/ewl_scrollpane.h =================================================================== --- trunk/ewl/src/lib/ewl_scrollpane.h 2008-11-02 15:32:13 UTC (rev 37418) +++ trunk/ewl/src/lib/ewl_scrollpane.h 2008-11-02 15:32:57 UTC (rev 37419) @@ -48,13 +48,15 @@ */ struct Ewl_Scrollpane_Scroll_Info_Base { - unsigned char clicked:1; /**< If the mouse is currently clicked or not */ - unsigned char active:1; /**< If the pane is currently moving */ - int fps; /**< Number of recalculations per second */ - double vmax; /**< Maximum speed in pixels */ - double vmin; /**< Minimum speed in pixels */ - double dampen; /**< Frictional variable */ - void *extra; /**< Additional information */ + unsigned char clicked:1; /**< If the mouse is currently clicked + or not */ + unsigned char active:1; /**< If the pane is currently moving */ + int fps; /**< Number of recalculations per + second */ + double vmax; /**< Maximum speed in pixels */ + double vmin; /**< Minimum speed in pixels */ + double dampen; /**< Frictional variable */ + void *extra; /**< Additional information */ }; /** @@ -75,16 +77,18 @@ */ struct Ewl_Scrollpane { - Ewl_Container container; /**< Inherit from Ewl_Container */ + Ewl_Container container; /**< Inherit from Ewl_Container */ - Ewl_Widget *overlay; /**< Clips the enclosed widget */ - Ewl_Widget *box; /**< Lays out enclosed widget */ - Ewl_Widget *hscrollbar; /**< Horizontal scrollbar */ - Ewl_Widget *vscrollbar; /**< Vertical scrollbar */ - Ewl_Scrollpane_Flags hflag; /**< Flags for horizontal scrollbar */ - Ewl_Scrollpane_Flags vflag; /**< Flags for vertical scrollbar */ - Ewl_Scrollpane_Scroll_Info_Base *kinfo; /**< Kinetic scrolling info */ - Ewl_Kinetic_Scroll type; /**< If the scrollpane is to use kinetic scrolling */ + Ewl_Widget *overlay; /**< Clips the enclosed widget */ + Ewl_Widget *box; /**< Lays out enclosed widget */ + Ewl_Widget *hscrollbar; /**< Horizontal scrollbar */ + Ewl_Widget *vscrollbar; /**< Vertical scrollbar */ + Ewl_Scrollpane_Flags hflag; /**< Flags for horizontal scrollbar */ + Ewl_Scrollpane_Flags vflag; /**< Flags for vertical scrollbar */ + Ewl_Scrollpane_Scroll_Info_Base *kinfo; /**< Kinetic scrolling + info */ + Ewl_Kinetic_Scroll type; /**< If the scrollpane is to use + kinetic scrolling */ }; Ewl_Widget *ewl_scrollpane_new(void); |
From: Enlightenment S. <no-...@en...> - 2008-11-02 17:14:05
|
Log: formating Author: pfritz Date: 2008-11-02 09:14:01 -0800 (Sun, 02 Nov 2008) New Revision: 37420 Modified: trunk/ewl/src/lib/ewl_freebox.h Modified: trunk/ewl/src/lib/ewl_freebox.h =================================================================== --- trunk/ewl/src/lib/ewl_freebox.h 2008-11-02 15:32:57 UTC (rev 37419) +++ trunk/ewl/src/lib/ewl_freebox.h 2008-11-02 17:14:01 UTC (rev 37420) @@ -51,12 +51,12 @@ */ struct Ewl_Freebox { - Ewl_Container container; /**< Inherit from Ewl_Container */ + Ewl_Container container; /**< Inherit from Ewl_Container */ - Ewl_Freebox_Layout_Type layout; /**< The current layout type */ - Ewl_Freebox_Comparator comparator; /**< The item comparator */ - Ewl_Orientation orientation; /**< The orientation of the box */ - unsigned short sorted; /**< Is the box sorted */ + Ewl_Freebox_Layout_Type layout; /**< The current layout type */ + Ewl_Freebox_Comparator comparator; /**< The item comparator */ + Ewl_Orientation orientation; /**< The orientation of the box */ + unsigned short sorted; /**< Is the box sorted */ }; Ewl_Widget *ewl_vfreebox_new(void); |
From: Enlightenment S. <no-...@en...> - 2008-11-02 18:26:26
|
Log: formating and add EWL_IMAGE_THUMBNAIL_IS() Author: pfritz Date: 2008-11-02 10:26:21 -0800 (Sun, 02 Nov 2008) New Revision: 37422 Modified: trunk/ewl/src/lib/ewl_image.h trunk/ewl/src/lib/ewl_scrollbar.h Modified: trunk/ewl/src/lib/ewl_image.h =================================================================== --- trunk/ewl/src/lib/ewl_image.h 2008-11-02 17:41:26 UTC (rev 37421) +++ trunk/ewl/src/lib/ewl_image.h 2008-11-02 18:26:21 UTC (rev 37422) @@ -78,6 +78,13 @@ #define EWL_IMAGE_THUMBNAIL_TYPE "image_thumbnail" /** + * @def EWL_IMAGE_THUMBNAIL_IS(w) + * Returns TRUE if the widget is an Ewl_Image_Thumbnail, FALSE otherwise + */ +#define EWL_IMAGE_THUMBNAIL_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), \ + EWL_IMAGE_THUMBNAIL_TYPE)) + +/** * @brief Inherits from Ewl_Image and extends to provide reference to original image. */ struct Ewl_Image_Thumbnail Modified: trunk/ewl/src/lib/ewl_scrollbar.h =================================================================== --- trunk/ewl/src/lib/ewl_scrollbar.h 2008-11-02 17:41:26 UTC (rev 37421) +++ trunk/ewl/src/lib/ewl_scrollbar.h 2008-11-02 18:26:21 UTC (rev 37422) @@ -62,18 +62,18 @@ */ struct Ewl_Scrollbar { - Ewl_Box box; /**< Inherit from Ewl_Box */ + Ewl_Box box; /**< Inherit from Ewl_Box */ - Ewl_Widget *seeker; /**< The internal Ewl_Seeker */ - Ewl_Widget *decrement; /**< The internal decrement button */ - Ewl_Widget *increment; /**< The internal increment button */ + Ewl_Widget *seeker; /**< The internal Ewl_Seeker */ + Ewl_Widget *decrement; /**< The internal decrement button */ + Ewl_Widget *increment; /**< The internal increment button */ unsigned int buttons_alignment; /**< The ordering of buttons */ - double fill_percentage; /**< Ratio of size for draggable */ - double start_time; /**< Time scrolling began */ - Ecore_Timer *timer; /**< Repeating timer for scrolling */ - signed char direction; /**< Direction for the scrollbar */ - signed char invert; /**< Invert the scrolling direction */ + double fill_percentage; /**< Ratio of size for draggable */ + double start_time; /**< Time scrolling began */ + Ecore_Timer *timer; /**< Repeating timer for scrolling */ + signed char direction; /**< Direction for the scrollbar */ + signed char invert; /**< Invert the scrolling direction */ }; Ewl_Widget *ewl_scrollbar_new(void); |