lib/ewl_widget.c File Reference
#include "ewl_base.h"
#include "ewl_private.h"
#include "ewl_macros.h"
#include "ewl_debug.h"
#include <Evas.h>
#include <Edje.h>

Defines | |
| #define | EWL_WIDGET_SMART_NAME "Ewl Widget Smart" |
Functions | |
| const char * | ewl_widget_appearance_get (Ewl_Widget *w) |
| Retrieve the appearance key of the widget. | |
| const char * | ewl_widget_appearance_part_text_get (Ewl_Widget *w, const char *part) |
| Retrieve a copy of a parts current text. | |
| void | ewl_widget_appearance_part_text_set (Ewl_Widget *w, const char *part, const char *text) |
| Change the text of the given theme part of a widget. | |
| int | ewl_widget_appearance_path_copy (Ewl_Widget *w, char *buf, int size) |
| char * | ewl_widget_appearance_path_get (Ewl_Widget *w) |
| Retrieve the appearance path key of the widget. | |
| int | ewl_widget_appearance_path_size_get (Ewl_Widget *w) |
| void | ewl_widget_appearance_set (Ewl_Widget *w, const char *appearance) |
| Change the appearance of the specified widget. | |
| const char * | ewl_widget_appearance_text_get (Ewl_Widget *w) |
| Retrieve the text of the given theme part of a widget. | |
| void | ewl_widget_appearance_text_set (Ewl_Widget *w, const char *text) |
| Change the text of the given theme part of a widget. | |
| void | ewl_widget_cb_configure (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_disable (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_enable (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_focus_in (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_focus_out (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_hide (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_mouse_down (Ewl_Widget *w, void *ev_data, void *user_data __UNUSED__) |
| void | ewl_widget_cb_mouse_in (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_mouse_move (Ewl_Widget *w, void *ev_data, void *user_data __UNUSED__) |
| void | ewl_widget_cb_mouse_out (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_mouse_up (Ewl_Widget *w, void *ev_data, void *user_data __UNUSED__) |
| void | ewl_widget_cb_obscure (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_realize (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_reparent (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_reveal (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_show (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_cb_unrealize (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_widget_color_get (Ewl_Widget *w, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a) |
| Gets the colour settings of the widget. | |
| void | ewl_widget_color_set (Ewl_Widget *w, unsigned int r, unsigned int g, unsigned int b, unsigned int a) |
| sets the colour of the widget | |
| void | ewl_widget_configure (Ewl_Widget *w) |
| Initiate configuring of the specified widget. | |
| void * | ewl_widget_data_del (Ewl_Widget *w, void *k) |
| Remove the specified key / value pair from the widget and return the value. | |
| void * | ewl_widget_data_get (Ewl_Widget *w, void *k) |
| retrieve the specified key / value pair from the widget | |
| void | ewl_widget_data_set (Ewl_Widget *w, void *k, void *v) |
| Attach the specified key / value pair to the widget. | |
| void | ewl_widget_destroy (Ewl_Widget *w) |
| Destroy the specified widget. | |
| void | ewl_widget_disable (Ewl_Widget *w) |
| Prevent a widget from receiving any events. | |
| void | ewl_widget_enable (Ewl_Widget *w) |
| Re-enable a disabled widget. | |
| void | ewl_widget_flags_add (Ewl_Widget *w, unsigned int flags, unsigned int mask) |
| Add the set of flags specified in flags to w. | |
| void | ewl_widget_flags_remove (Ewl_Widget *w, unsigned int flags, unsigned int mask) |
| Removes the set of state flags specified in flags from w. | |
| void | ewl_widget_focus_send (Ewl_Widget *w) |
| Changes the keyboard focus to the widget w. | |
| unsigned int | ewl_widget_focusable_get (Ewl_Widget *w) |
| Checks the focusable state of the widget. | |
| void | ewl_widget_focusable_set (Ewl_Widget *w, unsigned int val) |
| Set if the given widget is focusable or not. | |
| Ewl_Widget * | ewl_widget_focused_get (void) |
| Retrieve the currently focused widget. | |
| void | ewl_widget_free (Ewl_Widget *w) |
| void | ewl_widget_hide (Ewl_Widget *w) |
| Mark a widget as invisible. | |
| unsigned int | ewl_widget_ignore_focus_change_get (Ewl_Widget *w) |
| Get if the widget is ignoring focus changes. | |
| void | ewl_widget_ignore_focus_change_set (Ewl_Widget *w, unsigned int val) |
| Set if the widget should ignore focus changes. | |
| void | ewl_widget_inherit (Ewl_Widget *widget, const char *inherit) |
| Appends the given inheritance to this widgets inheritance string. | |
| int | ewl_widget_init (Ewl_Widget *w) |
| Initialize a widget to default values and callbacks. | |
| unsigned int | ewl_widget_internal_is (Ewl_Widget *w) |
| void | ewl_widget_internal_set (Ewl_Widget *w, unsigned int val) |
| int | ewl_widget_layer_priority_get (Ewl_Widget *w) |
| Retrieve a widgets layer relative to it's parent. | |
| void | ewl_widget_layer_priority_set (Ewl_Widget *w, int layer) |
| Set the relative layer to it's parent. | |
| int | ewl_widget_layer_top_get (Ewl_Widget *w) |
| Returns if the widget will be drawn above all the others. | |
| void | ewl_widget_layer_top_set (Ewl_Widget *w, int top) |
| set the widget to be layered above all other widgets | |
| Ewl_Widget * | ewl_widget_name_find (const char *name) |
| Find a widget identified by a name. | |
| const char * | ewl_widget_name_get (Ewl_Widget *w) |
| Get the name for the specified widget. | |
| void | ewl_widget_name_set (Ewl_Widget *w, const char *name) |
| Name the specified widget. | |
| Ewl_Widget * | ewl_widget_new (void) |
| Allocate a new widget. | |
| void | ewl_widget_obscure (Ewl_Widget *w) |
| Indicate a widget is obscured. | |
| unsigned int | ewl_widget_onscreen_is (Ewl_Widget *w) |
| Checks if the given widget is currently on screen. | |
| Ewl_Widget * | ewl_widget_parent_get (Ewl_Widget *w) |
| Retrieves the parent of the given widget. | |
| int | ewl_widget_parent_of (Ewl_Widget *c, Ewl_Widget *w) |
| Determine if a widget is a parent of another widget. | |
| void | ewl_widget_parent_set (Ewl_Widget *w, Ewl_Widget *p) |
| change the parent of the specified widget | |
| void | ewl_widget_print (Ewl_Widget *w) |
| Prints info for debugging a widget's state information. | |
| void | ewl_widget_print_verbose (Ewl_Widget *w) |
| Prints verbose info for debugging a widget's state information. | |
| void | ewl_widget_realize (Ewl_Widget *w) |
| Realize the specified widget. | |
| void | ewl_widget_reparent (Ewl_Widget *w) |
| initiate reparent of the specified widget | |
| void | ewl_widget_reveal (Ewl_Widget *w) |
| Indicate a widget is revealed. | |
| void | ewl_widget_show (Ewl_Widget *w) |
| mark a widget as visible | |
| void | ewl_widget_smart_member_add (Evas_Object *obj, Evas_Object *member) |
| void | ewl_widget_state_set (Ewl_Widget *w, const char *state, Ewl_State_Type flag) |
| Update the appearance of the widget to a state. | |
| void | ewl_widget_tab_order_append (Ewl_Widget *w) |
| Changes the order in the embed so w receives focus first on tab. | |
| void | ewl_widget_tab_order_insert (Ewl_Widget *w, unsigned int idx) |
| Changes the order in the embed so w receives focus first on tab. | |
| void | ewl_widget_tab_order_insert_after (Ewl_Widget *w, Ewl_Widget *after) |
| Insert the given widget into the tab order after the after widget. | |
| void | ewl_widget_tab_order_insert_before (Ewl_Widget *w, Ewl_Widget *before) |
| Inserts the widget into the tab order before the before widget. | |
| void | ewl_widget_tab_order_prepend (Ewl_Widget *w) |
| Changes the order in the embed so w receives focus first on tab. | |
| void | ewl_widget_tab_order_remove (Ewl_Widget *w) |
| Remove the widget from the tab order. | |
| void | ewl_widget_theme_path_set (Ewl_Widget *w, const char *path) |
| Change the path of the specified widget. | |
| void | ewl_widget_tree_print (Ewl_Widget *w) |
| Prints to stdout the tree of widgets that are parents of a widget. | |
| unsigned int | ewl_widget_type_is (Ewl_Widget *widget, const char *type) |
| Determine if the widget w has inherited from the type t. | |
| unsigned int | ewl_widget_unmanaged_is (Ewl_Widget *w) |
| void | ewl_widget_unmanaged_set (Ewl_Widget *w, unsigned int val) |
| void | ewl_widget_unrealize (Ewl_Widget *w) |
| Unrealize the specified widget. | |
Define Documentation
| #define EWL_WIDGET_SMART_NAME "Ewl Widget Smart" |
Referenced by ewl_widget_cb_reveal().
Function Documentation
| void ewl_widget_cb_configure | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References CURRENT_H, CURRENT_W, CURRENT_X, CURRENT_Y, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_WIDGET_TYPE, INSET_BOTTOM, INSET_LEFT, INSET_RIGHT, INSET_TOP, Ewl_Widget::smart_object, Ewl_Widget::swallowed, and Ewl_Widget::theme_object.
Referenced by ewl_widget_init().
| void ewl_widget_cb_disable | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_STATE_PERSISTENT, ewl_widget_state_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_widget_init().
| void ewl_widget_cb_enable | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_STATE_PERSISTENT, ewl_widget_state_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_widget_init().
| void ewl_widget_cb_focus_in | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_STATE_TRANSIENT, ewl_widget_state_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_widget_init().
| void ewl_widget_cb_focus_out | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_STATE_TRANSIENT, ewl_widget_state_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_box_init(), ewl_scrollpane_init(), and ewl_widget_init().
| void ewl_widget_cb_hide | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
| void ewl_widget_cb_mouse_down | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Event_Mouse_Down::button, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_STATE_TRANSIENT, ewl_widget_state_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_widget_init().
| void ewl_widget_cb_mouse_in | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_STATE_TRANSIENT, ewl_widget_state_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_widget_init().
| void ewl_widget_cb_mouse_move | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References CURRENT_H, CURRENT_W, CURRENT_X, CURRENT_Y, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, Ewl_Embed::drag_widget, ewl_dnd_internal_drag_start(), EWL_EMBED, ewl_embed_dnd_position_feed(), ewl_embed_widget_find(), EWL_FLAG_PROPERTY_DND_SOURCE, EWL_FLAG_STATE_DND, EWL_FLAG_STATE_PRESSED, EWL_FLAGS_PROPERTY_MASK, EWL_STATE_TRANSIENT, ewl_widget_flags_has, ewl_widget_state_add, ewl_widget_state_has, ewl_widget_state_set(), EWL_WIDGET_TYPE, Ewl_Embed::last, Ewl_Event_Mouse::x, and Ewl_Event_Mouse::y.
Referenced by ewl_widget_init().
| void ewl_widget_cb_mouse_out | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_STATE_TRANSIENT, ewl_widget_state_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_widget_init().
| void ewl_widget_cb_mouse_up | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Event_Mouse_Down::base, Ewl_Event_Mouse_Up::base, Ewl_Event_Mouse_Down::button, Ewl_Event_Mouse_Up::button, Ewl_Event_Mouse_Down::clicks, CURRENT_H, CURRENT_W, CURRENT_X, CURRENT_Y, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, ewl_callback_call_with_event_data(), EWL_CALLBACK_CLICKED, ewl_dnd_drag_drop(), ewl_embed_mouse_move_feed(), ewl_embed_widget_find(), EWL_FLAG_STATE_DND, EWL_FLAG_STATE_MOUSE_IN, EWL_STATE_TRANSIENT, ewl_widget_state_has, ewl_widget_state_remove, ewl_widget_state_set(), EWL_WIDGET_TYPE, INSET_HORIZONTAL, INSET_LEFT, INSET_TOP, INSET_VERTICAL, Ewl_Event_Mouse::modifiers, Ewl_Event_Mouse::x, and Ewl_Event_Mouse::y.
Referenced by ewl_widget_init().
| void ewl_widget_cb_obscure | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER, ewl_embed_dnd_aware_remove(), ewl_embed_object_cache(), ewl_embed_widget_find(), EWL_FLAG_PROPERTY_DND_TARGET, EWL_FLAGS_PROPERTY_MASK, ewl_widget_flags_has, Ewl_Widget::parent, Ewl_Widget::smart_object, Ewl_Widget::swallowed, and Ewl_Widget::theme_object.
Referenced by ewl_widget_init().
| void ewl_widget_cb_realize | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_OBJECT, ewl_object_insets_get(), ewl_object_insets_set(), EWL_OBJECT_MAX_SIZE, ewl_object_maximum_h_set(), ewl_object_maximum_w_set(), EWL_OBJECT_MIN_SIZE, ewl_object_minimum_h_set(), ewl_object_minimum_w_set(), ewl_object_padding_get(), ewl_object_padding_set(), ewl_theme_data_str_get(), ewl_theme_image_get(), ewl_widget_reveal(), EWL_WIDGET_TYPE, IF_FREE, IF_RELEASE, MAXIMUM_H, MAXIMUM_W, MINIMUM_H, MINIMUM_W, Ewl_Widget::theme_group, Ewl_Widget::theme_object, and Ewl_Widget::theme_path.
Referenced by ewl_widget_init().
| void ewl_widget_cb_reparent | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_realize_request(), EWL_WIDGET_TYPE, Ewl_Widget::parent, REALIZED, and VISIBLE.
Referenced by ewl_widget_init().
| void ewl_widget_cb_reveal | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Embed::canvas, DCHECK_PARAM_PTR, DENTER_FUNCTION, Ewl_Pair_List::direct, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, DWARNING, ewl_attach_color_get, ewl_embed_dnd_aware_set(), ewl_embed_object_request(), ewl_embed_widget_find(), EWL_FLAG_PROPERTY_DND_TARGET, EWL_FLAG_VISIBLE_SMARTOBJ, EWL_FLAGS_PROPERTY_MASK, EWL_PAIR, EWL_STATE_TRANSIENT, ewl_widget_flags_get, ewl_widget_flags_has, EWL_WIDGET_SMART_NAME, ewl_widget_state_set(), Ewl_Pair::key, Ewl_Pair_List::len, Ewl_Pair_List::list, Ewl_Widget::parent, REVEALED, Ewl_Widget::smart_object, Ewl_Widget::swallowed, Ewl_Widget::theme_group, Ewl_Widget::theme_object, Ewl_Widget::theme_path, Ewl_Widget::theme_state, Ewl_Widget::theme_text, Ewl_Pair::value, and VISIBLE.
Referenced by ewl_widget_init().
| void ewl_widget_cb_show | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
| void ewl_widget_cb_unrealize | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DWARNING, EWL_OBJECT, ewl_object_insets_get(), ewl_object_insets_set(), ewl_object_padding_get(), ewl_object_padding_set(), EWL_WIDGET_TYPE, IF_RELEASE, Ewl_Widget::theme_group, Ewl_Widget::theme_object, and Ewl_Widget::theme_path.
Referenced by ewl_widget_init().
| void ewl_widget_smart_member_add | ( | Evas_Object * | obj, | |
| Evas_Object * | member | |||
| ) |
References DENTER_FUNCTION, DLEAVE_FUNCTION, and DLEVEL_STABLE.