diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c')
-rw-r--r-- | libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c | 190 |
1 files changed, 96 insertions, 94 deletions
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c index 8d5c757..b581a0e 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c | |||
@@ -21,9 +21,9 @@ | |||
21 | */ | 21 | */ |
22 | EAPI void | 22 | EAPI void |
23 | ecore_x_window_prop_card32_set(Ecore_X_Window win, | 23 | ecore_x_window_prop_card32_set(Ecore_X_Window win, |
24 | Ecore_X_Atom atom, | 24 | Ecore_X_Atom atom, |
25 | unsigned int *val, | 25 | unsigned int *val, |
26 | unsigned int num) | 26 | unsigned int num) |
27 | { | 27 | { |
28 | #if SIZEOF_INT == SIZEOF_LONG | 28 | #if SIZEOF_INT == SIZEOF_LONG |
29 | _ATOM_SET_CARD32(win, atom, val, num); | 29 | _ATOM_SET_CARD32(win, atom, val, num); |
@@ -41,7 +41,7 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, | |||
41 | _ATOM_SET_CARD32(win, atom, v2, num); | 41 | _ATOM_SET_CARD32(win, atom, v2, num); |
42 | free(v2); | 42 | free(v2); |
43 | #endif /* if SIZEOF_INT == SIZEOF_LONG */ | 43 | #endif /* if SIZEOF_INT == SIZEOF_LONG */ |
44 | } /* ecore_x_window_prop_card32_set */ | 44 | } |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Get CARD32 (array) property | 47 | * Get CARD32 (array) property |
@@ -53,9 +53,9 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, | |||
53 | */ | 53 | */ |
54 | EAPI int | 54 | EAPI int |
55 | ecore_x_window_prop_card32_get(Ecore_X_Window win, | 55 | ecore_x_window_prop_card32_get(Ecore_X_Window win, |
56 | Ecore_X_Atom atom, | 56 | Ecore_X_Atom atom, |
57 | unsigned int *val, | 57 | unsigned int *val, |
58 | unsigned int len) | 58 | unsigned int len) |
59 | { | 59 | { |
60 | unsigned char *prop_ret; | 60 | unsigned char *prop_ret; |
61 | Atom type_ret; | 61 | Atom type_ret; |
@@ -89,7 +89,7 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, | |||
89 | XFree(prop_ret); | 89 | XFree(prop_ret); |
90 | 90 | ||
91 | return num; | 91 | return num; |
92 | } /* ecore_x_window_prop_card32_get */ | 92 | } |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Get CARD32 (array) property of any length | 95 | * Get CARD32 (array) property of any length |
@@ -100,7 +100,7 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, | |||
100 | */ | 100 | */ |
101 | EAPI int | 101 | EAPI int |
102 | ecore_x_window_prop_card32_list_get(Ecore_X_Window win, | 102 | ecore_x_window_prop_card32_list_get(Ecore_X_Window win, |
103 | Ecore_X_Atom atom, | 103 | Ecore_X_Atom atom, |
104 | unsigned int **plst) | 104 | unsigned int **plst) |
105 | { | 105 | { |
106 | unsigned char *prop_ret; | 106 | unsigned char *prop_ret; |
@@ -125,7 +125,7 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, | |||
125 | else | 125 | else |
126 | { | 126 | { |
127 | val = malloc(num_ret * sizeof(unsigned int)); | 127 | val = malloc(num_ret * sizeof(unsigned int)); |
128 | if (!val) | 128 | if (!val) |
129 | { | 129 | { |
130 | if (prop_ret) XFree(prop_ret); | 130 | if (prop_ret) XFree(prop_ret); |
131 | return -1; | 131 | return -1; |
@@ -140,17 +140,17 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, | |||
140 | XFree(prop_ret); | 140 | XFree(prop_ret); |
141 | 141 | ||
142 | return num; | 142 | return num; |
143 | } /* ecore_x_window_prop_card32_list_get */ | 143 | } |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * Set X ID (array) property | 146 | * Set X ID (array) property |
147 | */ | 147 | */ |
148 | EAPI void | 148 | EAPI void |
149 | ecore_x_window_prop_xid_set(Ecore_X_Window win, | 149 | ecore_x_window_prop_xid_set(Ecore_X_Window win, |
150 | Ecore_X_Atom atom, | 150 | Ecore_X_Atom atom, |
151 | Ecore_X_Atom type, | 151 | Ecore_X_Atom type, |
152 | Ecore_X_ID *lst, | 152 | Ecore_X_ID *lst, |
153 | unsigned int num) | 153 | unsigned int num) |
154 | { | 154 | { |
155 | #if SIZEOF_INT == SIZEOF_LONG | 155 | #if SIZEOF_INT == SIZEOF_LONG |
156 | XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace, | 156 | XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace, |
@@ -170,7 +170,7 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, | |||
170 | (unsigned char *)pl, num); | 170 | (unsigned char *)pl, num); |
171 | free(pl); | 171 | free(pl); |
172 | #endif /* if SIZEOF_INT == SIZEOF_LONG */ | 172 | #endif /* if SIZEOF_INT == SIZEOF_LONG */ |
173 | } /* ecore_x_window_prop_xid_set */ | 173 | } |
174 | 174 | ||
175 | /* | 175 | /* |
176 | * Get X ID (array) property | 176 | * Get X ID (array) property |
@@ -182,10 +182,10 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, | |||
182 | */ | 182 | */ |
183 | EAPI int | 183 | EAPI int |
184 | ecore_x_window_prop_xid_get(Ecore_X_Window win, | 184 | ecore_x_window_prop_xid_get(Ecore_X_Window win, |
185 | Ecore_X_Atom atom, | 185 | Ecore_X_Atom atom, |
186 | Ecore_X_Atom type, | 186 | Ecore_X_Atom type, |
187 | Ecore_X_ID *lst, | 187 | Ecore_X_ID *lst, |
188 | unsigned int len) | 188 | unsigned int len) |
189 | { | 189 | { |
190 | unsigned char *prop_ret; | 190 | unsigned char *prop_ret; |
191 | Atom type_ret; | 191 | Atom type_ret; |
@@ -219,7 +219,7 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, | |||
219 | XFree(prop_ret); | 219 | XFree(prop_ret); |
220 | 220 | ||
221 | return num; | 221 | return num; |
222 | } /* ecore_x_window_prop_xid_get */ | 222 | } |
223 | 223 | ||
224 | /* | 224 | /* |
225 | * Get X ID (array) property | 225 | * Get X ID (array) property |
@@ -231,9 +231,9 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, | |||
231 | */ | 231 | */ |
232 | EAPI int | 232 | EAPI int |
233 | ecore_x_window_prop_xid_list_get(Ecore_X_Window win, | 233 | ecore_x_window_prop_xid_list_get(Ecore_X_Window win, |
234 | Ecore_X_Atom atom, | 234 | Ecore_X_Atom atom, |
235 | Ecore_X_Atom type, | 235 | Ecore_X_Atom type, |
236 | Ecore_X_ID **val) | 236 | Ecore_X_ID **val) |
237 | { | 237 | { |
238 | unsigned char *prop_ret; | 238 | unsigned char *prop_ret; |
239 | Atom type_ret; | 239 | Atom type_ret; |
@@ -268,17 +268,17 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, | |||
268 | XFree(prop_ret); | 268 | XFree(prop_ret); |
269 | 269 | ||
270 | return num; | 270 | return num; |
271 | } /* ecore_x_window_prop_xid_list_get */ | 271 | } |
272 | 272 | ||
273 | /* | 273 | /* |
274 | * Remove/add/toggle X ID list item. | 274 | * Remove/add/toggle X ID list item. |
275 | */ | 275 | */ |
276 | EAPI void | 276 | EAPI void |
277 | ecore_x_window_prop_xid_list_change(Ecore_X_Window win, | 277 | ecore_x_window_prop_xid_list_change(Ecore_X_Window win, |
278 | Ecore_X_Atom atom, | 278 | Ecore_X_Atom atom, |
279 | Ecore_X_Atom type, | 279 | Ecore_X_Atom type, |
280 | Ecore_X_ID item, | 280 | Ecore_X_ID item, |
281 | int op) | 281 | int op) |
282 | { | 282 | { |
283 | Ecore_X_ID *lst; | 283 | Ecore_X_ID *lst; |
284 | int i, num; | 284 | int i, num; |
@@ -300,22 +300,22 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, | |||
300 | if (i < num) | 300 | if (i < num) |
301 | { | 301 | { |
302 | /* Was in list */ | 302 | /* Was in list */ |
303 | if (op == ECORE_X_PROP_LIST_ADD) | 303 | if (op == ECORE_X_PROP_LIST_ADD) |
304 | goto done; /* Remove it */ | 304 | goto done; /* Remove it */ |
305 | 305 | ||
306 | num--; | 306 | num--; |
307 | for (; i < num; i++) | 307 | for (; i < num; i++) |
308 | lst[i] = lst[i + 1]; | 308 | lst[i] = lst[i + 1]; |
309 | } | 309 | } |
310 | else | 310 | else |
311 | { | 311 | { |
312 | /* Was not in list */ | 312 | /* Was not in list */ |
313 | if (op == ECORE_X_PROP_LIST_REMOVE) | 313 | if (op == ECORE_X_PROP_LIST_REMOVE) |
314 | goto done; /* Add it */ | 314 | goto done; /* Add it */ |
315 | 315 | ||
316 | num++; | 316 | num++; |
317 | lst = realloc(lst, num * sizeof(Ecore_X_ID)); | 317 | lst = realloc(lst, num * sizeof(Ecore_X_ID)); |
318 | lst[i] = item; | 318 | lst[i] = item; |
319 | } | 319 | } |
320 | 320 | ||
321 | ecore_x_window_prop_xid_set(win, atom, type, lst, num); | 321 | ecore_x_window_prop_xid_set(win, atom, type, lst, num); |
@@ -323,20 +323,20 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, | |||
323 | done: | 323 | done: |
324 | if (lst) | 324 | if (lst) |
325 | free(lst); | 325 | free(lst); |
326 | } /* ecore_x_window_prop_xid_list_change */ | 326 | } |
327 | 327 | ||
328 | /* | 328 | /* |
329 | * Set Atom (array) property | 329 | * Set Atom (array) property |
330 | */ | 330 | */ |
331 | EAPI void | 331 | EAPI void |
332 | ecore_x_window_prop_atom_set(Ecore_X_Window win, | 332 | ecore_x_window_prop_atom_set(Ecore_X_Window win, |
333 | Ecore_X_Atom atom, | 333 | Ecore_X_Atom atom, |
334 | Ecore_X_Atom *lst, | 334 | Ecore_X_Atom *lst, |
335 | unsigned int num) | 335 | unsigned int num) |
336 | { | 336 | { |
337 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 337 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
338 | ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num); | 338 | ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num); |
339 | } /* ecore_x_window_prop_atom_set */ | 339 | } |
340 | 340 | ||
341 | /* | 341 | /* |
342 | * Get Atom (array) property | 342 | * Get Atom (array) property |
@@ -348,13 +348,13 @@ ecore_x_window_prop_atom_set(Ecore_X_Window win, | |||
348 | */ | 348 | */ |
349 | EAPI int | 349 | EAPI int |
350 | ecore_x_window_prop_atom_get(Ecore_X_Window win, | 350 | ecore_x_window_prop_atom_get(Ecore_X_Window win, |
351 | Ecore_X_Atom atom, | 351 | Ecore_X_Atom atom, |
352 | Ecore_X_Atom *lst, | 352 | Ecore_X_Atom *lst, |
353 | unsigned int len) | 353 | unsigned int len) |
354 | { | 354 | { |
355 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 355 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
356 | return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len); | 356 | return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len); |
357 | } /* ecore_x_window_prop_atom_get */ | 357 | } |
358 | 358 | ||
359 | /* | 359 | /* |
360 | * Get Atom (array) property | 360 | * Get Atom (array) property |
@@ -366,38 +366,38 @@ ecore_x_window_prop_atom_get(Ecore_X_Window win, | |||
366 | */ | 366 | */ |
367 | EAPI int | 367 | EAPI int |
368 | ecore_x_window_prop_atom_list_get(Ecore_X_Window win, | 368 | ecore_x_window_prop_atom_list_get(Ecore_X_Window win, |
369 | Ecore_X_Atom atom, | 369 | Ecore_X_Atom atom, |
370 | Ecore_X_Atom **plst) | 370 | Ecore_X_Atom **plst) |
371 | { | 371 | { |
372 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 372 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
373 | return ecore_x_window_prop_xid_list_get(win, atom, XA_ATOM, plst); | 373 | return ecore_x_window_prop_xid_list_get(win, atom, XA_ATOM, plst); |
374 | } /* ecore_x_window_prop_atom_list_get */ | 374 | } |
375 | 375 | ||
376 | /* | 376 | /* |
377 | * Remove/add/toggle atom list item. | 377 | * Remove/add/toggle atom list item. |
378 | */ | 378 | */ |
379 | EAPI void | 379 | EAPI void |
380 | ecore_x_window_prop_atom_list_change(Ecore_X_Window win, | 380 | ecore_x_window_prop_atom_list_change(Ecore_X_Window win, |
381 | Ecore_X_Atom atom, | 381 | Ecore_X_Atom atom, |
382 | Ecore_X_Atom item, | 382 | Ecore_X_Atom item, |
383 | int op) | 383 | int op) |
384 | { | 384 | { |
385 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 385 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
386 | ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op); | 386 | ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op); |
387 | } /* ecore_x_window_prop_atom_list_change */ | 387 | } |
388 | 388 | ||
389 | /* | 389 | /* |
390 | * Set Window (array) property | 390 | * Set Window (array) property |
391 | */ | 391 | */ |
392 | EAPI void | 392 | EAPI void |
393 | ecore_x_window_prop_window_set(Ecore_X_Window win, | 393 | ecore_x_window_prop_window_set(Ecore_X_Window win, |
394 | Ecore_X_Atom atom, | 394 | Ecore_X_Atom atom, |
395 | Ecore_X_Window *lst, | 395 | Ecore_X_Window *lst, |
396 | unsigned int num) | 396 | unsigned int num) |
397 | { | 397 | { |
398 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 398 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
399 | ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num); | 399 | ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num); |
400 | } /* ecore_x_window_prop_window_set */ | 400 | } |
401 | 401 | ||
402 | /* | 402 | /* |
403 | * Get Window (array) property | 403 | * Get Window (array) property |
@@ -408,14 +408,14 @@ ecore_x_window_prop_window_set(Ecore_X_Window win, | |||
408 | * Note: Return value 0 means that the property exists but has no elements. | 408 | * Note: Return value 0 means that the property exists but has no elements. |
409 | */ | 409 | */ |
410 | EAPI int | 410 | EAPI int |
411 | ecore_x_window_prop_window_get(Ecore_X_Window win, | 411 | ecore_x_window_prop_window_get(Ecore_X_Window win, |
412 | Ecore_X_Atom atom, | 412 | Ecore_X_Atom atom, |
413 | Ecore_X_Window *lst, | 413 | Ecore_X_Window *lst, |
414 | unsigned int len) | 414 | unsigned int len) |
415 | { | 415 | { |
416 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 416 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
417 | return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len); | 417 | return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len); |
418 | } /* ecore_x_window_prop_window_get */ | 418 | } |
419 | 419 | ||
420 | /* | 420 | /* |
421 | * Get Window (array) property | 421 | * Get Window (array) property |
@@ -426,13 +426,13 @@ ecore_x_window_prop_window_get(Ecore_X_Window win, | |||
426 | * Note: Return value 0 means that the property exists but has no elements. | 426 | * Note: Return value 0 means that the property exists but has no elements. |
427 | */ | 427 | */ |
428 | EAPI int | 428 | EAPI int |
429 | ecore_x_window_prop_window_list_get(Ecore_X_Window win, | 429 | ecore_x_window_prop_window_list_get(Ecore_X_Window win, |
430 | Ecore_X_Atom atom, | 430 | Ecore_X_Atom atom, |
431 | Ecore_X_Window **plst) | 431 | Ecore_X_Window **plst) |
432 | { | 432 | { |
433 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 433 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
434 | return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst); | 434 | return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst); |
435 | } /* ecore_x_window_prop_window_list_get */ | 435 | } |
436 | 436 | ||
437 | /** | 437 | /** |
438 | * To be documented. | 438 | * To be documented. |
@@ -443,7 +443,7 @@ EAPI Ecore_X_Atom | |||
443 | ecore_x_window_prop_any_type(void) | 443 | ecore_x_window_prop_any_type(void) |
444 | { | 444 | { |
445 | return AnyPropertyType; | 445 | return AnyPropertyType; |
446 | } /* ecore_x_window_prop_any_type */ | 446 | } |
447 | 447 | ||
448 | /** | 448 | /** |
449 | * To be documented. | 449 | * To be documented. |
@@ -452,11 +452,11 @@ ecore_x_window_prop_any_type(void) | |||
452 | */ | 452 | */ |
453 | EAPI void | 453 | EAPI void |
454 | ecore_x_window_prop_property_set(Ecore_X_Window win, | 454 | ecore_x_window_prop_property_set(Ecore_X_Window win, |
455 | Ecore_X_Atom property, | 455 | Ecore_X_Atom property, |
456 | Ecore_X_Atom type, | 456 | Ecore_X_Atom type, |
457 | int size, | 457 | int size, |
458 | void *data, | 458 | void *data, |
459 | int number) | 459 | int number) |
460 | { | 460 | { |
461 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 461 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
462 | if (win == 0) | 462 | if (win == 0) |
@@ -479,13 +479,14 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, | |||
479 | dat = malloc(sizeof(unsigned long) * number); | 479 | dat = malloc(sizeof(unsigned long) * number); |
480 | if (dat) | 480 | if (dat) |
481 | { | 481 | { |
482 | for (ptr = (int *)data, i = 0; i < number; i++) dat[i] = ptr[i]; | 482 | for (ptr = (int *)data, i = 0; i < number; i++) |
483 | dat[i] = ptr[i]; | ||
483 | XChangeProperty(_ecore_x_disp, win, property, type, size, | 484 | XChangeProperty(_ecore_x_disp, win, property, type, size, |
484 | PropModeReplace, (unsigned char *)dat, number); | 485 | PropModeReplace, (unsigned char *)dat, number); |
485 | free(dat); | 486 | free(dat); |
486 | } | 487 | } |
487 | } | 488 | } |
488 | } /* ecore_x_window_prop_property_set */ | 489 | } |
489 | 490 | ||
490 | /** | 491 | /** |
491 | * To be documented. | 492 | * To be documented. |
@@ -493,12 +494,12 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, | |||
493 | * FIXME: To be fixed. | 494 | * FIXME: To be fixed. |
494 | */ | 495 | */ |
495 | EAPI int | 496 | EAPI int |
496 | ecore_x_window_prop_property_get(Ecore_X_Window win, | 497 | ecore_x_window_prop_property_get(Ecore_X_Window win, |
497 | Ecore_X_Atom property, | 498 | Ecore_X_Atom property, |
498 | Ecore_X_Atom type, | 499 | Ecore_X_Atom type, |
499 | int size __UNUSED__, | 500 | int size __UNUSED__, |
500 | unsigned char **data, | 501 | unsigned char **data, |
501 | int *num) | 502 | int *num) |
502 | { | 503 | { |
503 | Atom type_ret = 0; | 504 | Atom type_ret = 0; |
504 | int ret, size_ret = 0; | 505 | int ret, size_ret = 0; |
@@ -552,7 +553,7 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, | |||
552 | for (i = 0; i < num_ret; i++) | 553 | for (i = 0; i < num_ret; i++) |
553 | ((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i]; | 554 | ((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i]; |
554 | break; | 555 | break; |
555 | } /* switch */ | 556 | } |
556 | 557 | ||
557 | XFree(prop_ret); | 558 | XFree(prop_ret); |
558 | 559 | ||
@@ -560,19 +561,19 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, | |||
560 | *num = num_ret; | 561 | *num = num_ret; |
561 | 562 | ||
562 | return size_ret; | 563 | return size_ret; |
563 | } /* ecore_x_window_prop_property_get */ | 564 | } |
564 | 565 | ||
565 | EAPI void | 566 | EAPI void |
566 | ecore_x_window_prop_property_del(Ecore_X_Window win, | 567 | ecore_x_window_prop_property_del(Ecore_X_Window win, |
567 | Ecore_X_Atom property) | 568 | Ecore_X_Atom property) |
568 | { | 569 | { |
569 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 570 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
570 | XDeleteProperty(_ecore_x_disp, win, property); | 571 | XDeleteProperty(_ecore_x_disp, win, property); |
571 | } /* ecore_x_window_prop_property_del */ | 572 | } |
572 | 573 | ||
573 | EAPI Ecore_X_Atom * | 574 | EAPI Ecore_X_Atom * |
574 | ecore_x_window_prop_list(Ecore_X_Window win, | 575 | ecore_x_window_prop_list(Ecore_X_Window win, |
575 | int *num_ret) | 576 | int *num_ret) |
576 | { | 577 | { |
577 | Ecore_X_Atom *atoms; | 578 | Ecore_X_Atom *atoms; |
578 | Atom *atom_ret; | 579 | Atom *atom_ret; |
@@ -589,14 +590,15 @@ ecore_x_window_prop_list(Ecore_X_Window win, | |||
589 | atoms = malloc(num * sizeof(Ecore_X_Atom)); | 590 | atoms = malloc(num * sizeof(Ecore_X_Atom)); |
590 | if (atoms) | 591 | if (atoms) |
591 | { | 592 | { |
592 | for (i = 0; i < num; i++) atoms[i] = atom_ret[i]; | 593 | for (i = 0; i < num; i++) |
594 | atoms[i] = atom_ret[i]; | ||
593 | if (num_ret) | 595 | if (num_ret) |
594 | *num_ret = num; | 596 | *num_ret = num; |
595 | } | 597 | } |
596 | 598 | ||
597 | XFree(atom_ret); | 599 | XFree(atom_ret); |
598 | return atoms; | 600 | return atoms; |
599 | } /* ecore_x_window_prop_list */ | 601 | } |
600 | 602 | ||
601 | /** | 603 | /** |
602 | * Set a window string property. | 604 | * Set a window string property. |
@@ -608,8 +610,8 @@ ecore_x_window_prop_list(Ecore_X_Window win, | |||
608 | */ | 610 | */ |
609 | EAPI void | 611 | EAPI void |
610 | ecore_x_window_prop_string_set(Ecore_X_Window win, | 612 | ecore_x_window_prop_string_set(Ecore_X_Window win, |
611 | Ecore_X_Atom type, | 613 | Ecore_X_Atom type, |
612 | const char *str) | 614 | const char *str) |
613 | { | 615 | { |
614 | XTextProperty xtp; | 616 | XTextProperty xtp; |
615 | 617 | ||
@@ -622,7 +624,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win, | |||
622 | xtp.encoding = ECORE_X_ATOM_UTF8_STRING; | 624 | xtp.encoding = ECORE_X_ATOM_UTF8_STRING; |
623 | xtp.nitems = strlen(str); | 625 | xtp.nitems = strlen(str); |
624 | XSetTextProperty(_ecore_x_disp, win, &xtp, type); | 626 | XSetTextProperty(_ecore_x_disp, win, &xtp, type); |
625 | } /* ecore_x_window_prop_string_set */ | 627 | } |
626 | 628 | ||
627 | /** | 629 | /** |
628 | * Get a window string property. | 630 | * Get a window string property. |
@@ -633,7 +635,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win, | |||
633 | */ | 635 | */ |
634 | EAPI char * | 636 | EAPI char * |
635 | ecore_x_window_prop_string_get(Ecore_X_Window win, | 637 | ecore_x_window_prop_string_get(Ecore_X_Window win, |
636 | Ecore_X_Atom type) | 638 | Ecore_X_Atom type) |
637 | { | 639 | { |
638 | XTextProperty xtp; | 640 | XTextProperty xtp; |
639 | char *str = NULL; | 641 | char *str = NULL; |
@@ -673,10 +675,10 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, | |||
673 | } | 675 | } |
674 | 676 | ||
675 | return str; | 677 | return str; |
676 | } /* ecore_x_window_prop_string_get */ | 678 | } |
677 | 679 | ||
678 | EAPI Eina_Bool | 680 | EAPI Eina_Bool |
679 | ecore_x_window_prop_protocol_isset(Ecore_X_Window win, | 681 | ecore_x_window_prop_protocol_isset(Ecore_X_Window win, |
680 | Ecore_X_WM_Protocol protocol) | 682 | Ecore_X_WM_Protocol protocol) |
681 | { | 683 | { |
682 | Atom proto, *protos = NULL; | 684 | Atom proto, *protos = NULL; |
@@ -703,7 +705,7 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win, | |||
703 | XFree(protos); | 705 | XFree(protos); |
704 | 706 | ||
705 | return ret; | 707 | return ret; |
706 | } /* ecore_x_window_prop_protocol_isset */ | 708 | } |
707 | 709 | ||
708 | /** | 710 | /** |
709 | * To be documented. | 711 | * To be documented. |
@@ -712,7 +714,7 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win, | |||
712 | */ | 714 | */ |
713 | EAPI Ecore_X_WM_Protocol * | 715 | EAPI Ecore_X_WM_Protocol * |
714 | ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, | 716 | ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, |
715 | int *num_ret) | 717 | int *num_ret) |
716 | { | 718 | { |
717 | Atom *protos = NULL; | 719 | Atom *protos = NULL; |
718 | int i, protos_count = 0; | 720 | int i, protos_count = 0; |
@@ -746,5 +748,5 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, | |||
746 | XFree(protos); | 748 | XFree(protos); |
747 | *num_ret = protos_count; | 749 | *num_ret = protos_count; |
748 | return prot_ret; | 750 | return prot_ret; |
749 | } /* ecore_x_window_prop_protocol_list_get */ | 751 | } |
750 | 752 | ||