diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c | 99 |
1 files changed, 50 insertions, 49 deletions
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c index e81af13..da0a6c3 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c | |||
@@ -32,13 +32,13 @@ _ecore_x_fixes_init(void) | |||
32 | #else /* ifdef ECORE_XFIXES */ | 32 | #else /* ifdef ECORE_XFIXES */ |
33 | _fixes_available = 0; | 33 | _fixes_available = 0; |
34 | #endif /* ifdef ECORE_XFIXES */ | 34 | #endif /* ifdef ECORE_XFIXES */ |
35 | } /* _ecore_x_fixes_init */ | 35 | } |
36 | 36 | ||
37 | #ifdef ECORE_XFIXES | 37 | #ifdef ECORE_XFIXES |
38 | /* I don't know what to call this function. */ | 38 | /* I don't know what to call this function. */ |
39 | static XRectangle * | 39 | static XRectangle * |
40 | _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, | 40 | _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, |
41 | int num) | 41 | int num) |
42 | { | 42 | { |
43 | XRectangle *xrect; | 43 | XRectangle *xrect; |
44 | int i; | 44 | int i; |
@@ -58,11 +58,11 @@ _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, | |||
58 | xrect[i].height = rects[i].height; | 58 | xrect[i].height = rects[i].height; |
59 | } | 59 | } |
60 | return xrect; | 60 | return xrect; |
61 | } /* _ecore_x_rectangle_ecore_to_x */ | 61 | } |
62 | 62 | ||
63 | static Ecore_X_Rectangle * | 63 | static Ecore_X_Rectangle * |
64 | _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, | 64 | _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, |
65 | int num) | 65 | int num) |
66 | { | 66 | { |
67 | Ecore_X_Rectangle *rects; | 67 | Ecore_X_Rectangle *rects; |
68 | int i; | 68 | int i; |
@@ -82,7 +82,7 @@ _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, | |||
82 | rects[i].height = xrect[i].height; | 82 | rects[i].height = xrect[i].height; |
83 | } | 83 | } |
84 | return rects; | 84 | return rects; |
85 | } /* _ecore_x_rectangle_x_to_ecore */ | 85 | } |
86 | 86 | ||
87 | #endif /* ifdef ECORE_XFIXES */ | 87 | #endif /* ifdef ECORE_XFIXES */ |
88 | 88 | ||
@@ -106,7 +106,7 @@ ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection) | |||
106 | 106 | ||
107 | EAPI Ecore_X_Region | 107 | EAPI Ecore_X_Region |
108 | ecore_x_region_new(Ecore_X_Rectangle *rects, | 108 | ecore_x_region_new(Ecore_X_Rectangle *rects, |
109 | int num) | 109 | int num) |
110 | { | 110 | { |
111 | #ifdef ECORE_XFIXES | 111 | #ifdef ECORE_XFIXES |
112 | Ecore_X_Region region; | 112 | Ecore_X_Region region; |
@@ -120,7 +120,7 @@ ecore_x_region_new(Ecore_X_Rectangle *rects, | |||
120 | #else /* ifdef ECORE_XFIXES */ | 120 | #else /* ifdef ECORE_XFIXES */ |
121 | return 0; | 121 | return 0; |
122 | #endif /* ifdef ECORE_XFIXES */ | 122 | #endif /* ifdef ECORE_XFIXES */ |
123 | } /* ecore_x_region_new */ | 123 | } |
124 | 124 | ||
125 | EAPI Ecore_X_Region | 125 | EAPI Ecore_X_Region |
126 | ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) | 126 | ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) |
@@ -134,10 +134,10 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) | |||
134 | #else /* ifdef ECORE_XFIXES */ | 134 | #else /* ifdef ECORE_XFIXES */ |
135 | return 0; | 135 | return 0; |
136 | #endif /* ifdef ECORE_XFIXES */ | 136 | #endif /* ifdef ECORE_XFIXES */ |
137 | } /* ecore_x_region_new_from_bitmap */ | 137 | } |
138 | 138 | ||
139 | EAPI Ecore_X_Region | 139 | EAPI Ecore_X_Region |
140 | ecore_x_region_new_from_window(Ecore_X_Window win, | 140 | ecore_x_region_new_from_window(Ecore_X_Window win, |
141 | Ecore_X_Region_Type type) | 141 | Ecore_X_Region_Type type) |
142 | { | 142 | { |
143 | #ifdef ECORE_XFIXES | 143 | #ifdef ECORE_XFIXES |
@@ -149,7 +149,7 @@ ecore_x_region_new_from_window(Ecore_X_Window win, | |||
149 | #else /* ifdef ECORE_XFIXES */ | 149 | #else /* ifdef ECORE_XFIXES */ |
150 | return 0; | 150 | return 0; |
151 | #endif /* ifdef ECORE_XFIXES */ | 151 | #endif /* ifdef ECORE_XFIXES */ |
152 | } /* ecore_x_region_new_from_window */ | 152 | } |
153 | 153 | ||
154 | EAPI Ecore_X_Region | 154 | EAPI Ecore_X_Region |
155 | ecore_x_region_new_from_gc(Ecore_X_GC gc) | 155 | ecore_x_region_new_from_gc(Ecore_X_GC gc) |
@@ -163,7 +163,7 @@ ecore_x_region_new_from_gc(Ecore_X_GC gc) | |||
163 | #else /* ifdef ECORE_XFIXES */ | 163 | #else /* ifdef ECORE_XFIXES */ |
164 | return 0; | 164 | return 0; |
165 | #endif /* ifdef ECORE_XFIXES */ | 165 | #endif /* ifdef ECORE_XFIXES */ |
166 | } /* ecore_x_region_new_from_gc */ | 166 | } |
167 | 167 | ||
168 | EAPI Ecore_X_Region | 168 | EAPI Ecore_X_Region |
169 | ecore_x_region_new_from_picture(Ecore_X_Picture picture) | 169 | ecore_x_region_new_from_picture(Ecore_X_Picture picture) |
@@ -177,7 +177,7 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture) | |||
177 | #else /* ifdef ECORE_XFIXES */ | 177 | #else /* ifdef ECORE_XFIXES */ |
178 | return 0; | 178 | return 0; |
179 | #endif /* ifdef ECORE_XFIXES */ | 179 | #endif /* ifdef ECORE_XFIXES */ |
180 | } /* ecore_x_region_new_from_picture */ | 180 | } |
181 | 181 | ||
182 | EAPI void | 182 | EAPI void |
183 | ecore_x_region_free(Ecore_X_Region region) | 183 | ecore_x_region_free(Ecore_X_Region region) |
@@ -186,19 +186,19 @@ ecore_x_region_free(Ecore_X_Region region) | |||
186 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 186 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
187 | XFixesDestroyRegion(_ecore_x_disp, region); | 187 | XFixesDestroyRegion(_ecore_x_disp, region); |
188 | #endif /* ifdef ECORE_XFIXES */ | 188 | #endif /* ifdef ECORE_XFIXES */ |
189 | } /* ecore_x_region_free */ | 189 | } |
190 | 190 | ||
191 | EAPI void | 191 | EAPI void |
192 | ecore_x_region_set(Ecore_X_Region region, | 192 | ecore_x_region_set(Ecore_X_Region region, |
193 | Ecore_X_Rectangle *rects, | 193 | Ecore_X_Rectangle *rects, |
194 | int num) | 194 | int num) |
195 | { | 195 | { |
196 | #ifdef ECORE_XFIXES | 196 | #ifdef ECORE_XFIXES |
197 | XRectangle *xrect = _ecore_x_rectangle_ecore_to_x(rects, num); | 197 | XRectangle *xrect = _ecore_x_rectangle_ecore_to_x(rects, num); |
198 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 198 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
199 | XFixesSetRegion(_ecore_x_disp, region, xrect, num); | 199 | XFixesSetRegion(_ecore_x_disp, region, xrect, num); |
200 | #endif /* ifdef ECORE_XFIXES */ | 200 | #endif /* ifdef ECORE_XFIXES */ |
201 | } /* ecore_x_region_set */ | 201 | } |
202 | 202 | ||
203 | EAPI void | 203 | EAPI void |
204 | ecore_x_region_copy(Ecore_X_Region dest, | 204 | ecore_x_region_copy(Ecore_X_Region dest, |
@@ -208,7 +208,7 @@ ecore_x_region_copy(Ecore_X_Region dest, | |||
208 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 208 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
209 | XFixesCopyRegion(_ecore_x_disp, dest, source); | 209 | XFixesCopyRegion(_ecore_x_disp, dest, source); |
210 | #endif /* ifdef ECORE_XFIXES */ | 210 | #endif /* ifdef ECORE_XFIXES */ |
211 | } /* ecore_x_region_copy */ | 211 | } |
212 | 212 | ||
213 | EAPI void | 213 | EAPI void |
214 | ecore_x_region_combine(Ecore_X_Region dest, | 214 | ecore_x_region_combine(Ecore_X_Region dest, |
@@ -219,7 +219,7 @@ ecore_x_region_combine(Ecore_X_Region dest, | |||
219 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 219 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
220 | XFixesUnionRegion(_ecore_x_disp, dest, source1, source2); | 220 | XFixesUnionRegion(_ecore_x_disp, dest, source1, source2); |
221 | #endif /* ifdef ECORE_XFIXES */ | 221 | #endif /* ifdef ECORE_XFIXES */ |
222 | } /* ecore_x_region_combine */ | 222 | } |
223 | 223 | ||
224 | EAPI void | 224 | EAPI void |
225 | ecore_x_region_intersect(Ecore_X_Region dest, | 225 | ecore_x_region_intersect(Ecore_X_Region dest, |
@@ -230,7 +230,7 @@ ecore_x_region_intersect(Ecore_X_Region dest, | |||
230 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 230 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
231 | XFixesIntersectRegion(_ecore_x_disp, dest, source1, source2); | 231 | XFixesIntersectRegion(_ecore_x_disp, dest, source1, source2); |
232 | #endif /* ifdef ECORE_XFIXES */ | 232 | #endif /* ifdef ECORE_XFIXES */ |
233 | } /* ecore_x_region_intersect */ | 233 | } |
234 | 234 | ||
235 | EAPI void | 235 | EAPI void |
236 | ecore_x_region_subtract(Ecore_X_Region dest, | 236 | ecore_x_region_subtract(Ecore_X_Region dest, |
@@ -241,35 +241,36 @@ ecore_x_region_subtract(Ecore_X_Region dest, | |||
241 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 241 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
242 | XFixesSubtractRegion(_ecore_x_disp, dest, source1, source2); | 242 | XFixesSubtractRegion(_ecore_x_disp, dest, source1, source2); |
243 | #endif /* ifdef ECORE_XFIXES */ | 243 | #endif /* ifdef ECORE_XFIXES */ |
244 | } /* ecore_x_region_subtract */ | 244 | } |
245 | 245 | ||
246 | EAPI void | 246 | EAPI void |
247 | ecore_x_region_invert(Ecore_X_Region dest, | 247 | ecore_x_region_invert(Ecore_X_Region dest, |
248 | Ecore_X_Rectangle *bounds, | 248 | Ecore_X_Rectangle *bounds, |
249 | Ecore_X_Region source) | 249 | Ecore_X_Region source) |
250 | { | 250 | { |
251 | #ifdef ECORE_XFIXES | 251 | #ifdef ECORE_XFIXES |
252 | XRectangle *xbound; | 252 | XRectangle *xbound; |
253 | int num = 0; | 253 | int num = 0; |
254 | 254 | ||
255 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 255 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
256 | while (bounds + num) num++; | 256 | while (bounds + num) |
257 | num++; | ||
257 | xbound = _ecore_x_rectangle_ecore_to_x(bounds, num); | 258 | xbound = _ecore_x_rectangle_ecore_to_x(bounds, num); |
258 | 259 | ||
259 | XFixesInvertRegion(_ecore_x_disp, dest, xbound, source); | 260 | XFixesInvertRegion(_ecore_x_disp, dest, xbound, source); |
260 | #endif /* ifdef ECORE_XFIXES */ | 261 | #endif /* ifdef ECORE_XFIXES */ |
261 | } /* ecore_x_region_invert */ | 262 | } |
262 | 263 | ||
263 | EAPI void | 264 | EAPI void |
264 | ecore_x_region_translate(Ecore_X_Region region, | 265 | ecore_x_region_translate(Ecore_X_Region region, |
265 | int dx, | 266 | int dx, |
266 | int dy) | 267 | int dy) |
267 | { | 268 | { |
268 | #ifdef ECORE_XFIXES | 269 | #ifdef ECORE_XFIXES |
269 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 270 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
270 | XFixesTranslateRegion(_ecore_x_disp, region, dx, dy); | 271 | XFixesTranslateRegion(_ecore_x_disp, region, dx, dy); |
271 | #endif /* ifdef ECORE_XFIXES */ | 272 | #endif /* ifdef ECORE_XFIXES */ |
272 | } /* ecore_x_region_translate */ | 273 | } |
273 | 274 | ||
274 | EAPI void | 275 | EAPI void |
275 | ecore_x_region_extents(Ecore_X_Region dest, | 276 | ecore_x_region_extents(Ecore_X_Region dest, |
@@ -279,11 +280,11 @@ ecore_x_region_extents(Ecore_X_Region dest, | |||
279 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 280 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
280 | XFixesRegionExtents(_ecore_x_disp, dest, source); | 281 | XFixesRegionExtents(_ecore_x_disp, dest, source); |
281 | #endif /* ifdef ECORE_XFIXES */ | 282 | #endif /* ifdef ECORE_XFIXES */ |
282 | } /* ecore_x_region_extents */ | 283 | } |
283 | 284 | ||
284 | EAPI Ecore_X_Rectangle * | 285 | EAPI Ecore_X_Rectangle * |
285 | ecore_x_region_fetch(Ecore_X_Region region, | 286 | ecore_x_region_fetch(Ecore_X_Region region, |
286 | int *num, | 287 | int *num, |
287 | Ecore_X_Rectangle *bounds){ | 288 | Ecore_X_Rectangle *bounds){ |
288 | #ifdef ECORE_XFIXES | 289 | #ifdef ECORE_XFIXES |
289 | Ecore_X_Rectangle *rects; | 290 | Ecore_X_Rectangle *rects; |
@@ -300,40 +301,40 @@ ecore_x_region_fetch(Ecore_X_Region region, | |||
300 | #else /* ifdef ECORE_XFIXES */ | 301 | #else /* ifdef ECORE_XFIXES */ |
301 | return NULL; | 302 | return NULL; |
302 | #endif /* ifdef ECORE_XFIXES */ | 303 | #endif /* ifdef ECORE_XFIXES */ |
303 | } /* ecore_x_region_fetch */ | 304 | } |
304 | 305 | ||
305 | EAPI void | 306 | EAPI void |
306 | ecore_x_region_expand(Ecore_X_Region dest, | 307 | ecore_x_region_expand(Ecore_X_Region dest, |
307 | Ecore_X_Region source, | 308 | Ecore_X_Region source, |
308 | unsigned int left, | 309 | unsigned int left, |
309 | unsigned int right, | 310 | unsigned int right, |
310 | unsigned int top, | 311 | unsigned int top, |
311 | unsigned int bottom) | 312 | unsigned int bottom) |
312 | { | 313 | { |
313 | #ifdef ECORE_XFIXES | 314 | #ifdef ECORE_XFIXES |
314 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 315 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
315 | XFixesExpandRegion(_ecore_x_disp, dest, source, left, right, top, bottom); | 316 | XFixesExpandRegion(_ecore_x_disp, dest, source, left, right, top, bottom); |
316 | #endif /* ifdef ECORE_XFIXES */ | 317 | #endif /* ifdef ECORE_XFIXES */ |
317 | } /* ecore_x_region_expand */ | 318 | } |
318 | 319 | ||
319 | EAPI void | 320 | EAPI void |
320 | ecore_x_region_gc_clip_set(Ecore_X_Region region, | 321 | ecore_x_region_gc_clip_set(Ecore_X_Region region, |
321 | Ecore_X_GC gc, | 322 | Ecore_X_GC gc, |
322 | int x_origin, | 323 | int x_origin, |
323 | int y_origin) | 324 | int y_origin) |
324 | { | 325 | { |
325 | #ifdef ECORE_XFIXES | 326 | #ifdef ECORE_XFIXES |
326 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 327 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
327 | XFixesSetGCClipRegion(_ecore_x_disp, gc, x_origin, y_origin, region); | 328 | XFixesSetGCClipRegion(_ecore_x_disp, gc, x_origin, y_origin, region); |
328 | #endif /* ifdef ECORE_XFIXES */ | 329 | #endif /* ifdef ECORE_XFIXES */ |
329 | } /* ecore_x_region_gc_clip_set */ | 330 | } |
330 | 331 | ||
331 | EAPI void | 332 | EAPI void |
332 | ecore_x_region_window_shape_set(Ecore_X_Region region, | 333 | ecore_x_region_window_shape_set(Ecore_X_Region region, |
333 | Ecore_X_Window win, | 334 | Ecore_X_Window win, |
334 | Ecore_X_Shape_Type type, | 335 | Ecore_X_Shape_Type type, |
335 | int x_offset, | 336 | int x_offset, |
336 | int y_offset) | 337 | int y_offset) |
337 | { | 338 | { |
338 | #ifdef ECORE_XFIXES | 339 | #ifdef ECORE_XFIXES |
339 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 340 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -344,13 +345,13 @@ ecore_x_region_window_shape_set(Ecore_X_Region region, | |||
344 | y_offset, | 345 | y_offset, |
345 | region); | 346 | region); |
346 | #endif /* ifdef ECORE_XFIXES */ | 347 | #endif /* ifdef ECORE_XFIXES */ |
347 | } /* ecore_x_region_window_shape_set */ | 348 | } |
348 | 349 | ||
349 | EAPI void | 350 | EAPI void |
350 | ecore_x_region_picture_clip_set(Ecore_X_Region region, | 351 | ecore_x_region_picture_clip_set(Ecore_X_Region region, |
351 | Ecore_X_Picture picture, | 352 | Ecore_X_Picture picture, |
352 | int x_origin, | 353 | int x_origin, |
353 | int y_origin) | 354 | int y_origin) |
354 | { | 355 | { |
355 | #ifdef ECORE_XFIXES | 356 | #ifdef ECORE_XFIXES |
356 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 357 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -360,5 +361,5 @@ ecore_x_region_picture_clip_set(Ecore_X_Region region, | |||
360 | y_origin, | 361 | y_origin, |
361 | region); | 362 | region); |
362 | #endif /* ifdef ECORE_XFIXES */ | 363 | #endif /* ifdef ECORE_XFIXES */ |
363 | } /* ecore_x_region_picture_clip_set */ | 364 | } |
364 | 365 | ||