From 3314ac30f127e43d279b4e4384ee98389c4b137a Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 12 May 2014 08:29:43 +1000 Subject: Move poor mans introspection into winFang.c, and use it in purkle. --- src/libraries/winFang.h | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'src/libraries/winFang.h') diff --git a/src/libraries/winFang.h b/src/libraries/winFang.h index 1bdef20..edec11b 100644 --- a/src/libraries/winFang.h +++ b/src/libraries/winFang.h @@ -8,6 +8,8 @@ /* Enable access to unstable EFL EO API. */ #define EFL_EO_API_SUPPORT 1 +#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(*array)) + #include #include @@ -24,6 +26,29 @@ #define WF_SWALLOW "winFang/content" +typedef struct _widgetSpec +{ + char *name; + const Eo_Class *klass; +} widgetSpec; + +#define WT_CHECK "check" +#define WT_BOX "box" +#define WT_BUTTON "button" +#define WT_FILES "files" +#define WT_ENTRY "entry" +#define WT_GRID "grid" +#define WT_HOVER "hoversel" +#define WT_IMAGE "image" +#define WT_LABEL "label" +#define WT_LAYOUT "layout" +#define WT_RADIO "radio" +#define WT_RECT "rectangle" +#define WT_TEXT "text" +#define WT_TEXTBOX "textbox" +#define WT_TOOLBAR "toolbar" + + typedef struct _winFang { Evas *e; @@ -48,6 +73,7 @@ typedef struct _winFang typedef struct _Widget { char magic[8]; + char type[16]; Evas_Object *obj; char *label, *look, *action, *help; @@ -67,6 +93,7 @@ void winFangShow(winFang *win); void winFangCalcMinSize(winFang *win); void winFangDel(winFang *win); -Widget *widgetAdd(winFang *win, const Eo_Class *klass, char *title, int x, int y, int w, int h); +Widget *widgetAdd(winFang *win, char *type, char *title, int x, int y, int w, int h); +void widgetDel(Widget *wid); #endif -- cgit v1.1