… | |
… | |
42 | #include "item.h" |
42 | #include "item.h" |
43 | #include "color.h" |
43 | #include "color.h" |
44 | |
44 | |
45 | struct element |
45 | struct element |
46 | { |
46 | { |
|
|
47 | enum |
|
|
48 | { |
47 | enum { element_point, element_polyline, element_polygon, element_circle, element_text, element_icon, element_image, element_arrows } type; |
49 | element_point, element_polyline, element_polygon, element_circle, element_text, element_icon, element_image, element_arrows |
|
|
50 | } type; |
48 | struct color color; |
51 | struct color color; |
49 | int text_size; |
52 | int text_size; |
50 | union { |
53 | union |
|
|
54 | { |
51 | struct element_point { |
55 | struct element_point |
|
|
56 | { |
52 | char stub; |
57 | char stub; |
53 | } point; |
58 | } point; |
54 | struct element_polyline |
59 | struct element_polyline |
55 | { |
60 | { |
56 | int width; |
61 | int width; |
… | |
… | |
58 | int dash_num; |
63 | int dash_num; |
59 | int offset; |
64 | int offset; |
60 | //unsigned char dash_table[4]; |
65 | //unsigned char dash_table[4]; |
61 | short dash_table[4]; |
66 | short dash_table[4]; |
62 | } polyline; |
67 | } polyline; |
63 | struct element_polygon { |
68 | struct element_polygon |
|
|
69 | { |
64 | char stub; |
70 | char stub; |
65 | } polygon; |
71 | } polygon; |
66 | struct element_circle { |
72 | struct element_circle |
|
|
73 | { |
67 | int width; |
74 | int width; |
68 | int radius; |
75 | int radius; |
69 | struct color background_color; |
76 | struct color background_color; |
70 | } circle; |
77 | } circle; |
71 | struct element_icon { |
78 | struct element_icon |
|
|
79 | { |
72 | char *src; |
80 | char *src; |
73 | int width; |
81 | int width; |
74 | int height; |
82 | int height; |
75 | int rotation; |
83 | int rotation; |
76 | } icon; |
84 | } icon; |
77 | struct element_text { |
85 | struct element_text |
|
|
86 | { |
78 | struct color background_color; |
87 | struct color background_color; |
79 | } text; |
88 | } text; |
80 | } u; |
89 | } u; |
81 | int coord_count; |
90 | int coord_count; |
82 | struct coord *coord; |
91 | struct coord *coord; |
83 | }; |
92 | }; |
84 | |
93 | |
85 | |
|
|
86 | struct itemgra { |
94 | struct itemgra |
|
|
95 | { |
87 | struct range order,sequence_range,speed_range,angle_range; |
96 | struct range order, sequence_range, speed_range, angle_range; |
88 | GList *type; |
97 | GList *type; |
89 | GList *elements; |
98 | GList *elements; |
90 | }; |
99 | }; |
91 | |
100 | |
92 | struct layer { |
101 | struct layer |
|
|
102 | { |
93 | char *name; |
103 | char *name; |
94 | int details; |
104 | int details; |
95 | GList *itemgras; |
105 | GList *itemgras; |
96 | int active; |
106 | int active; |
97 | }; |
107 | }; |
98 | |
108 | |
99 | struct cursor { |
109 | struct cursor |
|
|
110 | { |
100 | struct attr **attrs; |
111 | struct attr **attrs; |
101 | struct range *sequence_range; |
112 | struct range *sequence_range; |
102 | char *name; |
113 | char *name; |
103 | int w,h; |
114 | int w, h; |
104 | int interval; |
115 | int interval; |
105 | }; |
116 | }; |
106 | |
117 | |
107 | struct layout { char *name; char* dayname; char* nightname; char *font; struct color color; GList *layers; GList *cursors; int order_delta; int active; }; |
118 | struct layout |
|
|
119 | { |
|
|
120 | char *name; |
|
|
121 | char* dayname; |
|
|
122 | char* nightname; |
|
|
123 | char *font; |
|
|
124 | struct color color; |
|
|
125 | GList *layers; |
|
|
126 | GList *cursors; |
|
|
127 | int order_delta; |
|
|
128 | int active; |
|
|
129 | }; |
108 | |
130 | |
109 | /* prototypes */ |
131 | /* prototypes */ |
110 | enum attr_type; |
132 | enum attr_type; |
111 | struct arrows; |
133 | struct arrows; |
112 | struct attr; |
134 | struct attr; |