Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

Etk_Object


Detailed Description

The Etk_Object class is the base class for all the objects and widgets of Etk.

Etk_Object implements advanced features such as inheritance, constructors/destructors, signals and properties.


Constructors/Destructors:
A new object can be created with etk_object_new(). For example:
 //Creates a new focusable slider, for the range [1.0 - 3.0] and with the initial value 2.0
 slider = etk_object_new(ETK_SLIDER_TYPE, "theme-group", "slider", "focusable", ETK_TRUE, "lower", 1.0, "upper", 3.0, "value", 2.0, NULL);
The first argument is the type of the object to create, followed by any number of property-name/property-value pairs, and terminated with NULL.
etk_object_new() automatically calls the corresponding constructors of the object, from the constructor of the base class to the constructor of the more derived class.

You can then destroy the object with etk_object_destroy(): it sets the weak-pointers of the object to NULL (see etk_object_weak_pointer_add()), emits the "destroyed" signal and queues the object for freeing. Thus, the destructors will only be called at the beginning of the next main loop iteration (from the destructor of the more derived class to the destructor of the ultimate base class). You should then not assume that etk_object_destroy() will directly call the destructors.

Signal concept:
Each object has a list of signals that can be connected to one or several callbacks. The callbacks connected to a signal will be automatically called when the signal is emitted with etk_signal_emit().
You can connect a callback to a signal of an object with etk_signal_connect(). For example:

 //Callback prototype
 void clicked_cb(Etk_Button *button, void *data);

 //Connects the callback "clicked_cb()" to the signal "clicked" of the button
 etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(clicked_cb), user_data);

You can also disconnect a callback from a signal of an object with etk_signal_disconnect(). For instance:

 //Disconnects the callback "clicked_cb()" from the signal "clicked"
 etk_signal_disconnect("clicked", ETK_OBJECT(button), ETK_CALLBACK(clicked_cb));

Each object inherits the signals from its parent classes (for instance, an Etk_Button has the signals of Etk_Object, Etk_Widget, Etk_Container, Etk_Bin and Etk_Button). Each object's documentation page has a list of the object's signals with the associated callback prototype and a short explanation.
For more information about signals, see the documentation page of Etk_Signal.

Property concept:
Each object also has a list of properties. Each property has a specific type, a default value, and can be either readable, writable or both. You can set or get the value of a property with etk_object_properties_set() and etk_object_properties_set().

Another important point about the property system is that you can add a notification callback to a property. The callback will be called each time the value of the property is changed (i.e. each time etk_object_notify() is called on that property). This can be done with etk_object_notification_callback_add(). For example:

 //Notification callback prototype
 void value_changed_cb(Etk_Object *object, const char *property_name, void *data);

 //Adds a notification callback to the property "upper" of the slider.
 //It will be called when the upper bound of the slider is changed
 etk_object_notification_callback_add(ETK_OBJECT(slider), "upper", value_changed_cb, user_data);

Each object inherits the properties from its parent classes (for instance, an Etk_Button has the properties of Etk_Object, Etk_Widget, Etk_Container, Etk_Bin and Etk_Button).




Object Hierarchy:
  • Etk_Object
Signals:
  • "destroyed": Emitted when the object is destroyed, before all the destructors of the object are called. Since the destructors have not been called yet, the object should still be usable at this point.
    • Callback: Etk_Bool callback(Etk_Object *object, void *data)
      • object: the object which is about to be destroyed
      • data: the user data set when the callback has been connected to the signal
Properties:
  • "name": The name of the object
    • Type: String (char *)
    • Access: Read/Write
    • Default Value: NULL


Data Structures

struct  Etk_Notification_Callback
 A callback called each time the value of the associated property is modified. More...
struct  Etk_Object
 [Object] The base class for all the objects and widgets of Etk More...

Defines

#define ETK_OBJECT_TYPE   (etk_object_type_get())
#define ETK_OBJECT(obj)   (ETK_OBJECT_CAST((obj), ETK_OBJECT_TYPE, Etk_Object))
#define ETK_IS_OBJECT(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_OBJECT_TYPE))

Functions

Etk_Object * etk_object_new (Etk_Type *object_type, const char *first_property,...)
 Creates a new object: it calls the corresponding constructors (from the constructor of the base class to the constructor of the more derived class) and then sets the values of the given properties.
Etk_Object * etk_object_new_valist (Etk_Type *object_type, const char *first_property, va_list args)
 Creates a new object: it calls the corresponding constructors (from the constructor of the base class to the constructor of the more derived class) and then sets the values of the given properties.
void etk_object_destroy (Etk_Object *object)
 Destroys the object: it first sets the weak-pointers to NULL, emits the "destroyed" signal, and then queues the object in the list of objects to free. Thus, the destructors will only be called at the beginning of the next main loop iteration (from the destructor of the more derived class to the destructor of the ultimate base class).
void etk_object_name_set (Etk_Object *object, const char *name)
 Sets the name of the object. The object can then be retrieved from his name with etk_object_name_find().
const char * etk_object_name_get (Etk_Object *object)
 Gets the name of the object.
Etk_Object * etk_object_name_find (const char *name)
 Finds the object called name.
Etk_Object * etk_object_check_cast (Etk_Object *object, Etk_Type *type)
 Checks if object can be cast to type. If object doesn't inherit from type, a warning is displayed in the console but the object is returned anyway.
Etk_Type * etk_object_object_type_get (Etk_Object *object)
 Gets the type of the object.
void etk_object_weak_pointer_add (Etk_Object *object, void **pointer_location)
 Adds a weak-pointer to the object. A weak-pointer is a pointer that will be automatically set to NULL when the object is destroyed.
void etk_object_weak_pointer_remove (Etk_Object *object, void **pointer_location)
 Removes a weak-pointer from the object.
void etk_object_data_set (Etk_Object *object, const char *key, void *value)
 Associates a data pointer to a key. The pointer will be carried by the object and could be retrieved later with etk_object_data_get(). If the object already has an association for the given key, the old data will be destroyed.
void etk_object_data_set_full (Etk_Object *object, const char *key, void *value, void(*free_cb)(void *data))
 Associates a data pointer to a key. The pointer will be carried by the object and could be retrieved later with etk_object_data_get(). If the object already has an association for the given key, the old data will be destroyed.
void * etk_object_data_get (Etk_Object *object, const char *key)
 Gets the pointer associated to the given key.
void etk_object_property_reset (Etk_Object *object, const char *property_name)
 Resets the default value of a property.
void etk_object_properties_set (Etk_Object *object, const char *first_property,...)
 Sets the values of several properties.
void etk_object_properties_set_valist (Etk_Object *object, const char *first_property, va_list args)
 Sets the values of several properties.
void etk_object_properties_get (Etk_Object *object, const char *first_property,...)
 Gets the values of several properties.
void etk_object_properties_get_valist (Etk_Object *object, const char *first_property, va_list args)
 Gets the values of several properties.
void etk_object_notify (Etk_Object *object, const char *property_name)
 Calls the object's notification callbacks associated the given property. It should be called each time the value of a property is changed.
void etk_object_notification_callback_add (Etk_Object *object, const char *property_name, void(*callback)(Etk_Object *object, const char *property_name, void *data), void *data)
 Adds a notification callback associated to a property of the object. The callback will be called each time the value of the property is changed (i.e. each time etk_object_notify(object, property_name) is called).
void etk_object_notification_callback_remove (Etk_Object *object, const char *property_name, void(*callback)(Etk_Object *object, const char *property_name, void *data))
 Removes a notification callback associated to a property of the object.

Variables

int ETK_OBJECT_DESTROYED_SIGNAL
 Symbols for signals.
int ETK_OBJECT_DESTROYED_SIGNAL
 Symbols for signals.


Define Documentation

#define ETK_OBJECT_TYPE   (etk_object_type_get())

Gets the type of an object

#define ETK_OBJECT ( obj   )     (ETK_OBJECT_CAST((obj), ETK_OBJECT_TYPE, Etk_Object))

Casts the object to an Etk_Object

Referenced by etk_alignment_set(), etk_bin_child_set(), etk_box_homogeneous_set(), etk_box_spacing_set(), etk_button_alignment_set(), etk_button_click(), etk_button_image_set(), etk_button_label_set(), etk_button_press(), etk_button_release(), etk_button_stock_size_set(), etk_button_style_set(), etk_canvas_child_position_get(), etk_canvas_put(), etk_colorpicker_current_color_set(), etk_colorpicker_mode_set(), etk_colorpicker_use_alpha_set(), etk_combobox_active_item_set(), etk_combobox_build(), etk_combobox_entry_active_item_set(), etk_combobox_entry_item_field_set(), etk_combobox_entry_item_fields_set_valist(), etk_combobox_entry_item_insert_empty(), etk_combobox_entry_item_remove(), etk_combobox_entry_items_height_set(), etk_combobox_item_field_set(), etk_combobox_item_fields_set_valist(), etk_combobox_item_insert_empty(), etk_combobox_item_remove(), etk_combobox_items_height_set(), etk_container_border_width_set(), etk_dialog_action_area_alignment_set(), etk_dialog_action_area_homogeneous_set(), etk_dialog_button_response_id_get(), etk_dialog_button_response_id_set(), etk_dialog_has_separator_set(), etk_embed_new(), etk_entry_clear_button_add(), etk_entry_image_highlight_set(), etk_entry_image_set(), etk_entry_password_mode_set(), etk_entry_text_set(), etk_evas_object_set_object(), etk_filechooser_widget_show_hidden_set(), etk_frame_label_set(), etk_iconbox_append(), etk_iconbox_clear(), etk_iconbox_current_model_set(), etk_iconbox_icon_del(), etk_iconbox_icon_select(), etk_iconbox_icon_unselect(), etk_iconbox_model_geometry_set(), etk_iconbox_model_icon_geometry_set(), etk_iconbox_model_label_geometry_set(), etk_iconbox_select_all(), etk_iconbox_thaw(), etk_iconbox_unselect_all(), etk_image_aspect_ratio_set(), etk_image_keep_aspect_set(), etk_image_set_from_edje(), etk_image_set_from_evas_object(), etk_image_set_from_file(), etk_image_set_from_stock(), etk_label_alignment_set(), etk_mdi_area_child_position_get(), etk_mdi_area_put(), etk_mdi_window_decorated_set(), etk_mdi_window_delete_request(), etk_mdi_window_draggable_set(), etk_mdi_window_maximized_set(), etk_mdi_window_move(), etk_mdi_window_resizable_set(), etk_mdi_window_title_set(), etk_menu_item_activate(), etk_menu_item_label_set(), etk_menu_item_radio_group_set(), etk_menu_item_select(), etk_menu_item_submenu_set(), etk_menu_item_unselect(), etk_menu_shell_remove(), etk_message_dialog_buttons_set(), etk_message_dialog_message_type_set(), etk_notebook_page_child_set(), etk_notebook_page_remove(), etk_notebook_tabs_homogeneous_set(), etk_notebook_tabs_visible_set(), etk_object_name_find(), etk_paned_child1_set(), etk_paned_child2_set(), etk_paned_position_set(), etk_popup_window_popdown(), etk_popup_window_popup_at_xy(), etk_progress_bar_direction_set(), etk_progress_bar_fraction_set(), etk_progress_bar_pulse_step_set(), etk_progress_bar_text_set(), etk_radio_button_group_set(), etk_range_increments_set(), etk_range_page_size_set(), etk_range_range_set(), etk_range_value_set(), etk_scrolled_view_drag_bouncy_set(), etk_scrolled_view_drag_damping_set(), etk_scrolled_view_drag_sample_interval_set(), etk_scrolled_view_dragable_set(), etk_scrolled_view_policy_set(), etk_shadow_border_color_set(), etk_shadow_border_set(), etk_shadow_shadow_color_set(), etk_shadow_shadow_set(), etk_slider_inverted_set(), etk_slider_label_set(), etk_slider_update_policy_set(), etk_spinner_digits_set(), etk_spinner_snap_to_ticks_set(), etk_spinner_wrap_set(), etk_statusbar_context_id_get(), etk_statusbar_has_resize_grip_set(), etk_statusbar_message_pop(), etk_statusbar_message_push(), etk_statusbar_message_remove(), etk_string_insert_char(), etk_string_insert_sized(), etk_string_set_sized(), etk_string_truncate(), etk_table_attach(), etk_table_cell_clear(), etk_table_homogeneous_set(), etk_table_resize(), etk_textblock2_insert_markup(), etk_toolbar_orientation_set(), etk_toolbar_stock_size_set(), etk_toolbar_style_set(), etk_tooltips_pop_up(), etk_tooltips_tip_set(), etk_toplevel_focused_widget_set(), etk_tree_alternating_row_colors_set(), etk_tree_clear(), etk_tree_col_alignment_set(), etk_tree_col_expand_set(), etk_tree_col_min_width_set(), etk_tree_col_position_set(), etk_tree_col_resizable_set(), etk_tree_col_title_set(), etk_tree_col_visible_set(), etk_tree_col_width_set(), etk_tree_column_separators_visible_set(), etk_tree_headers_visible_set(), etk_tree_mode_set(), etk_tree_multiple_select_set(), etk_tree_row_delete(), etk_tree_row_fields_set_valist(), etk_tree_row_fold(), etk_tree_row_insert_valist(), etk_tree_row_model_fields_set_valist(), etk_tree_row_unfold(), etk_tree_row_unselect(), etk_tree_rows_height_set(), etk_tree_select_all(), etk_tree_thaw(), etk_tree_unselect_all(), etk_widget_color_set(), etk_widget_disabled_set(), etk_widget_enter(), etk_widget_focus(), etk_widget_focusable_set(), etk_widget_has_event_object_set(), etk_widget_hide(), etk_widget_internal_set(), etk_widget_leave(), etk_widget_padding_set(), etk_widget_parent_set(), etk_widget_pass_mouse_events_set(), etk_widget_propagate_color_set(), etk_widget_repeat_mouse_events_set(), etk_widget_show(), etk_widget_size_request_full(), etk_widget_size_request_set(), etk_widget_theme_file_set(), etk_widget_theme_group_set(), etk_widget_theme_parent_set(), etk_widget_theme_set(), etk_widget_unfocus(), etk_window_center_on_window(), etk_window_delete_request(), and etk_window_modal_for_window().

#define ETK_IS_OBJECT ( obj   )     (ETK_OBJECT_CHECK_TYPE((obj), ETK_OBJECT_TYPE))

Checks if the object is an Etk_Object

Referenced by etk_tooltips_pop_up().


Function Documentation

Etk_Object * etk_object_new ( Etk_Type *  object_type,
const char *  first_property,
  ... 
)

Creates a new object: it calls the corresponding constructors (from the constructor of the base class to the constructor of the more derived class) and then sets the values of the given properties.

Parameters:
object_type the type of object to create
first_property the name of the first property to set
... the value of the first property, followed by any number of property-name/property-value pairs, terminated with NULL
Returns:
Returns the new Etk_Object of type object_type

References etk_object_new_valist().

Referenced by etk_string_new(), etk_string_new_printf(), etk_string_new_sized(), etk_string_new_vprintf(), etk_textblock2_new(), etk_textblock_new(), and etk_tree_col_new().

Etk_Object * etk_object_new_valist ( Etk_Type *  object_type,
const char *  first_property,
va_list  args 
)

Creates a new object: it calls the corresponding constructors (from the constructor of the base class to the constructor of the more derived class) and then sets the values of the given properties.

Parameters:
object_type the type of object to create
first_property the name of the first property to set
args the value of the first property, followed by any number of property-name/property-value pairs, terminated with NULL
Returns:
Returns the new Etk_Object of type object_type

References etk_object_properties_set_valist(), etk_type_object_construct(), type, and Etk_Type::type_size.

Referenced by etk_object_new(), and etk_widget_new().

void etk_object_destroy ( Etk_Object *  object  ) 

Destroys the object: it first sets the weak-pointers to NULL, emits the "destroyed" signal, and then queues the object in the list of objects to free. Thus, the destructors will only be called at the beginning of the next main loop iteration (from the destructor of the more derived class to the destructor of the ultimate base class).

Parameters:
object the object to destroy
Warning:
You should not assume that this function will call directly the destructors of the object!

References destroy_me, ETK_OBJECT_DESTROYED_SIGNAL, etk_object_name_set(), etk_signal_emit(), and weak_pointers.

Referenced by etk_button_style_set(), etk_combobox_entry_item_field_set(), etk_combobox_entry_item_fields_set_valist(), etk_combobox_entry_item_remove(), etk_combobox_item_field_set(), etk_combobox_item_fields_set_valist(), etk_combobox_item_remove(), etk_embed_new(), etk_entry_image_set(), etk_mdi_window_delete_request(), etk_message_dialog_buttons_set(), etk_notebook_page_remove(), etk_textblock2_insert_markup(), etk_toolbar_orientation_set(), etk_tooltips_pop_up(), and etk_window_delete_request().

void etk_object_name_set ( Etk_Object *  object,
const char *  name 
)

Sets the name of the object. The object can then be retrieved from his name with etk_object_name_find().

Parameters:
object an object
name the name to set
See also:
etk_object_name_find()

References destroy_me, etk_object_name_find(), etk_object_notify(), and name.

Referenced by etk_object_destroy().

const char * etk_object_name_get ( Etk_Object *  object  ) 

Gets the name of the object.

Parameters:
object a object
Returns:
Returns the name of the object

References destroy_me.

Etk_Object * etk_object_name_find ( const char *  name  ) 

Finds the object called name.

Parameters:
name the name of the object to find
Returns:
Returns the object called name

References ETK_OBJECT.

Referenced by etk_object_name_set().

Etk_Object * etk_object_check_cast ( Etk_Object *  object,
Etk_Type *  type 
)

Checks if object can be cast to type. If object doesn't inherit from type, a warning is displayed in the console but the object is returned anyway.

Parameters:
object the object to cast
type the type to which we cast the object
Returns:
Returns the object
Note:
You usually do not need to call this function, use specific macros instead (ETK_IS_WIDGET() for example)

References etk_type_inherits_from(), etk_type_name_get(), ETK_WARNING, and type.

Etk_Type * etk_object_object_type_get ( Etk_Object *  object  ) 

Gets the type of the object.

Parameters:
object an object
Returns:
Returns the type of object (NULL on failure)

Referenced by etk_signal_block(), etk_signal_block_scb(), etk_signal_connect_full_by_name(), etk_signal_disconnect_all(), etk_signal_emit_by_name(), etk_signal_unblock(), and etk_signal_unblock_scb().

void etk_object_weak_pointer_add ( Etk_Object *  object,
void **  pointer_location 
)

Adds a weak-pointer to the object. A weak-pointer is a pointer that will be automatically set to NULL when the object is destroyed.

Parameters:
object an object
pointer_location the location of the weak-pointer
Warning:
if the pointer_location is not accessible when the object is destroyed, it may segfaults. So you have to use etk_object_weak_pointer_remove() when pointer_location becomes inaccessible
See also:
etk_object_weak_pointer_remove()

References destroy_me, and weak_pointers.

Referenced by etk_signal_emit_valist(), and etk_window_center_on_window().

void etk_object_weak_pointer_remove ( Etk_Object *  object,
void **  pointer_location 
)

Removes a weak-pointer from the object.

Parameters:
object an object
pointer_location the location of the weak-pointer to remove
See also:
etk_object_weak_pointer_add()

References weak_pointers.

Referenced by etk_signal_emit_valist(), and etk_window_center_on_window().

void etk_object_data_set ( Etk_Object *  object,
const char *  key,
void *  value 
)

Associates a data pointer to a key. The pointer will be carried by the object and could be retrieved later with etk_object_data_get(). If the object already has an association for the given key, the old data will be destroyed.

Parameters:
object the object which the data will be added to
key the key to associate to the data
value the value of the data
Note:
If you want the data to be freed when the object is destroyed or when the value is changed, use etk_object_data_set_full() instead.

References etk_object_data_set_full().

Referenced by etk_canvas_put(), etk_combobox_build(), etk_mdi_area_put(), etk_table_attach(), and etk_table_cell_clear().

void etk_object_data_set_full ( Etk_Object *  object,
const char *  key,
void *  value,
void(*)(void *data)  free_cb 
)

Associates a data pointer to a key. The pointer will be carried by the object and could be retrieved later with etk_object_data_get(). If the object already has an association for the given key, the old data will be destroyed.

Parameters:
object the object which the data will be added to
key the key to associate to the data
value the value of the data
free_cb the function to call on value when the object is destroyed or when the value is changed

References data_hash.

Referenced by etk_dialog_button_response_id_set(), etk_object_data_set(), and etk_statusbar_context_id_get().

void * etk_object_data_get ( Etk_Object *  object,
const char *  key 
)

Gets the pointer associated to the given key.

Parameters:
object the object which has the data
key the key associated to the data
Returns:
Returns the associated pointer, NULL on failure

References data_hash.

Referenced by etk_canvas_child_position_get(), etk_dialog_button_response_id_get(), etk_mdi_area_child_position_get(), and etk_statusbar_context_id_get().

void etk_object_property_reset ( Etk_Object *  object,
const char *  property_name 
)

Resets the default value of a property.

Parameters:
object the object that has the property to reset
property_name the name of the property to reset

References Etk_Property::default_value, etk_type_property_find(), Etk_Property::id, Etk_Type::property_set, and type.

void etk_object_properties_set ( Etk_Object *  object,
const char *  first_property,
  ... 
)

Sets the values of several properties.

Parameters:
object the object that has the properties
first_property the name of the first property value
... the value of the first property, followed by any number of property-name/property-value pairs, terminated with NULL

References etk_object_properties_set_valist().

Referenced by etk_embed_new().

void etk_object_properties_set_valist ( Etk_Object *  object,
const char *  first_property,
va_list  args 
)

Sets the values of several properties.

Parameters:
object the object that has the properties
first_property the name of the first property value
args the value of the first property, followed by any number of property-name/property-value pairs, terminated with NULL

References etk_property_type_get(), etk_property_value_create_valist(), etk_property_value_delete(), etk_type_property_find(), ETK_WARNING, Etk_Property::id, Etk_Type::name, Etk_Type::property_set, and type.

Referenced by etk_object_new_valist(), and etk_object_properties_set().

void etk_object_properties_get ( Etk_Object *  object,
const char *  first_property,
  ... 
)

Gets the values of several properties.

Parameters:
object the object that has the properties
first_property the name of the first property value
... the value of the first property, followed by any number of property-name/property-value-location pairs, terminated with NULL

References etk_object_properties_get_valist().

void etk_object_properties_get_valist ( Etk_Object *  object,
const char *  first_property,
va_list  args 
)

Gets the values of several properties.

Parameters:
object the object that has the properties
first_property the name of the first property value
args the value of the first property, followed by any number of property-name/property-value-location pairs, terminated with NULL

References etk_property_value_delete(), etk_property_value_get(), etk_property_value_new(), etk_property_value_type_get(), etk_type_property_find(), ETK_WARNING, Etk_Property::id, Etk_Type::name, Etk_Type::property_get, and type.

Referenced by etk_object_properties_get().

void etk_object_notify ( Etk_Object *  object,
const char *  property_name 
)

Calls the object's notification callbacks associated the given property. It should be called each time the value of a property is changed.

Parameters:
object an object
property_name the name of the property
Note:
This function is mainly used in object implementations, you usually don't have to call it yourself </i> page)

References Etk_Notification_Callback::callback, Etk_Notification_Callback::data, Etk_Notification_Callback::delete_me, notification_callbacks, notifying, and should_delete_cbs.

Referenced by etk_alignment_set(), etk_bin_child_set(), etk_box_homogeneous_set(), etk_box_spacing_set(), etk_button_alignment_set(), etk_button_image_set(), etk_button_label_set(), etk_button_stock_size_set(), etk_button_style_set(), etk_colorpicker_mode_set(), etk_colorpicker_use_alpha_set(), etk_combobox_active_item_set(), etk_combobox_entry_active_item_set(), etk_combobox_entry_items_height_set(), etk_combobox_items_height_set(), etk_container_border_width_set(), etk_dialog_action_area_alignment_set(), etk_dialog_action_area_homogeneous_set(), etk_dialog_has_separator_set(), etk_embed_new(), etk_entry_password_mode_set(), etk_evas_object_set_object(), etk_filechooser_widget_show_hidden_set(), etk_frame_label_set(), etk_image_aspect_ratio_set(), etk_image_keep_aspect_set(), etk_image_set_from_edje(), etk_image_set_from_evas_object(), etk_image_set_from_file(), etk_image_set_from_stock(), etk_label_alignment_set(), etk_mdi_window_decorated_set(), etk_mdi_window_draggable_set(), etk_mdi_window_maximized_set(), etk_mdi_window_resizable_set(), etk_mdi_window_title_set(), etk_menu_item_label_set(), etk_menu_item_radio_group_set(), etk_menu_item_submenu_set(), etk_message_dialog_buttons_set(), etk_message_dialog_message_type_set(), etk_notebook_tabs_homogeneous_set(), etk_notebook_tabs_visible_set(), etk_object_name_set(), etk_paned_position_set(), etk_progress_bar_direction_set(), etk_progress_bar_fraction_set(), etk_progress_bar_pulse_step_set(), etk_progress_bar_text_set(), etk_radio_button_group_set(), etk_range_increments_set(), etk_range_page_size_set(), etk_range_range_set(), etk_range_value_set(), etk_scrolled_view_drag_bouncy_set(), etk_scrolled_view_drag_damping_set(), etk_scrolled_view_drag_sample_interval_set(), etk_scrolled_view_dragable_set(), etk_scrolled_view_policy_set(), etk_shadow_border_color_set(), etk_shadow_border_set(), etk_shadow_shadow_color_set(), etk_shadow_shadow_set(), etk_slider_inverted_set(), etk_slider_label_set(), etk_slider_update_policy_set(), etk_spinner_digits_set(), etk_spinner_snap_to_ticks_set(), etk_spinner_wrap_set(), etk_statusbar_has_resize_grip_set(), etk_statusbar_message_pop(), etk_statusbar_message_push(), etk_statusbar_message_remove(), etk_string_insert_char(), etk_string_insert_sized(), etk_string_set_sized(), etk_string_truncate(), etk_table_homogeneous_set(), etk_table_resize(), etk_toolbar_orientation_set(), etk_toolbar_stock_size_set(), etk_toolbar_style_set(), etk_toplevel_focused_widget_set(), etk_tree_alternating_row_colors_set(), etk_tree_col_alignment_set(), etk_tree_col_expand_set(), etk_tree_col_min_width_set(), etk_tree_col_position_set(), etk_tree_col_resizable_set(), etk_tree_col_title_set(), etk_tree_col_visible_set(), etk_tree_col_width_set(), etk_tree_column_separators_visible_set(), etk_tree_headers_visible_set(), etk_tree_mode_set(), etk_tree_multiple_select_set(), etk_tree_rows_height_set(), etk_widget_color_set(), etk_widget_disabled_set(), etk_widget_focusable_set(), etk_widget_has_event_object_set(), etk_widget_hide(), etk_widget_internal_set(), etk_widget_padding_set(), etk_widget_parent_set(), etk_widget_pass_mouse_events_set(), etk_widget_propagate_color_set(), etk_widget_repeat_mouse_events_set(), etk_widget_show(), etk_widget_size_request_set(), etk_widget_theme_file_set(), etk_widget_theme_group_set(), etk_widget_theme_parent_set(), and etk_widget_theme_set().

void etk_object_notification_callback_add ( Etk_Object *  object,
const char *  property_name,
void(*)(Etk_Object *object, const char *property_name, void *data)  callback,
void *  data 
)

Adds a notification callback associated to a property of the object. The callback will be called each time the value of the property is changed (i.e. each time etk_object_notify(object, property_name) is called).

Parameters:
object an object
property_name the name of the property
callback the callback function
data the data to pass to the callback

References Etk_Notification_Callback::callback, Etk_Notification_Callback::data, Etk_Notification_Callback::delete_me, and notification_callbacks.

Referenced by etk_mdi_area_put().

void etk_object_notification_callback_remove ( Etk_Object *  object,
const char *  property_name,
void(*)(Etk_Object *object, const char *property_name, void *data)  callback 
)

Removes a notification callback associated to a property of the object.

Parameters:
object an object
property_name the name of the property
callback the callback function to remove

References Etk_Notification_Callback::callback, Etk_Notification_Callback::data, Etk_Notification_Callback::delete_me, notification_callbacks, and notifying.


Variable Documentation

int ETK_OBJECT_DESTROYED_SIGNAL

Symbols for signals.

Referenced by etk_object_destroy().

int ETK_OBJECT_DESTROYED_SIGNAL

Symbols for signals.

Referenced by etk_object_destroy().