summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_private.h
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-12-07 17:14:15 +0900
committerHermet Park <hermetpark@gmail.com>2018-12-07 17:14:15 +0900
commit093e32a0fb9259023cfb581ed4b5f5baf8391b72 (patch)
tree831f32457445261d54ab6a82baf9602be2da82a7 /src/lib/evas/canvas/evas_vg_private.h
parentcfc66dd0bd8467e41b0d3584fc5e33f9497412b2 (diff)
evas vg: code refactoring.
keep internal variable and structre names consisteny. no logical changes.
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_private.h')
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h49
1 files changed, 24 insertions, 25 deletions
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index 95010c5c86..4652f9ac52 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -9,17 +9,14 @@ typedef struct _Efl_Canvas_Vg_Gradient_Data Efl_Canvas_Vg_Gradient_Data;
9typedef struct _Efl_Canvas_Vg_Interpolation Efl_Canvas_Vg_Interpolation; 9typedef struct _Efl_Canvas_Vg_Interpolation Efl_Canvas_Vg_Interpolation;
10typedef struct _Efl_Canvas_Vg_Object_Data Efl_Canvas_Vg_Object_Data; 10typedef struct _Efl_Canvas_Vg_Object_Data Efl_Canvas_Vg_Object_Data;
11 11
12typedef struct _Evas_Cache_Vg_Entry Evas_Cache_Vg_Entry; 12typedef struct _Vg_Cache
13typedef struct _Evas_Cache_Vg Evas_Cache_Vg;
14
15struct _Evas_Cache_Vg
16{ 13{
17 Eina_Hash *vg_hash; 14 Eina_Hash *vfd_hash;
18 Eina_Hash *active; 15 Eina_Hash *vg_entry_hash;
19 int ref; 16 int ref;
20}; 17} Vg_Cache;
21 18
22struct _Evas_Cache_Vg_Entry 19typedef struct _Vg_Cache_Entry
23{ 20{
24 char *hash_key; 21 char *hash_key;
25 Eina_Stringshare *file; 22 Eina_Stringshare *file;
@@ -28,27 +25,29 @@ struct _Evas_Cache_Vg_Entry
28 int h; 25 int h;
29 Efl_VG *root; 26 Efl_VG *root;
30 int ref; 27 int ref;
31}; 28} Vg_Cache_Entry;
32 29
33typedef struct _User_Vg_Entry 30// holds the vg tree info set by the user
31typedef struct _Vg_User_Entry
34{ 32{
35 int w; // current surface width 33 int w; // current surface width
36 int h; // current surface height 34 int h; // current surface height
37 Efl_VG *root; 35 Efl_VG *root;
38}User_Vg_Entry; // holds the vg tree info set by the user 36} Vg_User_Entry;
39 37
40struct _Efl_Canvas_Vg_Object_Data 38struct _Efl_Canvas_Vg_Object_Data
41{ 39{
42 Efl_VG *root; 40 Efl_VG *root;
43 Evas_Cache_Vg_Entry *vg_entry; 41 Vg_Cache_Entry *vg_entry;
44 User_Vg_Entry *user_entry; // holds the user set vg tree 42 Vg_User_Entry *user_entry; //holds the user set vg tree
45 Eina_Rect fill; 43 Eina_Rect fill;
46 Eina_Rect viewbox; 44 Eina_Rect viewbox;
47 unsigned int width, height; 45 unsigned int width, height;
48 Eina_Array cleanup; 46 Eina_Array cleanup;
49 double align_x, align_y; 47 double align_x, align_y;
50 Efl_Canvas_Vg_Fill_Mode fill_mode; 48 Efl_Canvas_Vg_Fill_Mode fill_mode;
51 Eina_Bool changed; 49
50 Eina_Bool changed : 1;
52}; 51};
53 52
54struct _Efl_Canvas_Vg_Node_Data 53struct _Efl_Canvas_Vg_Node_Data
@@ -59,7 +58,7 @@ struct _Efl_Canvas_Vg_Node_Data
59 Efl_Canvas_Vg_Node *mask; 58 Efl_Canvas_Vg_Node *mask;
60 Ector_Renderer *renderer; 59 Ector_Renderer *renderer;
61 60
62 Efl_VG *vg_obj; 61 Efl_VG *vg_obj; //...Not necessary!!
63 62
64 void (*render_pre)(Eo *obj, Eina_Matrix3 *parent, Ector_Surface *s, void *data, Efl_Canvas_Vg_Node_Data *nd); 63 void (*render_pre)(Eo *obj, Eina_Matrix3 *parent, Ector_Surface *s, void *data, Efl_Canvas_Vg_Node_Data *nd);
65 void *data; 64 void *data;
@@ -101,9 +100,9 @@ struct _Efl_Canvas_Vg_Interpolation
101 100
102void evas_cache_vg_init(void); 101void evas_cache_vg_init(void);
103void evas_cache_vg_shutdown(void); 102void evas_cache_vg_shutdown(void);
104Evas_Cache_Vg_Entry* evas_cache_vg_entry_find(const char *file, const char *key, int w, int h); 103Vg_Cache_Entry* evas_cache_vg_entry_find(const char *file, const char *key, int w, int h);
105Efl_VG* evas_cache_vg_tree_get(Evas_Cache_Vg_Entry *svg_entry); 104Efl_VG* evas_cache_vg_tree_get(Vg_Cache_Entry *svg_entry);
106void evas_cache_vg_entry_del(Evas_Cache_Vg_Entry *svg_entry); 105void evas_cache_vg_entry_del(Vg_Cache_Entry *svg_entry);
107Vg_File_Data * evas_cache_vg_file_info(const char *file, const char *key); 106Vg_File_Data * evas_cache_vg_file_info(const char *file, const char *key);
108 107
109Eina_Bool evas_vg_save_to_file(Vg_File_Data *evg_data, const char *file, const char *key, const char *flags); 108Eina_Bool evas_vg_save_to_file(Vg_File_Data *evg_data, const char *file, const char *key, const char *flags);