summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYossi Kantor <yossi.kantor@samsung.com>2014-10-28 15:29:01 +0200
committerYossi Kantor <yossi.kantor@samsung.com>2014-10-28 15:30:08 +0200
commitabc3e7df4868d63593d567f85826f4635a96241c (patch)
tree6eede2011a138ef8829ef9f16828e6d38ebc1119
parent0338ff85f49d027655dc9111052a0bda8d421b88 (diff)
propview_data.h merged into props_helper.h
-rw-r--r--src/bin/egui_gui/cbview.c1
-rw-r--r--src/bin/egui_gui/contentview.c2
-rw-r--r--src/bin/egui_gui/descview.c1
-rw-r--r--src/bin/egui_gui/itemview.c1
-rw-r--r--src/bin/egui_gui/prop_layout.h3
-rw-r--r--src/bin/egui_gui/props_helper.h75
-rw-r--r--src/bin/egui_gui/propview_data.h82
7 files changed, 76 insertions, 89 deletions
diff --git a/src/bin/egui_gui/cbview.c b/src/bin/egui_gui/cbview.c
index d9b6cf6..c6daf33 100644
--- a/src/bin/egui_gui/cbview.c
+++ b/src/bin/egui_gui/cbview.c
@@ -6,7 +6,6 @@
6#include "egui_log.h" 6#include "egui_log.h"
7#include "props_helper.h" 7#include "props_helper.h"
8#include "egui_logic_private.h" 8#include "egui_logic_private.h"
9#include "propview_data.h"
10#include "cbview.h" 9#include "cbview.h"
11 10
12#include "elm_widget_container.h" 11#include "elm_widget_container.h"
diff --git a/src/bin/egui_gui/contentview.c b/src/bin/egui_gui/contentview.c
index 4a41a93..9ae4d4f 100644
--- a/src/bin/egui_gui/contentview.c
+++ b/src/bin/egui_gui/contentview.c
@@ -5,7 +5,7 @@
5#include "egui_log.h" 5#include "egui_log.h"
6#include "props_helper.h" 6#include "props_helper.h"
7#include "egui_logic_private.h" 7#include "egui_logic_private.h"
8#include "propview_data.h" 8
9#include "contentview.h" 9#include "contentview.h"
10 10
11#include "elm_widget_container.h" 11#include "elm_widget_container.h"
diff --git a/src/bin/egui_gui/descview.c b/src/bin/egui_gui/descview.c
index 3c23d3e..a191b3e 100644
--- a/src/bin/egui_gui/descview.c
+++ b/src/bin/egui_gui/descview.c
@@ -5,7 +5,6 @@
5#include "egui_log.h" 5#include "egui_log.h"
6#include "props_helper.h" 6#include "props_helper.h"
7#include "egui_logic_private.h" 7#include "egui_logic_private.h"
8#include "propview_data.h"
9#include "descview.h" 8#include "descview.h"
10 9
11#include "elm_widget_container.h" 10#include "elm_widget_container.h"
diff --git a/src/bin/egui_gui/itemview.c b/src/bin/egui_gui/itemview.c
index 6ee71c0..a7a7192 100644
--- a/src/bin/egui_gui/itemview.c
+++ b/src/bin/egui_gui/itemview.c
@@ -4,7 +4,6 @@
4#include "egui_log.h" 4#include "egui_log.h"
5 5
6#include "props_helper.h" 6#include "props_helper.h"
7#include "propview_data.h"
8#include "itemview.h" 7#include "itemview.h"
9#include "egui_logic_private.h" 8#include "egui_logic_private.h"
10 9
diff --git a/src/bin/egui_gui/prop_layout.h b/src/bin/egui_gui/prop_layout.h
index 2034b3c..ddc1e65 100644
--- a/src/bin/egui_gui/prop_layout.h
+++ b/src/bin/egui_gui/prop_layout.h
@@ -3,8 +3,7 @@
3#define _PROPLAYOUT_H 3#define _PROPLAYOUT_H
4 4
5#include <Eo.h> 5#include <Eo.h>
6 6#include "props_helper.h"
7#include "propview_data.h"
8 7
9void 8void
10proplayout_init(); 9proplayout_init();
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
diff --git a/src/bin/egui_gui/propview_data.h b/src/bin/egui_gui/propview_data.h
deleted file mode 100644
index 23a20ee..0000000
--- a/src/bin/egui_gui/propview_data.h
+++ /dev/null
@@ -1,82 +0,0 @@
1
2#ifndef _PROPVIEW_DATA_H
3#define _PROPVIEW_DATA_H
4
5#include <Eo.h>
6#include "gui_widget.h"
7
8/* pass Gui_Widget or Item_Container_Item */
9#define IT_DATA_BUILD(type_v, wi) \
10 ({ \
11 It_Data *_it = calloc(1, sizeof(It_Data)); \
12 _it->type = type_v; \
13 if (type_v == ITEM_TYPE) \
14 {\
15 _it->item = (Item_Container_Item *) wi; \
16 }\
17 else \
18 { \
19 _it->wdg = (Gui_Widget *)(wi); \
20 }\
21 _it; \
22 })
23
24#define _STR_EDITOR "editor"
25
26typedef enum
27{
28 DESCRIPTION_TYPE, // description view
29 PROPERTY_TYPE, // properties view
30 CALLBACK_TYPE, // callback view
31 CONTENT_TYPE, // content view
32 ITEM_TYPE // content->item view
33} It_Data_Type;
34
35/* Struct to assosiate item with its data: widget and op_desc */
36typedef struct
37{
38 It_Data_Type type;
39 union
40 {
41 const Gui_Widget *wdg;
42 const Item_Container_Item *item;
43 };
44 union
45 {
46 /* Property and Content. */
47 struct
48 {
49 /* This Op_Desc is needed when we want to create empty property or content. */
50 /* For both: property and container. */
51 const Op_Desc *op_desc;
52 const Gui_Widget_Property *prop;
53 /* Index of content in container. */
54 int idx;
55 };
56 /* Callback */
57 Gui_Widget_Callback *cb;
58
59 /* Description */
60 char *desc;
61
62 };
63 Eo *box;
64} It_Data;
65
66/* Struct to assosiate item's value edit field with its data: item_data and par index */
67typedef struct
68{
69 It_Data *it_data;
70 int par_idx;
71} Par_Field_Data;
72
73typedef struct
74{
75 char* classname;
76 const Gui_Widget *wdg;
77} Classname_Data;
78
79void
80_it_data_free(void *data);
81
82#endif