summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2012-11-26 13:08:53 +0200
committerYakov Goldberg <yakov.g@samsung.com>2012-11-26 13:08:53 +0200
commitb0eb005003038b2b689bed79d223ae05d852bf59 (patch)
tree1b4b18934725f51e4bde7dc388376f178db41dee
parentb689af240664e1d98c96c4ebd13269faff5be624 (diff)
typedefs added
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>
-rw-r--r--eoparser/cparser.py51
-rw-r--r--eoparser/data/types.xml52
-rw-r--r--eoparser/xmlparser.py6
3 files changed, 105 insertions, 4 deletions
diff --git a/eoparser/cparser.py b/eoparser/cparser.py
index 97ebe49..904b912 100644
--- a/eoparser/cparser.py
+++ b/eoparser/cparser.py
@@ -57,6 +57,57 @@ class Cparser(object):
57 "Evas_Load_Error" : "int", 57 "Evas_Load_Error" : "int",
58 "Elm_Photocam_Zoom_Mode" : "int", 58 "Elm_Photocam_Zoom_Mode" : "int",
59 "Eina_Bool" : "bool", 59 "Eina_Bool" : "bool",
60 "Elm_Bg_Option" : "int",
61 "Elm_Fileselector_Mode" : "int",
62 "Elm_Object_Select_Mode" : "int",
63 "Elm_Actionslider_Pos" : "int",
64 "Elm_Web_Zoom_Mode" : "int",
65 "Elm_Icon_Type" : "int",
66 "Elm_Colorselextor_Mode" : "int",
67 "Elm_List_Mode" : "int",
68 "Elm_Image_Orient" : "int",
69 "Elm_Map_Route_Type" : "int",
70 "Elm_Map_Zoom_Mode" : "int",
71 "Elm_Map_Source_Type" : "int",
72 "Elm_Clock_Edit_Mode" : "int",
73 "Elm_Dayselector_Day" : "int",
74 "Elm_Thumb_Animation_Setting" : "int",
75 "Elm_Win_Keyboard_Mode" : "int",
76 "Elm_Toolbar_Shrink_Mode" : "int",
77 "Elm_Icon_Lookup_Order" : "int",
78 "Elm_Datetime_Field_Type" : "int",
79 "Elm_Gesture_Type" : "int",
80 "Evas_BiDi_Direction" : "int",
81 "Elm_Bubble_Pos" : "int",
82 "Ecore_X_Window" : "unsigned int",
83
84 "Elm_Flip_Interaction" : "int",
85 "Elm_Flip_Direction" : "int",
86 "Elm_Flip_Interaction" : "int",
87 "Elm_Flip_Mode" : "int",
88 "Elm_Calendar_Weekday" : "int",
89 "Elm_Calendar_Selectable" : "int",
90 "Elm_Calendar_Weekday" : "int",
91 "Elm_Calendar_Select_Mode" : "int",
92 "Elm_Illume_Command" : "int",
93 "Elm_Win_Keyboard_Mode" : "int",
94 "Elm_Win_Indicator_Opacity_Mode" : "int",
95 "Elm_Win_Indicator_Mode" : "int",
96 "Ecore_Wl_Window" : "int",
97 "Elm_GLView_Render_Policy" : "int",
98 "Elm_GLView_Mode" : "int",
99 "Elm_Panel_Orient" : "int",
100 "Elm_Popup_Orient" : "int",
101 "Elm_Wrap_Type" : "int",
102 "Elm_Cnp_Mode" : "int",
103 "Elm_Input_Panel_Lang" : "int",
104 "Elm_Text_Format" : "int",
105 "Elm_Input_Panel_Return_Key_Type" : "int",
106 "Elm_Wrap_Type" : "int",
107 "Elm_Autocapital_Type" : "int",
108 "Elm_Text_Format" : "int",
109 "Elm_Object_Select_Mode" : "int",
110 "Elm_List_Mode" : "int",
60 "Eo_Callback_Priority": "short"} 111 "Eo_Callback_Priority": "short"}
61 112
62 113
diff --git a/eoparser/data/types.xml b/eoparser/data/types.xml
index 0e10568..3336bd8 100644
--- a/eoparser/data/types.xml
+++ b/eoparser/data/types.xml
@@ -27,4 +27,56 @@
27 <type from="Evas_Font_Hinting_Flags" to="int"/> 27 <type from="Evas_Font_Hinting_Flags" to="int"/>
28 <type from="Evas_Load_Error" to="int"/> 28 <type from="Evas_Load_Error" to="int"/>
29 <type from="Elm_Photocam_Zoom_Mode" to="int"/> 29 <type from="Elm_Photocam_Zoom_Mode" to="int"/>
30 <type from="Elm_Bg_Option" to="int"/>
31 <type from="Elm_Fileselector_Mode" to="int"/>
32 <type from="Elm_Object_Select_Mode" to="int"/>
33 <type from="Elm_Actionslider_Pos" to="int"/>
34 <type from="Elm_Web_Zoom_Mode" to="int"/>
35 <type from="Elm_Icon_Type" to="int"/>
36 <type from="Elm_Colorselector_Mode" to="int"/>
37 <type from="Elm_List_Mode" to="int"/>
38 <type from="Elm_Image_Orient" to="int"/>
39 <type from="Elm_Map_Route_Type" to="int"/>
40 <type from="Elm_Map_Zoom_Mode" to="int"/>
41 <type from="Elm_Map_Source_Type" to="int"/>
42 <type from="Elm_Clock_Edit_Mode" to="int"/>
43 <type from="Elm_Dayselector_Day" to="int"/>
44 <type from="Elm_Thumb_Animation_Setting" to="int"/>
45 <type from="Elm_Win_Keyboard_Mode" to="int"/>
46 <type from="Elm_Toolbar_Shrink_Mode" to="int"/>
47 <type from="Elm_Icon_Lookup_Order" to="int"/>
48 <type from="Elm_Datetime_Field_Type" to="int"/>
49 <type from="Elm_Gesture_Type" to="int"/>
50 <type from="Evas_BiDi_Direction" to="int"/>
51 <type from="Elm_Bubble_Pos" to="int"/>
52 <type from="Ecore_X_Window" to="unsigned int"/>
53
54 <type from="Elm_Flip_Interaction" to="int"/>
55 <type from="Elm_Flip_Direction" to="int"/>
56 <type from="Elm_Flip_Interaction" to="int"/>
57 <type from="Elm_Flip_Mode" to="int"/>
58 <type from="Elm_Calendar_Weekday" to="int"/>
59 <type from="Elm_Calendar_Selectable" to="int"/>
60 <type from="Elm_Calendar_Weekday" to="int"/>
61 <type from="Elm_Calendar_Select_Mode" to="int"/>
62 <type from="Elm_Illume_Command" to="int"/>
63 <type from="Elm_Win_Keyboard_Mode" to="int"/>
64 <type from="Elm_Win_Indicator_Opacity_Mode" to="int"/>
65 <type from="Elm_Win_Indicator_Mode" to="int"/>
66 <type from="Ecore_Wl_Window" to="int"/>
67 <type from="Elm_GLView_Render_Policy" to="int"/>
68 <type from="Elm_GLView_Mode" to="int"/>
69 <type from="Elm_Panel_Orient" to="int"/>
70 <type from="Elm_Popup_Orient" to="int"/>
71 <type from="Elm_Wrap_Type" to="int"/>
72 <type from="Elm_Cnp_Mode" to="int"/>
73 <type from="Elm_Input_Panel_Lang" to="int"/>
74 <type from="Elm_Text_Format" to="int"/>
75 <type from="Elm_Input_Panel_Return_Key_Type" to="int"/>
76 <type from="Elm_Wrap_Type" to="int"/>
77 <type from="Elm_Autocapital_Type" to="int"/>
78 <type from="Elm_Text_Format" to="int"/>
79 <type from="Elm_Object_Select_Mode" to="int"/>
80 <type from="Elm_List_Mode" to="int"/>
81
30</types> 82</types>
diff --git a/eoparser/xmlparser.py b/eoparser/xmlparser.py
index 187cc6f..2eea01d 100644
--- a/eoparser/xmlparser.py
+++ b/eoparser/xmlparser.py
@@ -134,10 +134,10 @@ class Visitor(object):
134 "unsigned long long": ["unsigned long long", "unsigned long long", "ToNumber"], 134 "unsigned long long": ["unsigned long long", "unsigned long long", "ToNumber"],
135 "unsigned long long*": ["unsigned long long", "unsigned long long", "ToNumber"], 135 "unsigned long long*": ["unsigned long long", "unsigned long long", "ToNumber"],
136 "float": ["float", "float", "ToNumber"], 136 "float": ["float", "float", "ToNumber"],
137 "double": ["double", "double", "ToNumber" ],
138 "long double": ["long double", "long double", "ToNumber"],
139 "float*": ["float", "float", "ToNumber"], 137 "float*": ["float", "float", "ToNumber"],
138 "double": ["double", "double", "ToNumber" ],
140 "double*": ["double", "double", "ToNumber" ], 139 "double*": ["double", "double", "ToNumber" ],
140 "long double": ["long double", "long double", "ToNumber"],
141 "long double*": ["long double", "long double", "ToNumber"], 141 "long double*": ["long double", "long double", "ToNumber"],
142 "Eo_Event_Description*":["long","long", "ToNumber"], 142 "Eo_Event_Description*":["long","long", "ToNumber"],
143 "Eo_Event_Cb":["Eo_Event_Cb","object", "ToNumber"] 143 "Eo_Event_Cb":["Eo_Event_Cb","object", "ToNumber"]
@@ -392,7 +392,6 @@ class JsVisitor(Visitor):
392 add_this_func = False 392 add_this_func = False
393 393
394 if not add_this_func: 394 if not add_this_func:
395 print "putting back funcs"
396 self.c_file.functions = list(functions_tmp_save) 395 self.c_file.functions = list(functions_tmp_save)
397 return 396 return
398 397
@@ -872,7 +871,6 @@ class PyVisitor(Visitor):
872 l = " cdef %s %s = <%s> _%s"%(c_t_internal, n, c_t_internal, n) 871 l = " cdef %s %s = <%s> _%s"%(c_t_internal, n, c_t_internal, n)
873 function_lines.append(l) 872 function_lines.append(l)
874 873
875
876 if c_t.find(c_t_internal) != -1 and c_t.replace(c_t_internal, "") == "*": 874 if c_t.find(c_t_internal) != -1 and c_t.replace(c_t_internal, "") == "*":
877 pass_params.append('&' + n) 875 pass_params.append('&' + n)
878 else: 876 else: