Elementary elm_widget.h: Removed trailing whitespaces.

SVN revision: 58246
This commit is contained in:
Daniel Juyung Seo 2011-04-01 08:05:24 +00:00
parent 76a75e6fa6
commit 3cc69929db
1 changed files with 22 additions and 22 deletions

View File

@ -5,33 +5,33 @@
* CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
* FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK IT * FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK IT
* AT RUNTIME * AT RUNTIME
* *
* How to make your own widget? like this: * How to make your own widget? like this:
* *
* #include <Elementary.h> * #include <Elementary.h>
* #include "elm_priv.h" * #include "elm_priv.h"
* *
* typedef struct _Widget_Data Widget_Data; * typedef struct _Widget_Data Widget_Data;
* *
* struct _Widget_Data * struct _Widget_Data
* { * {
* Evas_Object *sub; * Evas_Object *sub;
* // add any other widget data here too * // add any other widget data here too
* }; * };
* *
* static const char *widtype = NULL; * static const char *widtype = NULL;
* static void _del_hook(Evas_Object *obj); * static void _del_hook(Evas_Object *obj);
* static void _theme_hook(Evas_Object *obj); * static void _theme_hook(Evas_Object *obj);
* static void _disable_hook(Evas_Object *obj); * static void _disable_hook(Evas_Object *obj);
* static void _sizing_eval(Evas_Object *obj); * static void _sizing_eval(Evas_Object *obj);
* static void _on_focus_hook(void *data, Evas_Object *obj); * static void _on_focus_hook(void *data, Evas_Object *obj);
* *
* static const char SIG_CLICKED[] = "clicked"; * static const char SIG_CLICKED[] = "clicked";
* static const Evas_Smart_Cb_Description _signals[] = { * static const Evas_Smart_Cb_Description _signals[] = {
* {SIG_CLICKED, ""}, * {SIG_CLICKED, ""},
* {NULL, NULL} * {NULL, NULL}
* }; * };
* *
* static void * static void
* _del_hook(Evas_Object *obj) * _del_hook(Evas_Object *obj)
* { * {
@ -40,7 +40,7 @@
* // delete hook - on delete of object delete object struct etc. * // delete hook - on delete of object delete object struct etc.
* free(wd); * free(wd);
* } * }
* *
* static void * static void
* _on_focus_hook(void *data __UNUSED__, Evas_Object *obj) * _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
* { * {
@ -59,17 +59,17 @@
* evas_object_focus_set(wd->sub, EINA_FALSE); * evas_object_focus_set(wd->sub, EINA_FALSE);
* } * }
* } * }
* *
* static void * static void
* _theme_hook(Evas_Object *obj) * _theme_hook(Evas_Object *obj)
* { * {
* Widget_Data *wd = elm_widget_data_get(obj); * Widget_Data *wd = elm_widget_data_get(obj);
* if (!wd) return; * if (!wd) return;
* // handle change in theme/scale etc. * // handle change in theme/scale etc.
* elm_widget_theme_object_set(obj, wd->sub, "mywidget", "base", * elm_widget_theme_object_set(obj, wd->sub, "mywidget", "base",
* elm_widget_style_get(obj)); * elm_widget_style_get(obj));
* } * }
* *
* static void * static void
* _disable_hook(Evas_Object *obj) * _disable_hook(Evas_Object *obj)
* { * {
@ -81,7 +81,7 @@
* else * else
* edje_object_signal_emit(wd->sub, "elm,state,enabled", "elm"); * edje_object_signal_emit(wd->sub, "elm,state,enabled", "elm");
* } * }
* *
* static void * static void
* _sizing_eval(Evas_Object *obj) * _sizing_eval(Evas_Object *obj)
* { * {
@ -94,7 +94,7 @@
* evas_object_size_hint_min_set(obj, minw, minh); * evas_object_size_hint_min_set(obj, minw, minh);
* evas_object_size_hint_max_set(obj, maxw, maxh); * evas_object_size_hint_max_set(obj, maxw, maxh);
* } * }
* *
* // actual api to create your widget. add more to manipulate it as needed * // actual api to create your widget. add more to manipulate it as needed
* // mark your calls with EAPI to make them "external api" calls. * // mark your calls with EAPI to make them "external api" calls.
* EAPI Evas_Object * * EAPI Evas_Object *
@ -103,7 +103,7 @@
* Evas_Object *obj; * Evas_Object *obj;
* Evas *e; * Evas *e;
* Widget_Data *wd; * Widget_Data *wd;
* *
* // ALWAYS call this - this checks that your widget matches that of * // ALWAYS call this - this checks that your widget matches that of
* // elementary and that the api hasn't broken. if it has this returns * // elementary and that the api hasn't broken. if it has this returns
* // false and you need to handle this error gracefully * // false and you need to handle this error gracefully
@ -111,7 +111,7 @@
* *
* // standard widget setup and allocate wd, create obj given parent etc. * // standard widget setup and allocate wd, create obj given parent etc.
* ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL); * ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
* *
* // give it a type name and set up a mywidget type string if needed * // give it a type name and set up a mywidget type string if needed
* ELM_SET_WIDTYPE(widtype, "mywidget"); * ELM_SET_WIDTYPE(widtype, "mywidget");
* elm_widget_type_set(obj, "mywidget"); * elm_widget_type_set(obj, "mywidget");
@ -125,7 +125,7 @@
* elm_widget_disable_hook_set(obj, _disable_hook); * elm_widget_disable_hook_set(obj, _disable_hook);
* // this widget can focus (true means yes it can, false means it can't) * // this widget can focus (true means yes it can, false means it can't)
* elm_widget_can_focus_set(obj, EINA_TRUE); * elm_widget_can_focus_set(obj, EINA_TRUE);
* *
* // for this widget we will add 1 sub object that is an edje object * // for this widget we will add 1 sub object that is an edje object
* wd->sub = edje_object_add(e); * wd->sub = edje_object_add(e);
* // set the theme. this follows a scheme for group name like this: * // set the theme. this follows a scheme for group name like this:
@ -143,17 +143,17 @@
* // set this sub object as the "resize object". widgets get 1 resize * // set this sub object as the "resize object". widgets get 1 resize
* // object that is resized along with the object wrapper. * // object that is resized along with the object wrapper.
* elm_widget_resize_object_set(obj, wd->sub); * elm_widget_resize_object_set(obj, wd->sub);
* *
* // evaluate sizing of the widget (minimum size calc etc.). optional but * // evaluate sizing of the widget (minimum size calc etc.). optional but
* // not a bad idea to do here. it will get queued for later anyway * // not a bad idea to do here. it will get queued for later anyway
* _sizing_eval(obj); * _sizing_eval(obj);
* *
* // register the smart callback descriptions so we can have some runtime * // register the smart callback descriptions so we can have some runtime
* // info as to what the smart callback strings mean * // info as to what the smart callback strings mean
* evas_object_smart_callbacks_descriptions_set(obj, _signals); * evas_object_smart_callbacks_descriptions_set(obj, _signals);
* return obj; * return obj;
* } * }
* *
* // example - do "whatever" to the widget (here just emit a signal) * // example - do "whatever" to the widget (here just emit a signal)
* EAPI void * EAPI void
* elm_mywidget_whatever(Evas_Object *obj) * elm_mywidget_whatever(Evas_Object *obj)
@ -166,11 +166,11 @@
* // do whatever you like * // do whatever you like
* edje_object_signal_emit(wd->sub, "elm,state,action,whatever", "elm"); * edje_object_signal_emit(wd->sub, "elm,state,action,whatever", "elm");
* } * }
* *
* // you can add more - you need to see elementary's code to know how to * // you can add more - you need to see elementary's code to know how to
* // handle all cases. remember this api is not stable and may change. it's * // handle all cases. remember this api is not stable and may change. it's
* // internal * // internal
* *
*/ */
#ifndef ELM_INTERNAL_API_ARGESFSDFEFC #ifndef ELM_INTERNAL_API_ARGESFSDFEFC
@ -197,7 +197,7 @@ struct _Elm_Widget_Item
/* ef1 ~~ efl, el3 ~~ elm */ /* ef1 ~~ efl, el3 ~~ elm */
#define ELM_WIDGET_ITEM_MAGIC 0xef1e1301 #define ELM_WIDGET_ITEM_MAGIC 0xef1e1301
EINA_MAGIC; EINA_MAGIC;
Evas_Object *widget; /**< the owner widget that owns this item */ Evas_Object *widget; /**< the owner widget that owns this item */
Evas_Object *view; /**< the base view object */ Evas_Object *view; /**< the base view object */
const void *data; /**< item specific data */ const void *data; /**< item specific data */