summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorperepelits.m <perepelits.m@samsung.com>2014-11-14 07:06:00 +0100
committerCedric BAIL <cedric@osg.samsung.com>2014-11-14 07:07:25 +0100
commitc59fba68de29dc106471e11b205e34b12954ec7b (patch)
tree5fff1f0a2cf73bcdace8b7f1f8482817905eba94 /src/lib/edje
parent3b9f8b2648241910bc2bb4d3bad5dace76549685 (diff)
edje, evas: add of new structures
Summary: Preparation for the 3d edc adding. Reviewers: raster, Hermet, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1555 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/Edje_Common.h6
-rw-r--r--src/lib/edje/edje_private.h173
2 files changed, 175 insertions, 4 deletions
diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h
index 1051f2e039..8ad817f758 100644
--- a/src/lib/edje/Edje_Common.h
+++ b/src/lib/edje/Edje_Common.h
@@ -1289,8 +1289,10 @@ typedef enum _Edje_Part_Type
1289 EDJE_PART_TYPE_EXTERNAL = 10, /**< External type value */ 1289 EDJE_PART_TYPE_EXTERNAL = 10, /**< External type value */
1290 EDJE_PART_TYPE_PROXY = 11, /**< Proxy type value */ 1290 EDJE_PART_TYPE_PROXY = 11, /**< Proxy type value */
1291 EDJE_PART_TYPE_SPACER = 12, /**< Spacer type value @since 1.7 */ 1291 EDJE_PART_TYPE_SPACER = 12, /**< Spacer type value @since 1.7 */
1292 EDJE_PART_TYPE_LAST = 13 /**< Last type value */ 1292 EDJE_PART_TYPE_MESH_NODE = 13,
1293 1293 EDJE_PART_TYPE_LIGHT = 14,
1294 EDJE_PART_TYPE_CAMERA = 15,
1295 EDJE_PART_TYPE_LAST = 16 /**< Last type value */
1294} Edje_Part_Type; 1296} Edje_Part_Type;
1295/** 1297/**
1296 * @} 1298 * @}
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 49ac1cc83f..32c5506507 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -223,6 +223,11 @@ struct _Edje_Color
223 unsigned char r, g, b, a; 223 unsigned char r, g, b, a;
224}; 224};
225 225
226struct _Edje_Float_Color
227{
228 FLOAT_T r, g, b, a;
229};
230
226struct _Edje_Map_Color 231struct _Edje_Map_Color
227{ 232{
228 int idx; 233 int idx;
@@ -250,16 +255,32 @@ struct _Edje_String
250 unsigned int id; 255 unsigned int id;
251}; 256};
252 257
258struct _Edje_3D_Vec {
259 FLOAT_T x;
260 FLOAT_T y;
261 FLOAT_T z;
262};
263
264struct _Edje_3D_Int_Vec {
265 int x;
266 int y;
267 int z;
268};
269
253typedef struct _Edje_Position_Scale Edje_Alignment; 270typedef struct _Edje_Position_Scale Edje_Alignment;
254typedef struct _Edje_Position_Scale Edje_Position_Scale; 271typedef struct _Edje_Position_Scale Edje_Position_Scale;
255typedef struct _Edje_Position Edje_Position; 272typedef struct _Edje_Position Edje_Position;
256typedef struct _Edje_Size Edje_Size; 273typedef struct _Edje_Size Edje_Size;
257typedef struct _Edje_Rectangle Edje_Rectangle; 274typedef struct _Edje_Rectangle Edje_Rectangle;
258typedef struct _Edje_Color Edje_Color; 275typedef struct _Edje_Color Edje_Color;
276typedef struct _Edje_Float_Color Edje_Float_Color;
259typedef struct _Edje_Map_Color Edje_Map_Color; 277typedef struct _Edje_Map_Color Edje_Map_Color;
260typedef struct _Edje_Aspect_Prefer Edje_Aspect_Prefer; 278typedef struct _Edje_Aspect_Prefer Edje_Aspect_Prefer;
261typedef struct _Edje_Aspect Edje_Aspect; 279typedef struct _Edje_Aspect Edje_Aspect;
262typedef struct _Edje_String Edje_String; 280typedef struct _Edje_String Edje_String;
281typedef struct _Edje_3D_Vec Edje_3D_Vec;
282typedef struct _Edje_3D_Int_Vec Edje_3D_Int_Vec;
283typedef struct _AABB AABB;
263 284
264typedef struct _Edje_File Edje_File; 285typedef struct _Edje_File Edje_File;
265typedef struct _Edje_Style Edje_Style; 286typedef struct _Edje_Style Edje_Style;
@@ -271,6 +292,8 @@ typedef struct _Edje_Image_Directory Edje_Image_Directory;
271typedef struct _Edje_Image_Directory_Entry Edje_Image_Directory_Entry; 292typedef struct _Edje_Image_Directory_Entry Edje_Image_Directory_Entry;
272typedef struct _Edje_Image_Directory_Set Edje_Image_Directory_Set; 293typedef struct _Edje_Image_Directory_Set Edje_Image_Directory_Set;
273typedef struct _Edje_Image_Directory_Set_Entry Edje_Image_Directory_Set_Entry; 294typedef struct _Edje_Image_Directory_Set_Entry Edje_Image_Directory_Set_Entry;
295typedef struct _Edje_Model_Directory Edje_Model_Directory;
296typedef struct _Edje_Model_Directory_Entry Edje_Model_Directory_Entry;
274typedef struct _Edje_Limit Edje_Limit; 297typedef struct _Edje_Limit Edje_Limit;
275typedef struct _Edje_Plugin Edje_Plugin; 298typedef struct _Edje_Plugin Edje_Plugin;
276typedef struct _Edje_Sound_Sample Edje_Sound_Sample; 299typedef struct _Edje_Sound_Sample Edje_Sound_Sample;
@@ -294,6 +317,9 @@ typedef struct _Edje_Part_Description_Text Edje_Part_Description_Text;
294typedef struct _Edje_Part_Description_Box Edje_Part_Description_Box; 317typedef struct _Edje_Part_Description_Box Edje_Part_Description_Box;
295typedef struct _Edje_Part_Description_Table Edje_Part_Description_Table; 318typedef struct _Edje_Part_Description_Table Edje_Part_Description_Table;
296typedef struct _Edje_Part_Description_External Edje_Part_Description_External; 319typedef struct _Edje_Part_Description_External Edje_Part_Description_External;
320typedef struct _Edje_Part_Description_Mesh_Node Edje_Part_Description_Mesh_Node;
321typedef struct _Edje_Part_Description_Light Edje_Part_Description_Light;
322typedef struct _Edje_Part_Description_Camera Edje_Part_Description_Camera;
297typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common; 323typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common;
298typedef struct _Edje_Part_Description_Spec_Fill Edje_Part_Description_Spec_Fill; 324typedef struct _Edje_Part_Description_Spec_Fill Edje_Part_Description_Spec_Fill;
299typedef struct _Edje_Part_Description_Spec_Border Edje_Part_Description_Spec_Border; 325typedef struct _Edje_Part_Description_Spec_Border Edje_Part_Description_Spec_Border;
@@ -302,6 +328,9 @@ typedef struct _Edje_Part_Description_Spec_Proxy Edje_Part_Description_Spec_
302typedef struct _Edje_Part_Description_Spec_Text Edje_Part_Description_Spec_Text; 328typedef struct _Edje_Part_Description_Spec_Text Edje_Part_Description_Spec_Text;
303typedef struct _Edje_Part_Description_Spec_Box Edje_Part_Description_Spec_Box; 329typedef struct _Edje_Part_Description_Spec_Box Edje_Part_Description_Spec_Box;
304typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_Table; 330typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_Table;
331typedef struct _Edje_Part_Description_Spec_Mesh_Node Edje_Part_Description_Spec_Mesh_Node;
332typedef struct _Edje_Part_Description_Spec_Light Edje_Part_Description_Spec_Light;
333typedef struct _Edje_Part_Description_Spec_Camera Edje_Part_Description_Spec_Camera;
305typedef struct _Edje_Physics_Face Edje_Physics_Face; 334typedef struct _Edje_Physics_Face Edje_Physics_Face;
306typedef struct _Edje_Patterns Edje_Patterns; 335typedef struct _Edje_Patterns Edje_Patterns;
307typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation; 336typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation;
@@ -458,6 +487,12 @@ typedef struct _Edje_Signal_Callback_Custom Edje_Signal_Callback_Custom;
458 487
459/*----------*/ 488/*----------*/
460 489
490struct _AABB {
491 Edje_3D_Vec relative;
492 Edje_3D_Int_Vec offset;
493 int rel_to;
494};
495
461struct _Edje_File 496struct _Edje_File
462{ 497{
463 const char *path; 498 const char *path;
@@ -465,6 +500,7 @@ struct _Edje_File
465 500
466 Edje_External_Directory *external_dir; 501 Edje_External_Directory *external_dir;
467 Edje_Image_Directory *image_dir; 502 Edje_Image_Directory *image_dir;
503 Edje_Model_Directory *model_dir;
468 Edje_Sound_Directory *sound_dir; 504 Edje_Sound_Directory *sound_dir;
469 Edje_Vibration_Directory *vibration_dir; 505 Edje_Vibration_Directory *vibration_dir;
470 506
@@ -588,6 +624,19 @@ struct _Edje_Image_Directory_Set_Entry
588 } border; 624 } border;
589}; 625};
590 626
627struct _Edje_Model_Directory
628{
629 Edje_Model_Directory_Entry *entries; /* an array of Edje_Model_Directory_Entry */
630 unsigned int entries_count;
631};
632
633struct _Edje_Model_Directory_Entry
634{
635 const char *entry; /* the nominal name of the model - if any */
636 int source_type; /* alternate source mode. 0 = none */
637 int id; /* the id no. of the image */
638};
639
591struct _Edje_Sound_Sample /*Sound Sample*/ 640struct _Edje_Sound_Sample /*Sound Sample*/
592{ 641{
593 const char *name; /* the nominal name of the sound */ 642 const char *name; /* the nominal name of the sound */
@@ -724,8 +773,11 @@ struct _Edje_Limit
724 TYPE GROUP; \ 773 TYPE GROUP; \
725 TYPE BOX; \ 774 TYPE BOX; \
726 TYPE TABLE; \ 775 TYPE TABLE; \
727 TYPE SPACER; \ 776 TYPE SPACER; \
728 TYPE EXTERNAL; 777 TYPE EXTERNAL; \
778 TYPE MESH_NODE; \
779 TYPE LIGHT; \
780 TYPE CAMERA;
729 781
730struct _Edje_Part_Collection_Directory_Entry 782struct _Edje_Part_Collection_Directory_Entry
731{ 783{
@@ -975,6 +1027,11 @@ struct _Edje_Part_Collection
975 unsigned char script_recursion; /* permits unsafe Embryo->EDC->Embryo scripting */ 1027 unsigned char script_recursion; /* permits unsafe Embryo->EDC->Embryo scripting */
976 1028
977 unsigned char checked : 1; 1029 unsigned char checked : 1;
1030
1031 struct {
1032 Evas_Real height;
1033 Evas_Real width;
1034 } scene_size;
978}; 1035};
979 1036
980struct _Edje_Part_Dragable 1037struct _Edje_Part_Dragable
@@ -1032,6 +1089,7 @@ struct _Edje_Part
1032 unsigned char repeat_events; /* it will repeat events to objects below */ 1089 unsigned char repeat_events; /* it will repeat events to objects below */
1033 Evas_Event_Flags ignore_flags; 1090 Evas_Event_Flags ignore_flags;
1034 unsigned char scale; /* should certain properties scale with edje scale factor? */ 1091 unsigned char scale; /* should certain properties scale with edje scale factor? */
1092 Edje_3D_Vec scale_3d;
1035 unsigned char precise_is_inside; 1093 unsigned char precise_is_inside;
1036 unsigned char use_alternate_font_metrics; 1094 unsigned char use_alternate_font_metrics;
1037 unsigned char pointer_mode; 1095 unsigned char pointer_mode;
@@ -1145,6 +1203,7 @@ struct _Edje_Part_Description_Common
1145 1203
1146 unsigned char visible; /* is it shown */ 1204 unsigned char visible; /* is it shown */
1147 unsigned char limit; /* 0 == no, 1 = width, 2 = height, 3 = both */ 1205 unsigned char limit; /* 0 == no, 1 = width, 2 = height, 3 = both */
1206 Edje_3D_Vec align_3d;
1148}; 1207};
1149 1208
1150struct _Edje_Part_Description_Spec_Fill 1209struct _Edje_Part_Description_Spec_Fill
@@ -1248,6 +1307,95 @@ struct _Edje_Part_Description_Spec_Table
1248 } min; 1307 } min;
1249}; 1308};
1250 1309
1310struct _Edje_Part_Description_Spec_Mesh_Node
1311{
1312 struct {
1313 Edje_Part_Image_Id **tweens;
1314 unsigned int tweens_count;
1315 int id;
1316
1317 Eina_Bool set;
1318
1319 Evas_3D_Mesh_Primitive primitive;
1320 Evas_3D_Vertex_Assembly assembly;
1321 } mesh;
1322
1323 struct {
1324 Edje_Part_Image_Id **tweens;
1325 unsigned int tweens_count;
1326 int id;
1327
1328 Eina_Bool set;
1329
1330 Evas_3D_Shade_Mode shade;
1331 Evas_3D_Wrap_Mode wrap1;
1332 Evas_3D_Wrap_Mode wrap2;
1333 Evas_3D_Texture_Filter filter1;
1334 Evas_3D_Texture_Filter filter2;
1335 } texture;
1336
1337 struct {
1338 Edje_Float_Color ambient;
1339 Edje_Float_Color diffuse;
1340 Edje_Float_Color specular;
1341 Eina_Bool normal;
1342 FLOAT_T shininess;
1343
1344 Evas_3D_Material_Attrib material_attrib;
1345 } properties;
1346
1347 AABB aabb1;
1348 AABB aabb2;
1349
1350 struct {
1351 Evas_Real angle;
1352 Edje_3D_Vec axis;
1353 } orientation;
1354
1355 struct {
1356 Edje_3D_Vec point;
1357
1358 unsigned char space;
1359 } position;
1360};
1361
1362struct _Edje_Part_Description_Spec_Light
1363{
1364 struct {
1365 Edje_Float_Color ambient;
1366 Edje_Float_Color diffuse;
1367 Edje_Float_Color specular;
1368 } properties;
1369
1370 struct {
1371 Edje_3D_Vec point;
1372
1373 unsigned char space;
1374 Edje_3D_Vec look1;
1375 Edje_3D_Vec look2;
1376 int look_to; /* -1 = whole part collection, or part ID */
1377 } position;
1378};
1379
1380struct _Edje_Part_Description_Spec_Camera
1381{
1382 struct {
1383 Evas_Real fovy;
1384 Evas_Real aspect;
1385 Evas_Real near;
1386 Evas_Real far;
1387 } camera;
1388
1389 struct {
1390 Edje_3D_Vec point;
1391 unsigned char space;
1392 Edje_3D_Vec look1;
1393 Edje_3D_Vec look2;
1394 int look_to; /* -1 = whole part collection, or part ID */
1395 } position;
1396};
1397
1398
1251struct _Edje_Part_Description_Image 1399struct _Edje_Part_Description_Image
1252{ 1400{
1253 Edje_Part_Description_Common common; 1401 Edje_Part_Description_Common common;
@@ -1284,6 +1432,24 @@ struct _Edje_Part_Description_External
1284 Eina_List *external_params; /* parameters for external objects */ 1432 Eina_List *external_params; /* parameters for external objects */
1285}; 1433};
1286 1434
1435struct _Edje_Part_Description_Mesh_Node
1436{
1437 Edje_Part_Description_Common common;
1438 Edje_Part_Description_Spec_Mesh_Node mesh_node;
1439};
1440
1441struct _Edje_Part_Description_Light
1442{
1443 Edje_Part_Description_Common common;
1444 Edje_Part_Description_Spec_Light light;
1445};
1446
1447struct _Edje_Part_Description_Camera
1448{
1449 Edje_Part_Description_Common common;
1450 Edje_Part_Description_Spec_Camera camera;
1451};
1452
1287/*----------*/ 1453/*----------*/
1288 1454
1289struct _Edje_Signal_Source_Char 1455struct _Edje_Signal_Source_Char
@@ -1971,6 +2137,9 @@ EAPI extern Eina_Mempool *_emp_BOX;
1971EAPI extern Eina_Mempool *_emp_TABLE; 2137EAPI extern Eina_Mempool *_emp_TABLE;
1972EAPI extern Eina_Mempool *_emp_EXTERNAL; 2138EAPI extern Eina_Mempool *_emp_EXTERNAL;
1973EAPI extern Eina_Mempool *_emp_SPACER; 2139EAPI extern Eina_Mempool *_emp_SPACER;
2140EAPI extern Eina_Mempool *_emp_MESH_NODE;
2141EAPI extern Eina_Mempool *_emp_LIGHT;
2142EAPI extern Eina_Mempool *_emp_CAMERA;
1974EAPI extern Eina_Mempool *_emp_part; 2143EAPI extern Eina_Mempool *_emp_part;
1975 2144
1976void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4); 2145void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4);