summaryrefslogtreecommitdiff
path: root/src/bin/egui_gui/props_helper.h
diff options
context:
space:
mode:
authorYossi Kantor <yossi.kantor@samsung.com>2014-10-28 15:29:01 +0200
committerYakov Goldberg <yakov.g@samsung.com>2014-11-02 11:35:35 +0200
commitd603e79de4884d891cf50f0d38d71c3d8a1b2fa4 (patch)
tree6eede2011a138ef8829ef9f16828e6d38ebc1119 /src/bin/egui_gui/props_helper.h
parente4085424b82b0f875cf66ac9540cfbda524ee2a8 (diff)
propview_data.h merged into props_helper.h
Diffstat (limited to 'src/bin/egui_gui/props_helper.h')
-rw-r--r--src/bin/egui_gui/props_helper.h75
1 files changed, 74 insertions, 1 deletions
diff --git a/src/bin/egui_gui/props_helper.h b/src/bin/egui_gui/props_helper.h
index eca69da..5c2cfec 100644
--- a/src/bin/egui_gui/props_helper.h
+++ b/src/bin/egui_gui/props_helper.h
@@ -3,10 +3,83 @@
3 3
4#include <Evas.h> 4#include <Evas.h>
5#include "gui_widget.h" 5#include "gui_widget.h"
6#include "propview_data.h"
7 6
8#define PROP_HOVERSEL_NONE_VALUE " " 7#define PROP_HOVERSEL_NONE_VALUE " "
9 8
9/* pass Gui_Widget or Item_Container_Item */
10#define IT_DATA_BUILD(type_v, wi) \
11 ({ \
12 It_Data *_it = calloc(1, sizeof(It_Data)); \
13 _it->type = type_v; \
14 if (type_v == ITEM_TYPE) \
15 {\
16 _it->item = (Item_Container_Item *) wi; \
17 }\
18 else \
19 { \
20 _it->wdg = (Gui_Widget *)(wi); \
21 }\
22 _it; \
23 })
24
25#define _STR_EDITOR "editor"
26
27typedef enum
28{
29 DESCRIPTION_TYPE, // description view
30 PROPERTY_TYPE, // properties view
31 CALLBACK_TYPE, // callback view
32 CONTENT_TYPE, // content view
33 ITEM_TYPE // content->item view
34} It_Data_Type;
35
36/* Struct to assosiate item with its data: widget and op_desc */
37typedef struct
38{
39 It_Data_Type type;
40 union
41 {
42 const Gui_Widget *wdg;
43 const Item_Container_Item *item;
44 };
45 union
46 {
47 /* Property and Content. */
48 struct
49 {
50 /* This Op_Desc is needed when we want to create empty property or content. */
51 /* For both: property and container. */
52 const Op_Desc *op_desc;
53 const Gui_Widget_Property *prop;
54 /* Index of content in container. */
55 int idx;
56 };
57 /* Callback */
58 Gui_Widget_Callback *cb;
59
60 /* Description */
61 char *desc;
62
63 };
64 Eo *box;
65} It_Data;
66
67/* Struct to assosiate item's value edit field with its data: item_data and par index */
68typedef struct
69{
70 It_Data *it_data;
71 int par_idx;
72} Par_Field_Data;
73
74typedef struct
75{
76 char* classname;
77 const Gui_Widget *wdg;
78} Classname_Data;
79
80void
81_it_data_free(void *data);
82
10Eo * 83Eo *
11props_entry_add(Eo *box, const char *str, Gui_Type t); 84props_entry_add(Eo *box, const char *str, Gui_Type t);
12 85