summaryrefslogtreecommitdiff
path: root/efl/ecore_x
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-01-04 12:47:40 +0100
committerDave Andreoli <dave@gurumeditation.it>2015-01-04 12:47:40 +0100
commit863efc19ebe9d0da3b7ed387cd257657ad39c3dd (patch)
tree5f9eb781d53746cd18654c2493bd0aa7b7f3a2db /efl/ecore_x
parent1910563604d65bc76b377fec75d9b5570585d239 (diff)
Move ecore_x out of the ecore extension
Now ecore do not more looks like an alien with his __init__ hack and his different module/package structure This broke ecore.x users as the extension is now efl.ecore_x Sorry to bother but I still think that ecore_x should not be implemented in python, if this hurt you please let me know
Diffstat (limited to 'efl/ecore_x')
-rw-r--r--efl/ecore_x/efl.ecore_x.pxd1629
-rw-r--r--efl/ecore_x/efl.ecore_x.pyx302
-rw-r--r--efl/ecore_x/efl.ecore_x_events.pxi1039
-rw-r--r--efl/ecore_x/efl.ecore_x_window.pxi466
4 files changed, 3436 insertions, 0 deletions
diff --git a/efl/ecore_x/efl.ecore_x.pxd b/efl/ecore_x/efl.ecore_x.pxd
new file mode 100644
index 0000000..6947066
--- /dev/null
+++ b/efl/ecore_x/efl.ecore_x.pxd
@@ -0,0 +1,1629 @@
1# Copyright (C) 2007-2015 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 3 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17
18cdef extern from "sys/types.h":
19 ctypedef long pid_t
20
21cdef extern from "Eina.h":
22 ctypedef unsigned char Eina_Bool
23
24cdef extern from "Ecore_Input.h":
25 int ECORE_EVENT_KEY_DOWN
26 int ECORE_EVENT_KEY_UP
27 int ECORE_EVENT_MOUSE_BUTTON_DOWN
28 int ECORE_EVENT_MOUSE_BUTTON_UP
29 int ECORE_EVENT_MOUSE_MOVE
30 int ECORE_EVENT_MOUSE_IN
31 int ECORE_EVENT_MOUSE_OUT
32 int ECORE_EVENT_MOUSE_WHEEL
33
34 ctypedef void *Ecore_Window
35
36 ctypedef struct _Ecore_Point:
37 int x
38 int y
39
40 ctypedef struct Ecore_Event_Key:
41 char *keyname
42 char *key
43 char *string
44 char *compose
45 Ecore_Window window
46 Ecore_Window root_window
47 Ecore_Window event_window
48 unsigned int timestamp
49 unsigned int modifiers
50 int same_screen
51
52
53 ctypedef struct Ecore_Event_Mouse_Button:
54 Ecore_Window window
55 Ecore_Window root_window
56 Ecore_Window event_window
57 unsigned int timestamp
58 unsigned int modifiers
59 unsigned int buttons
60 unsigned int double_click
61 unsigned int triple_click
62 int same_screen
63 int x
64 int y
65 _Ecore_Point root
66
67
68 ctypedef struct Ecore_Event_Mouse_Move:
69 Ecore_Window window
70 Ecore_Window root_window
71 Ecore_Window event_window
72 unsigned int timestamp
73 unsigned int modifiers
74 int same_screen
75 int x
76 int y
77 _Ecore_Point root
78
79
80 ctypedef struct Ecore_Event_Mouse_IO:
81 Ecore_Window window
82 Ecore_Window event_window
83 unsigned int timestamp
84 unsigned int modifiers
85 int x
86 int y
87
88
89 ctypedef struct Ecore_Event_Mouse_Wheel:
90 Ecore_Window window
91 Ecore_Window root_window
92 Ecore_Window event_window
93 unsigned int timestamp
94 unsigned int modifiers
95 int same_screen
96 int direction
97 int z
98 int x
99 int y
100 _Ecore_Point root
101
102
103cdef extern from "Ecore_X.h":
104 ####################################################################
105 # Data Types
106 #
107 ctypedef unsigned int Ecore_X_ID
108 ctypedef Ecore_X_ID Ecore_X_Window
109 ctypedef void *Ecore_X_Visual
110 ctypedef Ecore_X_ID Ecore_X_Pixmap
111 ctypedef Ecore_X_ID Ecore_X_Drawable
112 ctypedef void *Ecore_X_GC
113 ctypedef Ecore_X_ID Ecore_X_Atom
114 ctypedef Ecore_X_ID Ecore_X_Colormap
115 ctypedef Ecore_X_ID Ecore_X_Time
116 ctypedef Ecore_X_ID Ecore_X_Cursor
117 ctypedef void Ecore_X_Display
118 ctypedef void Ecore_X_Connection
119 ctypedef void Ecore_X_Screen
120 ctypedef Ecore_X_ID Ecore_X_Sync_Counter
121 ctypedef Ecore_X_ID Ecore_X_Sync_Alarm
122 ctypedef unsigned short Ecore_X_Randr_Size_ID
123
124 ctypedef struct Ecore_X_Rectangle:
125 int x
126 int y
127 unsigned int width
128 unsigned int height
129
130 ctypedef struct Ecore_X_Icon:
131 unsigned int width
132 unsigned int height
133 unsigned int *data
134
135 ctypedef enum Ecore_X_Randr_Orientation:
136 ECORE_X_RANDR_ORIENTATION_ROT_0
137 ECORE_X_RANDR_ORIENTATION_ROT_90
138 ECORE_X_RANDR_ORIENTATION_ROT_180
139 ECORE_X_RANDR_ORIENTATION_ROT_270
140 ECORE_X_RANDR_ORIENTATION_FLIP_X
141 ECORE_X_RANDR_ORIENTATION_FLIP_Y
142
143 ctypedef enum Ecore_X_Render_Subpixel_Order:
144 ECORE_X_RENDER_SUBPIXEL_ORDER_UNKNOWN
145 ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_RGB
146 ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_BGR
147 ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_RGB
148 ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_BGR
149 ECORE_X_RENDER_SUBPIXEL_ORDER_NONE
150
151 ctypedef enum Ecore_X_Window_State:
152 ECORE_X_WINDOW_STATE_UNKNOWN
153 ECORE_X_WINDOW_STATE_ICONIFIED
154 ECORE_X_WINDOW_STATE_MODAL
155 ECORE_X_WINDOW_STATE_STICKY
156 ECORE_X_WINDOW_STATE_MAXIMIZED_VERT
157 ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ
158 ECORE_X_WINDOW_STATE_SHADED
159 ECORE_X_WINDOW_STATE_SKIP_TASKBAR
160 ECORE_X_WINDOW_STATE_SKIP_PAGER
161 ECORE_X_WINDOW_STATE_HIDDEN
162 ECORE_X_WINDOW_STATE_FULLSCREEN
163 ECORE_X_WINDOW_STATE_ABOVE
164 ECORE_X_WINDOW_STATE_BELOW
165 ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION
166
167 ctypedef enum Ecore_X_Window_State_Action:
168 ECORE_X_WINDOW_STATE_ACTION_REMOVE
169 ECORE_X_WINDOW_STATE_ACTION_ADD
170 ECORE_X_WINDOW_STATE_ACTION_TOGGLE
171
172 ctypedef enum Ecore_X_Window_Stack_Mode:
173 ECORE_X_WINDOW_STACK_ABOVE
174 ECORE_X_WINDOW_STACK_BELOW
175 ECORE_X_WINDOW_STACK_TOP_IF
176 ECORE_X_WINDOW_STACK_BOTTOM_IF
177 ECORE_X_WINDOW_STACK_OPPOSITE
178
179 ctypedef enum Ecore_X_Randr_Rotation:
180 ECORE_X_RANDR_ROT_0
181 ECORE_X_RANDR_ROT_90
182 ECORE_X_RANDR_ROT_180
183 ECORE_X_RANDR_ROT_270
184 ECORE_X_RANDR_FLIP_X
185 ECORE_X_RANDR_FLIP_Y
186
187 char *ECORE_X_SELECTION_TARGET_TARGETS
188 char *ECORE_X_SELECTION_TARGET_TEXT
189 char *ECORE_X_SELECTION_TARGET_COMPOUND_TEXT
190 char *ECORE_X_SELECTION_TARGET_STRING
191 char *ECORE_X_SELECTION_TARGET_UTF8_STRING
192 char *ECORE_X_SELECTION_TARGET_FILENAME
193
194 int ECORE_X_DND_VERSION
195
196 Ecore_X_Atom ECORE_X_DND_ACTION_COPY
197 Ecore_X_Atom ECORE_X_DND_ACTION_MOVE
198 Ecore_X_Atom ECORE_X_DND_ACTION_LINK
199 Ecore_X_Atom ECORE_X_DND_ACTION_ASK
200 Ecore_X_Atom ECORE_X_DND_ACTION_PRIVATE
201
202 ctypedef enum Ecore_X_Selection:
203 ECORE_X_SELECTION_PRIMARY
204 ECORE_X_SELECTION_SECONDARY
205 ECORE_X_SELECTION_XDND
206 ECORE_X_SELECTION_CLIPBOARD
207
208 ctypedef enum Ecore_X_Event_Mode:
209 ECORE_X_EVENT_MODE_NORMAL
210 ECORE_X_EVENT_MODE_WHILE_GRABBED
211 ECORE_X_EVENT_MODE_GRAB
212 ECORE_X_EVENT_MODE_UNGRAB
213
214 ctypedef enum Ecore_X_Event_Detail:
215 ECORE_X_EVENT_DETAIL_ANCESTOR
216 ECORE_X_EVENT_DETAIL_VIRTUAL
217 ECORE_X_EVENT_DETAIL_INFERIOR
218 ECORE_X_EVENT_DETAIL_NON_LINEAR
219 ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL
220 ECORE_X_EVENT_DETAIL_POINTER
221 ECORE_X_EVENT_DETAIL_POINTER_ROOT
222 ECORE_X_EVENT_DETAIL_DETAIL_NONE
223
224 ctypedef enum Ecore_X_Event_Mask:
225 ECORE_X_EVENT_MASK_NONE
226 ECORE_X_EVENT_MASK_KEY_DOWN
227 ECORE_X_EVENT_MASK_KEY_UP
228 ECORE_X_EVENT_MASK_MOUSE_DOWN
229 ECORE_X_EVENT_MASK_MOUSE_UP
230 ECORE_X_EVENT_MASK_MOUSE_IN
231 ECORE_X_EVENT_MASK_MOUSE_OUT
232 ECORE_X_EVENT_MASK_MOUSE_MOVE
233 ECORE_X_EVENT_MASK_WINDOW_DAMAGE
234 ECORE_X_EVENT_MASK_WINDOW_VISIBILITY
235 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE
236 ECORE_X_EVENT_MASK_WINDOW_RESIZE_MANAGE
237 ECORE_X_EVENT_MASK_WINDOW_MANAGE
238 ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE
239 ECORE_X_EVENT_MASK_WINDOW_FOCUS_CHANGE
240 ECORE_X_EVENT_MASK_WINDOW_PROPERTY
241 ECORE_X_EVENT_MASK_WINDOW_COLORMAP
242 ECORE_X_EVENT_MASK_WINDOW_GRAB
243 ECORE_X_EVENT_MASK_MOUSE_WHEEL
244 ECORE_X_EVENT_MASK_WINDOW_FOCUS_IN
245 ECORE_X_EVENT_MASK_WINDOW_FOCUS_OUT
246
247 ctypedef enum Ecore_X_Gravity:
248 ECORE_X_GRAVITY_FORGET
249 ECORE_X_GRAVITY_UNMAP
250 ECORE_X_GRAVITY_NW
251 ECORE_X_GRAVITY_N
252 ECORE_X_GRAVITY_NE
253 ECORE_X_GRAVITY_W
254 ECORE_X_GRAVITY_CENTER
255 ECORE_X_GRAVITY_E
256 ECORE_X_GRAVITY_SW
257 ECORE_X_GRAVITY_S
258 ECORE_X_GRAVITY_SE
259 ECORE_X_GRAVITY_STATIC
260
261 ctypedef enum Ecore_X_Shape_Type:
262 ECORE_X_SHAPE_BOUNDING
263 ECORE_X_SHAPE_CLIP
264
265 ctypedef struct Ecore_X_Event_Window_Focus_In:
266 Ecore_X_Window win
267 Ecore_X_Event_Mode mode
268 Ecore_X_Event_Detail detail
269 Ecore_X_Time time
270
271
272 ctypedef struct Ecore_X_Event_Window_Focus_Out:
273 Ecore_X_Window win
274 Ecore_X_Event_Mode mode
275 Ecore_X_Event_Detail detail
276 Ecore_X_Time time
277
278
279 ctypedef struct Ecore_X_Event_Window_Keymap:
280 Ecore_X_Window win
281
282
283 ctypedef struct Ecore_X_Event_Window_Damage:
284 Ecore_X_Window win
285 int x
286 int y
287 int w
288 int h
289 int count
290 Ecore_X_Time time
291
292
293 ctypedef struct Ecore_X_Event_Window_Visibility_Change:
294 Ecore_X_Window win
295 int fully_obscured
296 Ecore_X_Time time
297
298
299 ctypedef struct Ecore_X_Event_Window_Create:
300 Ecore_X_Window win
301 int override
302 Ecore_X_Time time
303
304
305 ctypedef struct Ecore_X_Event_Window_Destroy:
306 Ecore_X_Window win
307 Ecore_X_Time time
308
309
310 ctypedef struct Ecore_X_Event_Window_Hide:
311 Ecore_X_Window win
312 Ecore_X_Time time
313
314
315 ctypedef struct Ecore_X_Event_Window_Show:
316 Ecore_X_Window win
317 Ecore_X_Time time
318
319
320 ctypedef struct Ecore_X_Event_Window_Show_Request:
321 Ecore_X_Window win
322 Ecore_X_Window parent
323 Ecore_X_Time time
324
325
326 ctypedef struct Ecore_X_Event_Window_Reparent:
327 Ecore_X_Window win
328 Ecore_X_Window parent
329 Ecore_X_Time time
330
331
332 ctypedef struct Ecore_X_Event_Window_Configure:
333 Ecore_X_Window win
334 Ecore_X_Window abovewin
335 int x
336 int y
337 int w
338 int h
339 int border
340 unsigned int override
341 unsigned int from_wm
342 Ecore_X_Time time
343
344
345 ctypedef struct Ecore_X_Event_Window_Configure_Request:
346 Ecore_X_Window win
347 Ecore_X_Window abovewin
348 int x
349 int y
350 int w
351 int h
352 int border
353 Ecore_X_Window_Stack_Mode detail
354 unsigned long value_mask
355 Ecore_X_Time time
356
357
358 ctypedef struct Ecore_X_Event_Window_Gravity:
359 Ecore_X_Window win
360 Ecore_X_Time time
361
362
363 ctypedef struct Ecore_X_Event_Window_Resize_Request:
364 Ecore_X_Window win
365 int w
366 int h
367 Ecore_X_Time time
368
369
370 ctypedef struct Ecore_X_Event_Window_Stack:
371 Ecore_X_Window win
372 Ecore_X_Window event_win
373 Ecore_X_Window_Stack_Mode detail
374 Ecore_X_Time time
375
376
377 ctypedef struct Ecore_X_Event_Window_Stack_Request:
378 Ecore_X_Window win
379 Ecore_X_Window parent
380 Ecore_X_Window_Stack_Mode detail
381 Ecore_X_Time time
382
383
384 ctypedef struct Ecore_X_Event_Window_Property:
385 Ecore_X_Window win
386 Ecore_X_Atom atom
387 Ecore_X_Time time
388
389
390 ctypedef struct Ecore_X_Event_Window_Colormap:
391 Ecore_X_Window win
392 Ecore_X_Colormap cmap
393 int installed
394 Ecore_X_Time time
395
396
397 ctypedef struct Ecore_X_Event_Selection_Clear:
398 Ecore_X_Window win
399 Ecore_X_Selection selection
400 Ecore_X_Time time
401
402
403 ctypedef struct Ecore_X_Event_Selection_Request:
404 Ecore_X_Window owner
405 Ecore_X_Window requestor
406 Ecore_X_Time time
407 Ecore_X_Atom selection
408 Ecore_X_Atom target
409 Ecore_X_Atom property
410
411
412 ctypedef struct Ecore_X_Event_Selection_Notify:
413 Ecore_X_Window win
414 Ecore_X_Time time
415 Ecore_X_Selection selection
416 char *target
417 void *data
418
419
420 ctypedef enum _Ecore_X_Selection_Data_Content:
421 ECORE_X_SELECTION_CONTENT_NONE
422 ECORE_X_SELECTION_CONTENT_TEXT
423 ECORE_X_SELECTION_CONTENT_FILES
424 ECORE_X_SELECTION_CONTENT_TARGETS
425 ECORE_X_SELECTION_CONTENT_CUSTOM
426
427
428 ctypedef struct Ecore_X_Selection_Data:
429 _Ecore_X_Selection_Data_Content content
430 unsigned char *data
431 int length
432 int format
433 int (*free)(void *data)
434
435
436 ctypedef struct Ecore_X_Selection_Data_Files:
437 Ecore_X_Selection_Data data
438 char **files
439 int num_files
440
441
442 ctypedef struct Ecore_X_Selection_Data_Text:
443 Ecore_X_Selection_Data data
444 char *text
445
446
447 ctypedef struct Ecore_X_Selection_Data_Targets:
448 Ecore_X_Selection_Data data
449 char **targets
450 int num_targets
451
452
453 ctypedef struct Ecore_X_Event_Xdnd_Enter:
454 Ecore_X_Window win
455 Ecore_X_Window source
456 char **types
457 int num_types
458
459
460 ctypedef struct Ecore_X_Event_Xdnd_Position:
461 Ecore_X_Window win
462 Ecore_X_Window source
463 _Ecore_Point position
464 Ecore_X_Atom action
465
466
467 ctypedef struct Ecore_X_Event_Xdnd_Status:
468 Ecore_X_Window win
469 Ecore_X_Window target
470 int will_accept
471 Ecore_X_Rectangle rectangle
472 Ecore_X_Atom action
473
474
475 ctypedef struct Ecore_X_Event_Xdnd_Leave:
476 Ecore_X_Window win
477 Ecore_X_Window source
478
479
480 ctypedef struct Ecore_X_Event_Xdnd_Drop:
481 Ecore_X_Window win
482 Ecore_X_Window source
483 Ecore_X_Atom action
484 _Ecore_Point position
485
486
487 ctypedef struct Ecore_X_Event_Xdnd_Finished:
488 Ecore_X_Window win
489 Ecore_X_Window target
490 int completed
491 Ecore_X_Atom action
492
493
494 ctypedef union _Ecore_X_Event_Client_Message_Data:
495 char b[20]
496 short s[10]
497 long l[5]
498
499 ctypedef struct Ecore_X_Event_Client_Message:
500 Ecore_X_Window win
501 Ecore_X_Atom message_type
502 int format
503 _Ecore_X_Event_Client_Message_Data data
504 Ecore_X_Time time
505
506
507 ctypedef struct Ecore_X_Event_Window_Shape:
508 Ecore_X_Window win
509 Ecore_X_Time time
510
511
512 ctypedef struct Ecore_X_Event_Screensaver_Notify:
513 Ecore_X_Window win
514 int on
515 Ecore_X_Time time
516
517
518 ctypedef struct Ecore_X_Event_Sync_Counter:
519 Ecore_X_Time time
520
521
522 ctypedef struct Ecore_X_Event_Sync_Alarm:
523 Ecore_X_Time time
524 Ecore_X_Sync_Alarm alarm
525
526
527 ctypedef struct Ecore_X_Randr_Screen_Size_MM:
528 int width
529 int height
530 int width_mm
531 int height_mm
532
533
534 ctypedef struct Ecore_X_Event_Screen_Change:
535 Ecore_X_Window win
536 Ecore_X_Window root
537 Ecore_X_Randr_Screen_Size_MM size
538 Ecore_X_Time time
539 Ecore_X_Time config_time
540 Ecore_X_Randr_Orientation orientation
541 Ecore_X_Render_Subpixel_Order subpixel_order
542 Ecore_X_Randr_Size_ID size_id
543
544
545 ctypedef struct Ecore_X_Event_Window_Delete_Request:
546 Ecore_X_Window win
547 Ecore_X_Time time
548
549
550 ctypedef struct Ecore_X_Event_Startup_Sequence:
551 Ecore_X_Window win
552
553
554 ctypedef struct Ecore_X_Event_Window_Move_Resize_Request:
555 Ecore_X_Window win
556 int x
557 int y
558 int direction
559 int button
560 int source
561
562
563 ctypedef struct Ecore_X_Event_Window_State_Request:
564 Ecore_X_Window win
565 Ecore_X_Window_State_Action action
566 Ecore_X_Window_State state[2]
567 int source
568
569
570 ctypedef struct Ecore_X_Event_Frame_Extents_Request:
571 Ecore_X_Window win
572
573
574 ctypedef struct Ecore_X_Event_Ping:
575 Ecore_X_Window win
576 Ecore_X_Window event_win
577 Ecore_X_Time time
578
579
580 ctypedef struct Ecore_X_Event_Desktop_Change:
581 Ecore_X_Window win
582 unsigned int desk
583 int source
584
585
586 ctypedef struct Ecore_X_Event_Startup_Sequence:
587 Ecore_X_Window win
588
589
590 ctypedef struct Ecore_X_Event_Window_Move_Resize_Request:
591 Ecore_X_Window win
592 int x
593 int y
594 int direction
595 int button
596 int source
597
598
599 ctypedef struct Ecore_X_Event_Window_State_Request:
600 Ecore_X_Window win
601 Ecore_X_Window_State_Action action
602 Ecore_X_Window_State state[2]
603 int source
604
605
606 ctypedef struct Ecore_X_Event_Frame_Extents_Request:
607 Ecore_X_Window win
608
609
610 ctypedef struct Ecore_X_Event_Ping:
611 Ecore_X_Window win
612 Ecore_X_Window event_win
613 Ecore_X_Time time
614
615
616 ctypedef struct Ecore_X_Event_Desktop_Change:
617 Ecore_X_Window win
618 unsigned int desk
619 int source
620
621 int ECORE_X_EVENT_MOUSE_IN
622 int ECORE_X_EVENT_MOUSE_OUT
623 int ECORE_X_EVENT_WINDOW_FOCUS_IN
624 int ECORE_X_EVENT_WINDOW_FOCUS_OUT
625 int ECORE_X_EVENT_WINDOW_KEYMAP
626 int ECORE_X_EVENT_WINDOW_DAMAGE
627 int ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE
628 int ECORE_X_EVENT_WINDOW_CREATE
629 int ECORE_X_EVENT_WINDOW_DESTROY
630 int ECORE_X_EVENT_WINDOW_HIDE
631 int ECORE_X_EVENT_WINDOW_SHOW
632 int ECORE_X_EVENT_WINDOW_SHOW_REQUEST
633 int ECORE_X_EVENT_WINDOW_REPARENT
634 int ECORE_X_EVENT_WINDOW_CONFIGURE
635 int ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST
636 int ECORE_X_EVENT_WINDOW_GRAVITY
637 int ECORE_X_EVENT_WINDOW_RESIZE_REQUEST
638 int ECORE_X_EVENT_WINDOW_STACK
639 int ECORE_X_EVENT_WINDOW_STACK_REQUEST
640 int ECORE_X_EVENT_WINDOW_PROPERTY
641 int ECORE_X_EVENT_WINDOW_COLORMAP
642 int ECORE_X_EVENT_WINDOW_MAPPING
643 int ECORE_X_EVENT_SELECTION_CLEAR
644 int ECORE_X_EVENT_SELECTION_REQUEST
645 int ECORE_X_EVENT_SELECTION_NOTIFY
646 int ECORE_X_EVENT_CLIENT_MESSAGE
647 int ECORE_X_EVENT_WINDOW_SHAPE
648 int ECORE_X_EVENT_SCREENSAVER_NOTIFY
649 int ECORE_X_EVENT_SYNC_COUNTER
650 int ECORE_X_EVENT_SYNC_ALARM
651 int ECORE_X_EVENT_SCREEN_CHANGE
652 int ECORE_X_EVENT_RANDR_CRTC_CHANGE
653 int ECORE_X_EVENT_RANDR_OUTPUT_CHANGE
654 int ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY
655 int ECORE_X_EVENT_DAMAGE_NOTIFY
656
657 int ECORE_X_EVENT_WINDOW_DELETE_REQUEST
658
659 int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST
660 int ECORE_X_EVENT_WINDOW_STATE_REQUEST
661 int ECORE_X_EVENT_FRAME_EXTENTS_REQUEST
662 int ECORE_X_EVENT_PING
663 int ECORE_X_EVENT_DESKTOP_CHANGE
664
665 int ECORE_X_EVENT_STARTUP_SEQUENCE_NEW
666 int ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE
667 int ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE
668
669 int ECORE_X_EVENT_XDND_ENTER
670 int ECORE_X_EVENT_XDND_POSITION
671 int ECORE_X_EVENT_XDND_STATUS
672 int ECORE_X_EVENT_XDND_LEAVE
673 int ECORE_X_EVENT_XDND_DROP
674 int ECORE_X_EVENT_XDND_FINISHED
675
676 int ECORE_X_MODIFIER_SHIFT
677 int ECORE_X_MODIFIER_CTRL
678 int ECORE_X_MODIFIER_ALT
679 int ECORE_X_MODIFIER_WIN
680
681 int ECORE_X_LOCK_SCROLL
682 int ECORE_X_LOCK_NUM
683 int ECORE_X_LOCK_CAPS
684
685 ctypedef enum Ecore_X_WM_Protocol:
686 ECORE_X_WM_PROTOCOL_DELETE_REQUEST
687 ECORE_X_WM_PROTOCOL_TAKE_FOCUS
688 ECORE_X_NET_WM_PROTOCOL_PING
689 ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST
690 ECORE_X_WM_PROTOCOL_NUM
691
692 ctypedef enum Ecore_X_Window_Input_Mode:
693 ECORE_X_WINDOW_INPUT_MODE_NONE
694 ECORE_X_WINDOW_INPUT_MODE_PASSIVE
695 ECORE_X_WINDOW_INPUT_MODE_ACTIVE_LOCAL
696 ECORE_X_WINDOW_INPUT_MODE_ACTIVE_GLOBAL
697
698 ctypedef enum Ecore_X_Window_State_Hint:
699 ECORE_X_WINDOW_STATE_HINT_NONE
700 ECORE_X_WINDOW_STATE_HINT_WITHDRAWN
701 ECORE_X_WINDOW_STATE_HINT_NORMAL
702 ECORE_X_WINDOW_STATE_HINT_ICONIC
703
704 ctypedef enum Ecore_X_Window_Type:
705 ECORE_X_WINDOW_TYPE_UNKNOWN
706 ECORE_X_WINDOW_TYPE_DESKTOP
707 ECORE_X_WINDOW_TYPE_DOCK
708 ECORE_X_WINDOW_TYPE_TOOLBAR
709 ECORE_X_WINDOW_TYPE_MENU
710 ECORE_X_WINDOW_TYPE_UTILITY
711 ECORE_X_WINDOW_TYPE_SPLASH
712 ECORE_X_WINDOW_TYPE_DIALOG
713 ECORE_X_WINDOW_TYPE_NORMAL
714
715 ctypedef enum Ecore_X_Action:
716 ECORE_X_ACTION_MOVE
717 ECORE_X_ACTION_RESIZE
718 ECORE_X_ACTION_MINIMIZE
719 ECORE_X_ACTION_SHADE
720 ECORE_X_ACTION_STICK
721 ECORE_X_ACTION_MAXIMIZE_HORZ
722 ECORE_X_ACTION_MAXIMIZE_VERT
723 ECORE_X_ACTION_FULLSCREEN
724 ECORE_X_ACTION_CHANGE_DESKTOP
725 ECORE_X_ACTION_CLOSE
726
727 ctypedef enum Ecore_X_Window_Configure_Mask:
728 ECORE_X_WINDOW_CONFIGURE_MASK_X
729 ECORE_X_WINDOW_CONFIGURE_MASK_Y
730 ECORE_X_WINDOW_CONFIGURE_MASK_W
731 ECORE_X_WINDOW_CONFIGURE_MASK_H
732 ECORE_X_WINDOW_CONFIGURE_MASK_BORDER_WIDTH
733 ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING
734 ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE
735
736 int ECORE_X_WINDOW_LAYER_BELOW
737 int ECORE_X_WINDOW_LAYER_NORMAL
738 int ECORE_X_WINDOW_LAYER_ABOVE
739 int ECORE_X_PROP_LIST_REMOVE
740 int ECORE_X_PROP_LIST_ADD
741 int ECORE_X_PROP_LIST_TOGGLE
742
743 ctypedef enum Ecore_X_MWM_Hint_Func:
744 ECORE_X_MWM_HINT_FUNC_ALL
745 ECORE_X_MWM_HINT_FUNC_RESIZE
746 ECORE_X_MWM_HINT_FUNC_MOVE
747 ECORE_X_MWM_HINT_FUNC_MINIMIZE
748 ECORE_X_MWM_HINT_FUNC_MAXIMIZE
749 ECORE_X_MWM_HINT_FUNC_CLOSE
750
751 ctypedef enum Ecore_X_MWM_Hint_Decor:
752 ECORE_X_MWM_HINT_DECOR_ALL
753 ECORE_X_MWM_HINT_DECOR_BORDER
754 ECORE_X_MWM_HINT_DECOR_RESIZEH
755 ECORE_X_MWM_HINT_DECOR_TITLE
756 ECORE_X_MWM_HINT_DECOR_MENU
757 ECORE_X_MWM_HINT_DECOR_MINIMIZE
758 ECORE_X_MWM_HINT_DECOR_MAXIMIZE
759
760 ctypedef enum Ecore_X_MWM_Hint_Input:
761 ECORE_X_MWM_HINT_INPUT_MODELESS
762 ECORE_X_MWM_HINT_INPUT_PRIMARY_APPLICATION_MODAL
763 ECORE_X_MWM_HINT_INPUT_SYSTEM_MODAL
764 ECORE_X_MWM_HINT_INPUT_FULL_APPLICATION_MODAL
765
766 ctypedef struct _Ecore_X_Window_Attributes_Event_Mask:
767 Ecore_X_Event_Mask mine
768 Ecore_X_Event_Mask all
769 Ecore_X_Event_Mask no_propagate
770
771 ctypedef struct Ecore_X_Window_Attributes:
772 Ecore_X_Window root
773 int x
774 int y
775 int w
776 int h
777 int border
778 int depth
779 unsigned char visible
780 unsigned char viewable
781 unsigned char override
782 unsigned char input_only
783 unsigned char save_under
784 _Ecore_X_Window_Attributes_Event_Mask event_mask
785 Ecore_X_Gravity window_gravity
786 Ecore_X_Gravity pixel_gravity
787 Ecore_X_Colormap colormap
788 Ecore_X_Visual visual
789
790 ctypedef struct Ecore_X_Screen_Size:
791 int width
792 int height
793
794 ctypedef struct Ecore_X_Screen_Refresh_Rate:
795 int rate
796
797 ctypedef Ecore_X_ID Ecore_X_Picture
798 ctypedef Ecore_X_ID Ecore_X_Region
799 ctypedef enum Ecore_X_Region_Type:
800 ECORE_X_REGION_BOUNDING
801 ECORE_X_REGION_CLIP
802
803 ctypedef Ecore_X_ID Ecore_X_Picture
804 ctypedef Ecore_X_ID Ecore_X_Region
805 ctypedef enum Ecore_X_Region_Type:
806 ECORE_X_REGION_BOUNDING
807 ECORE_X_REGION_CLIP
808
809 ctypedef Ecore_X_ID Ecore_X_Damage
810
811 ctypedef enum Ecore_X_Damage_Report_Level:
812 ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES
813 ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES
814 ECORE_X_DAMAGE_REPORT_BOUNDING_BOX
815 ECORE_X_DAMAGE_REPORT_NON_EMPTY
816
817 ctypedef struct Ecore_X_Event_Damage:
818 Ecore_X_Damage_Report_Level level
819 Ecore_X_Drawable drawable
820 Ecore_X_Damage damage
821 int more
822 Ecore_X_Time time
823 Ecore_X_Rectangle area
824 Ecore_X_Rectangle geometry
825
826
827 ####################################################################
828 # Functions
829 #
830 int ecore_x_init(char *name)
831 int ecore_x_shutdown()
832 int ecore_x_disconnect()
833 Ecore_X_Display *ecore_x_display_get()
834 Ecore_X_Connection *ecore_x_connection_get()
835 int ecore_x_fd_get()
836 Ecore_X_Screen *ecore_x_default_screen_get()
837 void ecore_x_double_click_time_set(double t)
838 double ecore_x_double_click_time_get()
839 void ecore_x_flush()
840 void ecore_x_sync()
841 void ecore_x_killall(Ecore_X_Window root)
842 void ecore_x_kill(Ecore_X_Window win)
843
844 Ecore_X_Time ecore_x_current_time_get()
845
846 void ecore_x_error_handler_set(void (*func) (void *data), void *data)
847 void ecore_x_io_error_handler_set(void (*func) (void *data), void *data)
848 int ecore_x_error_request_get()
849 int ecore_x_error_code_get()
850
851 void ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask)
852 void ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask)
853
854 int ecore_x_selection_notify_send(Ecore_X_Window requestor, Ecore_X_Atom selection, Ecore_X_Atom target, Ecore_X_Atom property, Ecore_X_Time time)
855 void ecore_x_selection_primary_prefetch()
856 void ecore_x_selection_primary_fetch()
857 int ecore_x_selection_primary_set(Ecore_X_Window w, void *data, int size)
858 int ecore_x_selection_primary_clear()
859 void ecore_x_selection_secondary_prefetch()
860 void ecore_x_selection_secondary_fetch()
861 int ecore_x_selection_secondary_set(Ecore_X_Window w, void *data, int size)
862 int ecore_x_selection_secondary_clear()
863 void ecore_x_selection_xdnd_prefetch()
864 void ecore_x_selection_xdnd_fetch()
865 int ecore_x_selection_xdnd_set(Ecore_X_Window w, void *data, int size)
866 int ecore_x_selection_xdnd_clear()
867 void ecore_x_selection_clipboard_prefetch()
868 void ecore_x_selection_clipboard_fetch()
869 int ecore_x_selection_clipboard_set(Ecore_X_Window w, void *data, int size)
870 int ecore_x_selection_clipboard_clear()
871 void ecore_x_selection_primary_request(Ecore_X_Window w, char *target)
872 void ecore_x_selection_secondary_request(Ecore_X_Window w, char *target)
873 void ecore_x_selection_xdnd_request(Ecore_X_Window w, char *target)
874 void ecore_x_selection_clipboard_request(Ecore_X_Window w, char *target)
875 int ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target, void **data_ret)
876 void ecore_x_selection_converter_add(char *target, int (*func)(char *target, void *data, int size, void **data_ret, int *size_ret))
877 void ecore_x_selection_converter_atom_add(Ecore_X_Atom target, int (*func)(char *target, void *data, int size, void **data_ret, int *size_ret))
878 void ecore_x_selection_converter_del(char *target)
879 void ecore_x_selection_converter_atom_del(Ecore_X_Atom target)
880 void ecore_x_selection_parser_add(char *target, void *(*func)(char *target, void *data, int size, int format))
881 void ecore_x_selection_parser_del(char *target)
882
883 void ecore_x_dnd_aware_set(Ecore_X_Window win, int on)
884 void ecore_x_dnd_version_get_prefetch(Ecore_X_Window window)
885 void ecore_x_dnd_version_get_fetch()
886 int ecore_x_dnd_version_get(Ecore_X_Window win)
887 void ecore_x_dnd_type_get_prefetch(Ecore_X_Window window)
888 void ecore_x_dnd_type_get_fetch()
889 int ecore_x_dnd_type_isset(Ecore_X_Window win, char *type)
890 void ecore_x_dnd_type_set(Ecore_X_Window win, char *type, int on)
891 void ecore_x_dnd_types_set(Ecore_X_Window win, char **types, unsigned int num_types)
892 void ecore_x_dnd_actions_set(Ecore_X_Window win, Ecore_X_Atom *actions, unsigned int num_actions)
893 void ecore_x_dnd_begin_prefetch(Ecore_X_Window source)
894 void ecore_x_dnd_begin_fetch()
895 int ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size)
896 int ecore_x_dnd_drop()
897 void ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectangle, Ecore_X_Atom action)
898 void ecore_x_dnd_send_finished()
899
900 Ecore_X_Window ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
901 Ecore_X_Window ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
902 int ecore_x_window_argb_get(Ecore_X_Window win)
903 Ecore_X_Window ecore_x_window_manager_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
904 Ecore_X_Window ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
905 Ecore_X_Window ecore_x_window_override_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
906 Ecore_X_Window ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h)
907 void ecore_x_window_configure(Ecore_X_Window win, Ecore_X_Window_Configure_Mask mask, int x, int y, int w, int h, int border_width, Ecore_X_Window sibling, int stack_mode)
908 void ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor c)
909 void ecore_x_window_free(Ecore_X_Window win)
910 void ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
911 Ecore_X_Window *ecore_x_window_ignore_list(int *num)
912
913 void ecore_x_window_delete_request_send(Ecore_X_Window win)
914 void ecore_x_window_show(Ecore_X_Window win)
915 void ecore_x_window_hide(Ecore_X_Window win)
916 void ecore_x_window_move(Ecore_X_Window win, int x, int y)
917 void ecore_x_window_resize(Ecore_X_Window win, int w, int h)
918 void ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h)
919 void ecore_x_window_focus(Ecore_X_Window win)
920 void ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time t)
921 void ecore_x_get_input_focus_prefetch()
922 void ecore_x_get_input_focus_fetch()
923 Ecore_X_Window ecore_x_window_focus_get()
924 void ecore_x_window_raise(Ecore_X_Window win)
925 void ecore_x_window_lower(Ecore_X_Window win)
926 void ecore_x_window_reparent(Ecore_X_Window win, Ecore_X_Window new_parent, int x, int y)
927 void ecore_x_window_size_get(Ecore_X_Window win, int *w, int *h)
928 void ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h)
929 int ecore_x_window_border_width_get(Ecore_X_Window win)
930 void ecore_x_window_border_width_set(Ecore_X_Window win, int width)
931 int ecore_x_window_depth_get(Ecore_X_Window win)
932 void ecore_x_window_cursor_show(Ecore_X_Window win, int show)
933 void ecore_x_window_defaults_set(Ecore_X_Window win)
934 int ecore_x_window_visible_get(Ecore_X_Window win)
935 Ecore_X_Window ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, int x, int y, Ecore_X_Window *skip, int skip_num)
936 void ecore_x_window_shadow_tree_flush()
937 Ecore_X_Window ecore_x_window_root_get(Ecore_X_Window win)
938 Ecore_X_Window ecore_x_window_at_xy_get(int x, int y)
939 Ecore_X_Window ecore_x_window_at_xy_with_skip_get(int x, int y, Ecore_X_Window *skip, int skip_num)
940 Ecore_X_Window ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y)
941 void ecore_x_query_tree_prefetch(Ecore_X_Window window)
942 void ecore_x_query_tree_fetch()
943 Ecore_X_Window ecore_x_window_parent_get(Ecore_X_Window win)
944
945 void ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r, unsigned short g, unsigned short b)
946 void ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
947 void ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
948 void ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pmap)
949 void ecore_x_window_area_clear(Ecore_X_Window win, int x, int y, int w, int h)
950 void ecore_x_window_area_expose(Ecore_X_Window win, int x, int y, int w, int h)
951 void ecore_x_window_override_set(Ecore_X_Window win, int override)
952
953 void ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom, unsigned int *val, unsigned int num)
954 void ecore_x_window_prop_card32_get_prefetch(Ecore_X_Window window, Ecore_X_Atom atom)
955 void ecore_x_window_prop_card32_get_fetch()
956 int ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom, unsigned int *val, unsigned int len)
957 int ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom, unsigned int **plst)
958
959 void ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID * lst, unsigned int num)
960 void ecore_x_window_prop_xid_get_prefetch(Ecore_X_Window window, Ecore_X_Atom atom, Ecore_X_Atom type)
961 void ecore_x_window_prop_xid_get_fetch()
962 int ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID * lst, unsigned int len)
963 int ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID ** plst)
964 void ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID item, int op)
965 void ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom * val, unsigned int num)
966 void ecore_x_window_prop_atom_get_prefetch(Ecore_X_Window window, Ecore_X_Atom atom)
967 void ecore_x_window_prop_atom_get_fetch()
968 int ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom * val, unsigned int len)
969 int ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom ** plst)
970 void ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom item, int op)
971 void ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Window * val, unsigned int num)
972 void ecore_x_window_prop_window_get_prefetch(Ecore_X_Window window, Ecore_X_Atom atom)
973 void ecore_x_window_prop_window_get_fetch()
974 int ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Window * val, unsigned int len)
975 int ecore_x_window_prop_window_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Window ** plst)
976
977 Ecore_X_Atom ecore_x_window_prop_any_type()
978 void ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Atom format, int size, void *data, int number)
979 void ecore_x_window_prop_property_get_prefetch(Ecore_X_Window window, Ecore_X_Atom property, Ecore_X_Atom type)
980 void ecore_x_window_prop_property_get_fetch()
981 int ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecore_X_Atom type, int size, unsigned char **data, int *num)
982 void ecore_x_window_prop_property_del(Ecore_X_Window win, Ecore_X_Atom property)
983 void ecore_x_window_prop_list_prefetch(Ecore_X_Window window)
984 void ecore_x_window_prop_list_fetch()
985 Ecore_X_Atom *ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
986 void ecore_x_window_prop_string_set(Ecore_X_Window win, Ecore_X_Atom type, char *str)
987 void ecore_x_window_prop_string_get_prefetch(Ecore_X_Window window, Ecore_X_Atom type)
988 void ecore_x_window_prop_string_get_fetch()
989 char *ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
990 int ecore_x_window_prop_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
991 Ecore_X_WM_Protocol *ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
992
993 void ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
994 void ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
995 void ecore_x_window_shape_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y)
996 void ecore_x_window_shape_rectangle_set(Ecore_X_Window win, int x, int y, int w, int h)
997 void ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num)
998 void ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
999 void ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y)
1000 void ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h)
1001 void ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h)
1002 void ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num)
1003 void ecore_x_window_shape_rectangles_get_prefetch(Ecore_X_Window window)
1004 void ecore_x_window_shape_rectangles_get_fetch()
1005 Ecore_X_Rectangle *ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
1006 void ecore_x_window_shape_events_select(Ecore_X_Window win, int on)
1007
1008 Ecore_X_Pixmap ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
1009 void ecore_x_pixmap_del(Ecore_X_Pixmap pmap)
1010 void ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest, Ecore_X_GC gc, int sx, int sy, int w, int h, int dx, int dy)
1011 void ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h)
1012 int ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap)
1013
1014 Ecore_X_GC ecore_x_gc_new(Ecore_X_Drawable draw)
1015 void ecore_x_gc_del(Ecore_X_GC gc)
1016
1017 int ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Event_Mask mask, long d0, long d1, long d2, long d3, long d4)
1018 int ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, void *data, int len)
1019 int ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y)
1020 int ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b)
1021 int ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b)
1022
1023 void ecore_x_drawable_geometry_get_prefetch(Ecore_X_Drawable drawable)
1024 void ecore_x_drawable_geometry_get_fetch()
1025 void ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h)
1026 int ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
1027 int ecore_x_drawable_depth_get(Ecore_X_Drawable d)
1028
1029 int ecore_x_cursor_color_supported_get()
1030 Ecore_X_Cursor ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y)
1031 void ecore_x_cursor_free(Ecore_X_Cursor c)
1032 Ecore_X_Cursor ecore_x_cursor_shape_get(int shape)
1033 void ecore_x_cursor_size_set(int size)
1034 int ecore_x_cursor_size_get()
1035
1036 Ecore_X_Window *ecore_x_window_root_list(int *num_ret)
1037 Ecore_X_Window ecore_x_window_root_first_get()
1038 int ecore_x_window_manage(Ecore_X_Window win)
1039 void ecore_x_window_container_manage(Ecore_X_Window win)
1040 void ecore_x_window_client_manage(Ecore_X_Window win)
1041 void ecore_x_window_sniff(Ecore_X_Window win)
1042 void ecore_x_window_client_sniff(Ecore_X_Window win)
1043 void ecore_x_atom_get_prefetch(char *name)
1044 void ecore_x_atom_get_fetch()
1045 Ecore_X_Atom ecore_x_atom_get(char *name)
1046
1047 void ecore_x_icccm_init()
1048 void ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state)
1049 Ecore_X_Window_State_Hint ecore_x_icccm_state_get(Ecore_X_Window win)
1050 void ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t)
1051 void ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t)
1052 void ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t)
1053 void ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h)
1054 void ecore_x_icccm_hints_set(Ecore_X_Window win, int accepts_focus, Ecore_X_Window_State_Hint initial_state, Ecore_X_Pixmap icon_pixmap, Ecore_X_Pixmap icon_mask, Ecore_X_Window icon_window, Ecore_X_Window window_group, int is_urgent)
1055 int ecore_x_icccm_hints_get(Ecore_X_Window win, Eina_Bool *accepts_focus, Ecore_X_Window_State_Hint *initial_state, Ecore_X_Pixmap *icon_pixmap, Ecore_X_Pixmap *icon_mask, Ecore_X_Window *icon_window, Ecore_X_Window *window_group, Eina_Bool *is_urgent)
1056 void ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, int request_pos, Ecore_X_Gravity gravity, int min_w, int min_h, int max_w, int max_h, int base_w, int base_h, int step_x, int step_y, double min_aspect, double max_aspect)
1057 int ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, int *request_pos, Ecore_X_Gravity *gravity, int *min_w, int *min_h, int *max_w, int *max_h, int *base_w, int *base_h, int *step_x, int *step_y, double *min_aspect, double *max_aspect)
1058 void ecore_x_icccm_title_set(Ecore_X_Window win, char *t)
1059 char *ecore_x_icccm_title_get(Ecore_X_Window win)
1060 void ecore_x_icccm_protocol_set(Ecore_X_Window win, Ecore_X_WM_Protocol protocol, int on)
1061 int ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
1062 void ecore_x_icccm_name_class_set(Ecore_X_Window win, char *n, char *c)
1063 void ecore_x_icccm_name_class_get(Ecore_X_Window win, char **n, char **c)
1064 char *ecore_x_icccm_client_machine_get(Ecore_X_Window win)
1065 void ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv)
1066 void ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
1067 char *ecore_x_icccm_icon_name_get(Ecore_X_Window win)
1068 void ecore_x_icccm_icon_name_set(Ecore_X_Window win, char *t)
1069 void ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
1070 void ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
1071 void ecore_x_icccm_transient_for_set(Ecore_X_Window win, Ecore_X_Window forwin)
1072 void ecore_x_icccm_transient_for_unset(Ecore_X_Window win)
1073 Ecore_X_Window ecore_x_icccm_transient_for_get(Ecore_X_Window win)
1074 void ecore_x_icccm_window_role_set(Ecore_X_Window win, char *role)
1075 char *ecore_x_icccm_window_role_get(Ecore_X_Window win)
1076 void ecore_x_icccm_client_leader_set(Ecore_X_Window win, Ecore_X_Window l)
1077 Ecore_X_Window ecore_x_icccm_client_leader_get(Ecore_X_Window win)
1078 void ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root)
1079
1080 void ecore_x_mwm_hints_get_prefetch(Ecore_X_Window window)
1081 void ecore_x_mwm_hints_get_fetch()
1082 int ecore_x_mwm_hints_get(Ecore_X_Window win, Ecore_X_MWM_Hint_Func *fhint, Ecore_X_MWM_Hint_Decor *dhint, Ecore_X_MWM_Hint_Input *ihint)
1083 void ecore_x_mwm_borderless_set(Ecore_X_Window win, int borderless)
1084
1085 void ecore_x_netwm_init()
1086 void ecore_x_netwm_shutdown()
1087 void ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check, char *wm_name)
1088 void ecore_x_netwm_supported_set(Ecore_X_Window root, Ecore_X_Atom *supported, int num)
1089 void ecore_x_netwm_supported_get_prefetch(Ecore_X_Window root)
1090 void ecore_x_netwm_supported_get_fetch()
1091 int ecore_x_netwm_supported_get(Ecore_X_Window root, Ecore_X_Atom **supported, int *num)
1092 void ecore_x_netwm_desk_count_set(Ecore_X_Window root, unsigned int n_desks)
1093 void ecore_x_netwm_desk_roots_set(Ecore_X_Window root, Ecore_X_Window *vroots, unsigned int n_desks)
1094 void ecore_x_netwm_desk_names_set(Ecore_X_Window root, char **names, unsigned int n_desks)
1095 void ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width, unsigned int height)
1096 void ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, unsigned int *areas, unsigned int n_desks)
1097 void ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk)
1098 void ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, unsigned int *origins, unsigned int n_desks)
1099 void ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation, int columns, int rows, int starting_corner)
1100 void ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on)
1101 void ecore_x_netwm_client_list_set(Ecore_X_Window root, Ecore_X_Window *p_clients, unsigned int n_clients)
1102 void ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, Ecore_X_Window *p_clients, unsigned int n_clients)
1103 void ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win)
1104 void ecore_x_netwm_name_set(Ecore_X_Window win, char *name)
1105 void ecore_x_netwm_name_get_prefetch(Ecore_X_Window window)
1106 void ecore_x_netwm_name_get_fetch()
1107 int ecore_x_netwm_name_get(Ecore_X_Window win, char **name)
1108 void ecore_x_netwm_startup_id_set(Ecore_X_Window win, char *id)
1109 void ecore_x_netwm_startup_id_get_prefetch(Ecore_X_Window window)
1110 void ecore_x_netwm_startup_id_get_fetch()
1111 int ecore_x_netwm_startup_id_get(Ecore_X_Window win, char **id)
1112 void ecore_x_netwm_visible_name_set(Ecore_X_Window win, char *name)
1113 void ecore_x_netwm_visible_name_get_prefetch(Ecore_X_Window window)
1114 void ecore_x_netwm_visible_name_get_fetch()
1115 int ecore_x_netwm_visible_name_get(Ecore_X_Window win, char **name)
1116 void ecore_x_netwm_icon_name_set(Ecore_X_Window win, char *name)
1117 void ecore_x_netwm_icon_name_get_prefetch(Ecore_X_Window window)
1118 void ecore_x_netwm_icon_name_get_fetch()
1119 int ecore_x_netwm_icon_name_get(Ecore_X_Window win, char **name)
1120 void ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, char *name)
1121 void ecore_x_netwm_visible_icon_name_get_prefetch(Ecore_X_Window window)
1122 void ecore_x_netwm_visible_icon_name_get_fetch()
1123 int ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, char **name)
1124 void ecore_x_netwm_desktop_set(Ecore_X_Window win, unsigned int desk)
1125 void ecore_x_netwm_desktop_get_prefetch(Ecore_X_Window window)
1126 void ecore_x_netwm_desktop_get_fetch()
1127 int ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
1128 void ecore_x_netwm_strut_set(Ecore_X_Window win, int left, int right, int top, int bottom)
1129 void ecore_x_netwm_strut_get_prefetch(Ecore_X_Window window)
1130 void ecore_x_netwm_strut_get_fetch()
1131 int ecore_x_netwm_strut_get(Ecore_X_Window win, int *left, int *right, int *top, int *bottom)
1132 void ecore_x_netwm_strut_partial_set(Ecore_X_Window win, int left, int right, int top, int bottom, int left_start_y, int left_end_y, int right_start_y, int right_end_y, int top_start_x, int top_end_x, int bottom_start_x, int bottom_end_x)
1133 void ecore_x_netwm_strut_partial_get_prefetch(Ecore_X_Window window)
1134 void ecore_x_netwm_strut_partial_get_fetch()
1135 int ecore_x_netwm_strut_partial_get(Ecore_X_Window win, int *left, int *right, int *top, int *bottom, int *left_start_y, int *left_end_y, int *right_start_y, int *right_end_y, int *top_start_x, int *top_end_x, int *bottom_start_x, int *bottom_end_x)
1136 void ecore_x_netwm_icons_get_prefetch(Ecore_X_Window window)
1137 void ecore_x_netwm_icons_get_fetch()
1138 int ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
1139 void ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, int x, int y, int width, int height)
1140 void ecore_x_netwm_icon_geometry_get_prefetch(Ecore_X_Window window)
1141 void ecore_x_netwm_icon_geometry_get_fetch()
1142 int ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, int *x, int *y, int *width, int *height)
1143 void ecore_x_netwm_pid_set(Ecore_X_Window win, int pid)
1144 void ecore_x_netwm_pid_get_prefetch(Ecore_X_Window window)
1145 void ecore_x_netwm_pid_get_fetch()
1146 int ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid)
1147 void ecore_x_netwm_handled_icons_set(Ecore_X_Window win)
1148 void ecore_x_netwm_handled_icons_get_prefetch(Ecore_X_Window window)
1149 void ecore_x_netwm_handled_icons_get_fetch()
1150 int ecore_x_netwm_handled_icons_get(Ecore_X_Window win)
1151 void ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int time)
1152 void ecore_x_netwm_user_time_get_prefetch(Ecore_X_Window window)
1153 void ecore_x_netwm_user_time_get_fetch()
1154 int ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *time)
1155 void ecore_x_netwm_window_state_set(Ecore_X_Window win, Ecore_X_Window_State *state, unsigned int num)
1156 void ecore_x_netwm_window_state_get_prefetch(Ecore_X_Window window)
1157 void ecore_x_netwm_window_state_get_fetch()
1158 int ecore_x_netwm_window_state_get(Ecore_X_Window win, Ecore_X_Window_State **state, unsigned int *num)
1159 void ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type)
1160 void ecore_x_netwm_window_type_get_prefetch(Ecore_X_Window window)
1161 void ecore_x_netwm_window_type_get_fetch()
1162 int ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type)
1163 int ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action)
1164 void ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action *action, unsigned int num)
1165 void ecore_x_netwm_allowed_action_get_prefetch(Ecore_X_Window window)
1166 void ecore_x_netwm_allowed_action_get_fetch()
1167 int ecore_x_netwm_allowed_action_get(Ecore_X_Window win, Ecore_X_Action **action, unsigned int *num)
1168 void ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity)
1169 void ecore_x_netwm_opacity_get_prefetch(Ecore_X_Window window)
1170 void ecore_x_netwm_opacity_get_fetch()
1171 int ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity)
1172 void ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
1173 void ecore_x_netwm_frame_size_get_prefetch(Ecore_X_Window window)
1174 void ecore_x_netwm_frame_size_get_fetch()
1175 int ecore_x_netwm_frame_size_get(Ecore_X_Window win, int *fl, int *fr, int *ft, int *fb)
1176 void ecore_x_netwm_sync_counter_get_prefetch(Ecore_X_Window window)
1177 void ecore_x_netwm_sync_counter_get_fetch()
1178 int ecore_x_netwm_sync_counter_get(Ecore_X_Window win, Ecore_X_Sync_Counter *counter)
1179 void ecore_x_netwm_ping_send(Ecore_X_Window win)
1180 void ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial)
1181 void ecore_x_netwm_state_request_send(Ecore_X_Window win, Ecore_X_Window root, Ecore_X_Window_State s1, Ecore_X_Window_State s2, int set)
1182 void ecore_x_netwm_desktop_request_send(Ecore_X_Window win, Ecore_X_Window root, unsigned int desktop)
1183
1184 void ecore_x_e_init()
1185 void ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
1186
1187 void ecore_x_xinerama_query_screens_prefetch()
1188 void ecore_x_xinerama_query_screens_fetch()
1189 int ecore_x_xinerama_screen_count_get()
1190 int ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
1191
1192 void ecore_x_get_window_attributes_prefetch(Ecore_X_Window window)
1193 void ecore_x_get_window_attributes_fetch()
1194 int ecore_x_window_attributes_get(Ecore_X_Window win, Ecore_X_Window_Attributes *att_ret)
1195 void ecore_x_window_save_set_add(Ecore_X_Window win)
1196 void ecore_x_window_save_set_del(Ecore_X_Window win)
1197 Ecore_X_Window *ecore_x_window_children_get(Ecore_X_Window win, int *num)
1198
1199 int ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold)
1200 void ecore_x_pointer_control_get_prefetch()
1201 void ecore_x_pointer_control_get_fetch()
1202 int ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold)
1203 int ecore_x_pointer_grab(Ecore_X_Window win)
1204 int ecore_x_pointer_confine_grab(Ecore_X_Window win)
1205 void ecore_x_pointer_ungrab()
1206 int ecore_x_pointer_warp(Ecore_X_Window win, int x, int y)
1207 int ecore_x_keyboard_grab(Ecore_X_Window win)
1208 void ecore_x_keyboard_ungrab()
1209 void ecore_x_grab()
1210 void ecore_x_ungrab()
1211 void ecore_x_passive_grab_replay_func_set(int (*func) (void *data, int event_type, void *event), void *data)
1212 void ecore_x_window_button_grab(Ecore_X_Window win, int button, Ecore_X_Event_Mask event_mask, int mod, int any_mod)
1213 void ecore_x_window_button_ungrab(Ecore_X_Window win, int button, int mod, int any_mod)
1214 void ecore_x_window_key_grab(Ecore_X_Window win, char *key, int mod, int any_mod)
1215 void ecore_x_window_key_ungrab(Ecore_X_Window win, char *key, int mod, int any_mod)
1216
1217 void ecore_x_focus_reset()
1218 void ecore_x_events_allow_all()
1219 void ecore_x_pointer_last_xy_get(int *x, int *y)
1220 void ecore_x_pointer_xy_get_prefetch(Ecore_X_Window window)
1221 void ecore_x_pointer_xy_get_fetch()
1222 void ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
1223
1224 Ecore_X_Sync_Alarm ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter)
1225 int ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm)
1226
1227 int ecore_x_randr_events_select(Ecore_X_Window win, int on)
1228 void ecore_x_randr_get_screen_info_prefetch(Ecore_X_Window window)
1229 void ecore_x_randr_get_screen_info_fetch()
1230 Ecore_X_Randr_Rotation ecore_x_randr_screen_rotations_get(Ecore_X_Window root)
1231 Ecore_X_Randr_Rotation ecore_x_randr_screen_rotation_get(Ecore_X_Window root)
1232 void ecore_x_randr_screen_rotation_set(Ecore_X_Window root, Ecore_X_Randr_Rotation rot)
1233 Ecore_X_Screen_Size *ecore_x_randr_screen_sizes_get(Ecore_X_Window root, int *num)
1234 Ecore_X_Screen_Size ecore_x_randr_current_screen_size_get(Ecore_X_Window root)
1235 int ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size)
1236
1237 Ecore_X_Screen_Refresh_Rate *ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root, int size_id, int *num)
1238 Ecore_X_Screen_Refresh_Rate ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root)
1239
1240 int ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root, Ecore_X_Screen_Size size, Ecore_X_Screen_Refresh_Rate rate)
1241
1242 Ecore_X_Region ecore_x_region_new(Ecore_X_Rectangle *rects, int num)
1243 Ecore_X_Region ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap)
1244 Ecore_X_Region ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type)
1245 Ecore_X_Region ecore_x_region_new_from_gc(Ecore_X_GC gc)
1246 Ecore_X_Region ecore_x_region_new_from_picture(Ecore_X_Picture picture)
1247 void ecore_x_region_del(Ecore_X_Region region)
1248 void ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num)
1249 void ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source)
1250 void ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2)
1251 void ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2)
1252 void ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2)
1253 void ecore_x_region_invert(Ecore_X_Region dest, Ecore_X_Rectangle *bounds, Ecore_X_Region source)
1254 void ecore_x_region_translate(Ecore_X_Region region, int dx, int dy)
1255 void ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source)
1256 void ecore_x_region_fetch_prefetch(Ecore_X_Region region)
1257 void ecore_x_region_fetch_fetch()
1258 Ecore_X_Rectangle * ecore_x_region_fetch(Ecore_X_Region region, int *num, Ecore_X_Rectangle *bounds)
1259 void ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int left, unsigned int right, unsigned int top, unsigned int bottom)
1260 void ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x_origin, int y_origin)
1261 void ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window win, Ecore_X_Shape_Type type, int x_offset, int y_offset)
1262 void ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture, int x_origin, int y_origin)
1263
1264 int ecore_x_composite_query()
1265
1266 int ecore_x_damage_query()
1267 Ecore_X_Damage ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level)
1268 void ecore_x_damage_del(Ecore_X_Damage damage)
1269 void ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Region parts)
1270
1271 int ecore_x_screen_is_composited(int screen)
1272
1273 int ecore_x_dpms_query()
1274 void ecore_x_dpms_capable_get_prefetch()
1275 void ecore_x_dpms_capable_get_fetch()
1276 int ecore_x_dpms_capable_get()
1277 void ecore_x_dpms_enable_get_prefetch()
1278 void ecore_x_dpms_enable_get_fetch()
1279 int ecore_x_dpms_enabled_get()
1280 void ecore_x_dpms_enabled_set(int enabled)
1281 void ecore_x_dpms_timeouts_get_prefetch()
1282 void ecore_x_dpms_timeouts_get_fetch()
1283 void ecore_x_dpms_timeouts_get(unsigned int *standby, unsigned int *suspend, unsigned int *off)
1284 int ecore_x_dpms_timeouts_set(unsigned int standby, unsigned int suspend, unsigned int off)
1285 unsigned int ecore_x_dpms_timeout_standby_get()
1286 unsigned int ecore_x_dpms_timeout_suspend_get()
1287 unsigned int ecore_x_dpms_timeout_off_get()
1288 void ecore_x_dpms_timeout_standby_set(unsigned int new_timeout)
1289 void ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout)
1290 void ecore_x_dpms_timeout_off_set(unsigned int new_timeout)
1291
1292 ctypedef enum Ecore_X_Virtual_Keyboard_State:
1293 ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN
1294 ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF
1295 ECORE_X_VIRTUAL_KEYBOARD_STATE_ON
1296 ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA
1297 ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC
1298 ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN
1299 ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER
1300 ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX
1301 ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL
1302 ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD
1303
1304 void ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state)
1305
1306 Eina_Bool ecore_x_screensaver_event_available_get()
1307 int ecore_x_screensaver_idle_time_get()
1308 void ecore_x_screensaver_set(int timeout, int interval, int prefer_blanking, int allow_exposures)
1309 void ecore_x_screensaver_timeout_set(int timeout)
1310 int ecore_x_screensaver_timeout_get()
1311 void ecore_x_screensaver_blank_set(int timeout)
1312 int ecore_x_screensaver_blank_get()
1313 void ecore_x_screensaver_expose_set(int timeout)
1314 int ecore_x_screensaver_expose_get()
1315 void ecore_x_screensaver_interval_set(int timeout)
1316 int ecore_x_screensaver_interval_get()
1317 void ecore_x_screensaver_event_listen_set(Eina_Bool on)
1318 Eina_Bool ecore_x_screensaver_custom_blanking_enable()
1319 Eina_Bool ecore_x_screensaver_custom_blanking_disable()
1320 void ecore_x_screensaver_supend()
1321 void ecore_x_screensaver_resume()
1322
1323
1324from efl.ecore cimport Event
1325
1326
1327cdef class Window:
1328 cdef readonly Ecore_X_Window xid
1329
1330 cdef int _set_xid(self, Ecore_X_Window xid)
1331
1332
1333cdef class EventKey(Event):
1334 cdef readonly object keyname
1335 cdef readonly object key
1336 cdef readonly object string
1337 cdef readonly object compose
1338 cdef readonly Window window
1339 cdef readonly Window root_window
1340 cdef readonly Window event_window
1341 cdef readonly unsigned int modifiers
1342 cdef readonly unsigned int timestamp
1343 cdef readonly int same_screen
1344
1345
1346cdef class EventPoint:
1347 cdef readonly int x
1348 cdef readonly int y
1349
1350
1351cdef class EventMouseButton(Event):
1352 cdef readonly Window window
1353 cdef readonly Window root_window
1354 cdef readonly Window event_window
1355 cdef readonly unsigned int modifiers
1356 cdef readonly unsigned int timestamp
1357 cdef readonly unsigned int buttons
1358 cdef readonly unsigned int double_click
1359 cdef readonly unsigned int triple_click
1360 cdef readonly int same_screen
1361 cdef readonly int x
1362 cdef readonly int y
1363 cdef readonly EventPoint root
1364
1365
1366cdef class EventMouseMove(Event):
1367 cdef readonly Window window
1368 cdef readonly Window root_window
1369 cdef readonly Window event_window
1370 cdef readonly unsigned int modifiers
1371 cdef readonly unsigned int timestamp
1372 cdef readonly int same_screen
1373 cdef readonly int x
1374 cdef readonly int y
1375 cdef readonly EventPoint root
1376
1377
1378cdef class EventMouseIO(Event):
1379 cdef readonly Window window
1380 cdef readonly Window event_window
1381 cdef readonly unsigned int modifiers
1382 cdef readonly unsigned int timestamp
1383 cdef readonly int x
1384 cdef readonly int y
1385
1386
1387cdef class EventMouseWheel(Event):
1388 cdef readonly Window window
1389 cdef readonly Window root_window
1390 cdef readonly Window event_window
1391 cdef readonly unsigned int modifiers
1392 cdef readonly unsigned int timestamp
1393 cdef readonly int same_screen
1394 cdef readonly int direction
1395 cdef readonly int z
1396 cdef readonly int x
1397 cdef readonly int y
1398 cdef readonly EventPoint root
1399
1400
1401cdef class EventWindowFocusIn(Event):
1402 cdef readonly Window win
1403 cdef readonly int mode
1404 cdef readonly int detail
1405 cdef readonly unsigned int time
1406
1407
1408cdef class EventWindowFocusOut(Event):
1409 cdef readonly Window win
1410 cdef readonly int mode
1411 cdef readonly int detail
1412 cdef readonly unsigned int time
1413
1414
1415cdef class EventWindowKeymap(Event):
1416 cdef readonly Window win
1417
1418
1419cdef class EventWindowDamage(Event):
1420 cdef readonly Window win
1421 cdef readonly int x
1422 cdef readonly int y
1423 cdef readonly int w
1424 cdef readonly int h
1425 cdef readonly int count
1426 cdef readonly unsigned int time
1427
1428
1429cdef class EventWindowVisibilityChange(Event):
1430 cdef readonly Window win
1431 cdef readonly int fully_obscured
1432 cdef readonly unsigned int time
1433
1434
1435cdef class EventWindowCreate(Event):
1436 cdef readonly Window win
1437 cdef readonly int override
1438 cdef readonly unsigned int time
1439
1440
1441cdef class EventWindowDestroy(Event):
1442 cdef readonly Window win
1443 cdef readonly unsigned int time
1444
1445
1446cdef class EventWindowHide(Event):
1447 cdef readonly Window win
1448 cdef readonly unsigned int time
1449
1450
1451cdef class EventWindowShow(Event):
1452 cdef readonly Window win
1453 cdef readonly unsigned int time
1454
1455
1456cdef class EventWindowShowRequest(Event):
1457 cdef readonly Window win
1458 cdef readonly Window parent
1459 cdef readonly unsigned int time
1460
1461
1462cdef class EventWindowReparent(Event):
1463 cdef readonly Window win
1464 cdef readonly Window parent
1465 cdef readonly unsigned int time
1466
1467
1468cdef class EventWindowConfigure(Event):
1469 cdef readonly Window win
1470 cdef readonly Window above_win
1471 cdef readonly int x
1472 cdef readonly int y
1473 cdef readonly int w
1474 cdef readonly int h
1475 cdef readonly int border
1476 cdef readonly unsigned int override
1477 cdef readonly unsigned int from_wm
1478 cdef readonly unsigned int time
1479
1480
1481cdef class EventWindowConfigureRequest(Event):
1482 cdef readonly Window win
1483 cdef readonly Window above_win
1484 cdef readonly int x
1485 cdef readonly int y
1486 cdef readonly int w
1487 cdef readonly int h
1488 cdef readonly int border
1489 cdef readonly int stack_mode
1490 cdef readonly unsigned long value_mask
1491 cdef readonly unsigned int time
1492
1493
1494cdef class EventWindowGravity(Event):
1495 cdef readonly Window win
1496 cdef readonly unsigned int time
1497
1498
1499cdef class EventWindowResizeRequest(Event):
1500 cdef readonly Window win
1501 cdef readonly int w
1502 cdef readonly int h
1503 cdef readonly unsigned int time
1504
1505
1506cdef class EventWindowStack(Event):
1507 cdef readonly Window win
1508 cdef readonly Window event_win
1509 cdef readonly int stack_mode
1510 cdef readonly unsigned int time
1511
1512
1513cdef class EventWindowStackRequest(Event):
1514 cdef readonly Window win
1515 cdef readonly Window parent
1516 cdef readonly int stack_mode
1517 cdef readonly unsigned int time
1518
1519
1520cdef class EventDesktopChange(Event):
1521 cdef readonly Window win
1522 cdef readonly long desktop
1523 cdef readonly unsigned int time
1524
1525
1526cdef class EventPing(Event):
1527 cdef readonly Window win
1528 cdef readonly Window event_win
1529 cdef readonly unsigned int time
1530
1531
1532cdef class EventWindowStateRequest(Event):
1533 cdef readonly Window win
1534 cdef readonly int action
1535 cdef readonly int state1
1536 cdef readonly int state2
1537 cdef readonly int source
1538
1539
1540cdef class EventFrameExtentsRequest(Event):
1541 cdef readonly Window win
1542
1543
1544cdef class EventWindowShape(Event):
1545 cdef readonly Window win
1546 cdef readonly unsigned int time
1547
1548
1549cdef class EventScreensaverNotify(Event):
1550 cdef readonly Window win
1551 cdef readonly int on
1552 cdef readonly unsigned int time
1553
1554
1555cdef class EventSyncCounter(Event):
1556 cdef readonly unsigned int time
1557
1558
1559cdef class EventSyncAlarm(Event):
1560 cdef readonly unsigned int time
1561 cdef readonly unsigned int alarm
1562
1563
1564cdef class EventScreenChange(Event):
1565 cdef readonly Window win
1566 cdef readonly Window root
1567 cdef readonly int width
1568 cdef readonly int height
1569
1570
1571cdef class EventWindowDeleteRequest(Event):
1572 cdef readonly Window win
1573 cdef readonly unsigned int time
1574
1575
1576cdef class EventWindowMoveResizeRequest(Event):
1577 cdef readonly Window win
1578 cdef readonly int x
1579 cdef readonly int y
1580 cdef readonly int button
1581 cdef readonly int source
1582
1583
1584
1585
1586## cdef class EventWindowProperty(Event):
1587## cdef readonly Window win
1588## Atom atom
1589## cdef readonly unsigned int time
1590
1591
1592## cdef class EventWindowColormap(Event):
1593## cdef readonly Window win
1594## Colormap cmap
1595## cdef readonly int installed
1596## cdef readonly unsigned int time
1597
1598
1599## cdef class EventSelectionClear(Event):
1600## cdef readonly Window win
1601## Selection selection
1602## cdef readonly unsigned int time
1603
1604
1605## cdef class EventSelectionRequest(Event):
1606## cdef readonly Window owner
1607## cdef readonly Window requestor
1608## cdef readonly unsigned int time
1609## Atom selection
1610## Atom target
1611## Atom property
1612
1613
1614## cdef class EventSelectionNotify(Event):
1615## cdef readonly Window win
1616## cdef readonly unsigned int time
1617## Selection selection
1618## cdef readonly object target
1619## void *data
1620
1621
1622## cdef class EventDamage(Event):
1623## cdef readonly int level
1624## Ecore_X_Drawable drawable
1625## Ecore_X_Damage damage
1626## cdef readonly int more
1627## cdef readonly unsigned int time
1628## cdef readonly EventRectangle area
1629## cdef readonly EventRectangle geometry
diff --git a/efl/ecore_x/efl.ecore_x.pyx b/efl/ecore_x/efl.ecore_x.pyx
new file mode 100644
index 0000000..c27afec
--- /dev/null
+++ b/efl/ecore_x/efl.ecore_x.pyx
@@ -0,0 +1,302 @@
1# Copyright (C) 2007-2015 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 3 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17
18#from cpython cimport PyObject, Py_INCREF, Py_DECREF
19from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String
20
21
22def init(name=None):
23 """Initialize the X display connection to the given display.
24
25 :param name: display target name, if None, default will be used.
26 :rtype: int
27 """
28 cdef int i
29 if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
30 i = ecore_x_init(<char *>name if name is not None else NULL)
31 x_events_register()
32 return i
33
34
35def shutdown():
36 """Shuts down the Ecore X library.
37
38 In shutting down the library, the X display connection is terminated
39 and any event handlers for it are removed.
40
41 :rtype: int
42 """
43 return ecore_x_shutdown()
44
45
46def disconnect():
47 """Shuts down the Ecore X library.
48
49 As ecore_x_shutdown, except do not close Display, only connection.
50
51 :rtype: int
52 """
53 return ecore_x_disconnect()
54
55
56def fd_get():
57 """Retrieves the X display file descriptor.
58
59 :rtype: int
60 """
61 return ecore_x_fd_get()
62
63
64def double_click_time_set(double t):
65 """Sets the timeout for a double and triple clicks to be flagged.
66
67 This sets the time between clicks before the double_click flag is
68 set in a button down event. If 3 clicks occur within double this
69 time, the triple_click flag is also set.
70 """
71 ecore_x_double_click_time_set(t)
72
73def double_click_time_get():
74 ":rtype: float"
75 return ecore_x_double_click_time_get()
76
77
78def flush():
79 "Sends all X commands in the X Display buffer."
80 ecore_x_flush()
81
82
83def sync():
84 "Flushes the command buffer and waits until all requests have been"
85 ecore_x_sync()
86
87
88def current_time_get():
89 "Return the last event time."
90 return ecore_x_current_time_get()
91
92
93def error_request_get():
94 """Get the request code that caused the error.
95
96 :rtype: int
97 """
98 return ecore_x_error_request_get()
99
100
101def error_code_get():
102 """Get the error code from the error.
103
104 :rtype: int
105 """
106 return ecore_x_error_code_get()
107
108
109def window_focus_get():
110 """Returns the window that has the focus.
111
112 :rtype: L{Window}
113 """
114 cdef Ecore_X_Window xid
115 xid = ecore_x_window_focus_get()
116 return Window_from_xid(xid)
117
118
119cdef int _skip_list_build(skip_list, Ecore_X_Window **pskips, int *pskip_num) except 0:
120 cdef Window win
121 cdef int i
122
123 if skip_list:
124 pskip_num[0] = len(skip_list)
125 else:
126 pskip_num[0] = 0
127
128 if pskip_num[0] == 0:
129 pskips[0] = NULL
130 return 1
131 else:
132 pskips[0] = <Ecore_X_Window *>PyMem_Malloc(pskip_num[0] * sizeof(Ecore_X_Window))
133 i = 0
134 try:
135 for w in skip_list:
136 win = w
137 pskips[0][i] = win.xid
138 i += 1
139 except:
140 pskip_num[0] = 0
141 PyMem_Free(<void*>pskips[0])
142 raise
143 return 1
144
145
146def window_shadow_tree_at_xy_with_skip_get(Window base, int x, int y, skip_list=None):
147 """Retrieves the top, visible window at the given location,
148 but skips the windows in the list. This uses a shadow tree built from the
149 window tree that is only updated the first time
150 L{window_shadow_tree_at_xy_with_skip_get()} is called, or the next time
151 it is called after a L{window_shadow_tree_flush()}.
152
153 :param base: Window to use as base, or None to use root window.
154 :param x: The given X position.
155 :param y: The given Y position.
156 :rtype: Window
157 """
158 cdef:
159 Ecore_X_Window base_xid, ret_xid
160 Ecore_X_Window *skips
161 int skip_num
162 if base is <Window>None:
163 base_xid = 0
164 else:
165 base_xid = base.xid
166
167 _skip_list_build(skip_list, &skips, &skip_num)
168 ret_xid = ecore_x_window_shadow_tree_at_xy_with_skip_get(base_xid, x, y,
169 skips, skip_num)
170 if skips != NULL:
171 PyMem_Free(<void*>skips)
172
173 return Window_from_xid(ret_xid)
174
175
176def window_shadow_tree_flush():
177 "Flushes the window shadow tree so nothing is stored."
178 ecore_x_window_shadow_tree_flush()
179
180
181def window_at_xy_get(int x, int y):
182 """Retrieves the top, visible window at the given location.
183
184 :param x: horizontal position.
185 :param y: vertical position.
186 :rtype: Window
187 """
188 cdef Ecore_X_Window xid
189 xid = ecore_x_window_at_xy_get(x, y)
190 return Window_from_xid(xid)
191
192
193def window_at_xy_with_skip_get(int x, int y, skip_list=None):
194 """Retrieves the top, visible window at the given location.
195
196 :param x: horizontal position.
197 :param y: vertical position.
198 :rtype: Window
199 """
200 cdef:
201 Ecore_X_Window xid
202 Ecore_X_Window *skips
203 int skip_num
204
205 _skip_list_build(skip_list, &skips, &skip_num)
206 xid = ecore_x_window_at_xy_with_skip_get(x, y, skips, skip_num)
207
208 if skips != NULL:
209 PyMem_Free(<void*>skips)
210
211 return Window_from_xid(xid)
212
213
214def window_at_xy_begin_get(Window begin, int x, int y):
215 """Retrieves the top, visible window at the given location, starting from
216 begin.
217
218 :param begin: Window to start at.
219 :param x: horizontal position.
220 :param y: vertical position.
221 :rtype: Window
222 """
223 cdef Ecore_X_Window xid, begin_xid
224 if begin is <Window>None:
225 begin_xid = 0
226 else:
227 begin_xid = begin.xid
228 xid = ecore_x_window_at_xy_begin_get(begin_xid, x, y)
229 return Window_from_xid(xid)
230
231
232def keyboard_ungrab():
233 ecore_x_keyboard_ungrab()
234
235
236def screensaver_event_available_get():
237 """ .. versionadded:: 1.11 """
238 return bool(ecore_x_screensaver_event_available_get())
239
240def screensaver_idle_time_get():
241 """ .. versionadded:: 1.11 """
242 return ecore_x_screensaver_idle_time_get()
243
244def screensaver_set(int timeout, int interval, int prefer_blanking, int allow_exposures):
245 """ .. versionadded:: 1.11 """
246 ecore_x_screensaver_set(timeout, interval, prefer_blanking, allow_exposures)
247
248def screensaver_timeout_set(int timeout):
249 """ .. versionadded:: 1.11 """
250 ecore_x_screensaver_timeout_set(timeout)
251
252def screensaver_timeout_get():
253 """ .. versionadded:: 1.11 """
254 return ecore_x_screensaver_timeout_get()
255
256def screensaver_blank_set(int timeout):
257 """ .. versionadded:: 1.11 """
258 ecore_x_screensaver_blank_set(timeout)
259
260def screensaver_blank_get():
261 """ .. versionadded:: 1.11 """
262 return ecore_x_screensaver_blank_get()
263
264def screensaver_expose_set(int timeout):
265 """ .. versionadded:: 1.11 """
266 ecore_x_screensaver_expose_set(timeout)
267
268def screensaver_expose_get():
269 """ .. versionadded:: 1.11 """
270 return ecore_x_screensaver_expose_get()
271
272def screensaver_interval_set(int timeout):
273 """ .. versionadded:: 1.11 """
274 ecore_x_screensaver_interval_set(timeout)
275
276def screensaver_interval_get():
277 """ .. versionadded:: 1.11 """
278 return ecore_x_screensaver_interval_get()
279
280def screensaver_event_listen_set(Eina_Bool on):
281 """ .. versionadded:: 1.11 """
282 ecore_x_screensaver_event_listen_set(on)
283
284def screensaver_custom_blanking_enable():
285 """ .. versionadded:: 1.11 """
286 return bool(ecore_x_screensaver_custom_blanking_enable())
287
288def screensaver_custom_blanking_disable():
289 """ .. versionadded:: 1.11 """
290 return bool(ecore_x_screensaver_custom_blanking_disable())
291
292def screensaver_supend():
293 """ .. versionadded:: 1.11 """
294 ecore_x_screensaver_supend()
295
296def screensaver_resume():
297 """ .. versionadded:: 1.11 """
298 ecore_x_screensaver_resume()
299
300
301include "efl.ecore_x_window.pxi"
302include "efl.ecore_x_events.pxi"
diff --git a/efl/ecore_x/efl.ecore_x_events.pxi b/efl/ecore_x/efl.ecore_x_events.pxi
new file mode 100644
index 0000000..df5e922
--- /dev/null
+++ b/efl/ecore_x/efl.ecore_x_events.pxi
@@ -0,0 +1,1039 @@
1# Copyright (C) 2007-2015 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 3 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17
18from efl.ecore cimport EventHandler
19from efl.utils.conversions cimport _ctouni as _charp_to_str
20
21# cdef object _charp_to_str(const char *p):
22# if p != NULL:
23# return p
24# else:
25# return None
26
27
28cdef class EventKey(Event):
29 cdef int _set_obj(self, void *o) except 0:
30 cdef Ecore_Event_Key *obj
31 obj = <Ecore_Event_Key*>o
32 self.keyname = _charp_to_str(obj.keyname)
33 self.key = _charp_to_str(obj.key)
34 self.string = _charp_to_str(obj.string)
35 self.compose = _charp_to_str(obj.compose)
36 self.window = Window_from_xid(<unsigned long><void*>obj.window)
37 self.root_window = Window_from_xid(<unsigned long><void*>obj.root_window)
38 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
39 self.timestamp = obj.timestamp
40 self.modifiers = obj.modifiers
41 self.same_screen = obj.same_screen
42 return 1
43
44
45cdef class EventPoint:
46 def __init__(self, int x, int y):
47 self.x = x
48 self.y = y
49
50
51cdef class EventMouseButton(Event):
52 cdef int _set_obj(self, void *o) except 0:
53 cdef Ecore_Event_Mouse_Button *obj
54 obj = <Ecore_Event_Mouse_Button*>o
55 self.window = Window_from_xid(<unsigned long><void*>obj.window)
56 self.root_window = Window_from_xid(<unsigned long><void*>obj.root_window)
57 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
58 self.timestamp = obj.timestamp
59 self.modifiers = obj.modifiers
60 self.buttons = obj.buttons
61 self.double_click = obj.double_click
62 self.triple_click = obj.triple_click
63 self.same_screen = obj.same_screen
64 self.x = obj.x
65 self.y = obj.y
66 self.root = EventPoint(obj.root.x, obj.root.y)
67 return 1
68
69
70cdef class EventMouseMove(Event):
71 cdef int _set_obj(self, void *o) except 0:
72 cdef Ecore_Event_Mouse_Move *obj
73 obj = <Ecore_Event_Mouse_Move *>o
74 self.window = Window_from_xid(<unsigned long><void*>obj.window)
75 self.root_window = Window_from_xid(<unsigned long><void*>obj.root_window)
76 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
77 self.timestamp = obj.timestamp
78 self.modifiers = obj.modifiers
79 self.same_screen = obj.same_screen
80 self.x = obj.x
81 self.y = obj.y
82 self.root = EventPoint(obj.root.x, obj.root.y)
83 return 1
84
85
86cdef class EventMouseIO(Event):
87 cdef int _set_obj(self, void *o) except 0:
88 cdef Ecore_Event_Mouse_IO *obj
89 obj = <Ecore_Event_Mouse_IO *>o
90 self.window = Window_from_xid(<unsigned long><void*>obj.window)
91 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
92 self.timestamp = obj.timestamp
93 self.modifiers = obj.modifiers
94 self.x = obj.x
95 self.y = obj.y
96 return 1
97
98
99cdef class EventMouseWheel(Event):
100 cdef int _set_obj(self, void *o) except 0:
101 cdef Ecore_Event_Mouse_Wheel *obj
102 obj = <Ecore_Event_Mouse_Wheel *>o
103 self.window = Window_from_xid(<unsigned long><void*>obj.window)
104 self.root_window = Window_from_xid(<unsigned long><void*>obj.root_window)
105 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
106 self.timestamp = obj.timestamp
107 self.modifiers = obj.modifiers
108 self.same_screen = obj.same_screen
109 self.direction = obj.direction
110 self.z = obj.z
111 self.x = obj.x
112 self.y = obj.y
113 self.root = EventPoint(obj.root.x, obj.root.y)
114 return 1
115
116
117cdef class EventWindowFocusIn(Event):
118 cdef int _set_obj(self, void *o) except 0:
119 cdef Ecore_X_Event_Window_Focus_In *obj
120 obj = <Ecore_X_Event_Window_Focus_In *>o
121 self.win = Window_from_xid(obj.win)
122 self.mode = obj.mode
123 self.detail = obj.detail
124 self.time = obj.time
125 return 1
126
127
128cdef class EventWindowFocusOut(Event):
129 cdef int _set_obj(self, void *o) except 0:
130 cdef Ecore_X_Event_Window_Focus_Out *obj
131 obj = <Ecore_X_Event_Window_Focus_Out *>o
132 self.win = Window_from_xid(obj.win)
133 self.mode = obj.mode
134 self.detail = obj.detail
135 self.time = obj.time
136 return 1
137
138
139cdef class EventWindowKeymap(Event):
140 cdef int _set_obj(self, void *o) except 0:
141 cdef Ecore_X_Event_Window_Keymap *obj
142 obj = <Ecore_X_Event_Window_Keymap *>o
143 self.win = Window_from_xid(obj.win)
144 return 1
145
146
147cdef class EventWindowDamage(Event):
148 cdef int _set_obj(self, void *o) except 0:
149 cdef Ecore_X_Event_Window_Damage *obj
150 obj = <Ecore_X_Event_Window_Damage *>o
151 self.win = Window_from_xid(obj.win)
152 self.x = obj.x
153 self.y = obj.y
154 self.w = obj.w
155 self.h = obj.h
156 self.count = obj.count
157 self.time = obj.time
158 return 1
159
160
161cdef class EventWindowVisibilityChange(Event):
162 cdef int _set_obj(self, void *o) except 0:
163 cdef Ecore_X_Event_Window_Visibility_Change *obj
164 obj = <Ecore_X_Event_Window_Visibility_Change *>o
165 self.win = Window_from_xid(obj.win)
166 self.fully_obscured = obj.fully_obscured
167 self.time = obj.time
168 return 1
169
170
171cdef class EventWindowCreate(Event):
172 cdef int _set_obj(self, void *o) except 0:
173 cdef Ecore_X_Event_Window_Create *obj
174 obj = <Ecore_X_Event_Window_Create *>o
175 self.win = Window_from_xid(obj.win)
176 self.override = obj.override
177 self.time = obj.time
178 return 1
179
180
181cdef class EventWindowDestroy(Event):
182 cdef int _set_obj(self, void *o) except 0:
183 cdef Ecore_X_Event_Window_Destroy *obj
184 obj = <Ecore_X_Event_Window_Destroy *>o
185 self.win = Window_from_xid(obj.win)
186 self.time = obj.time
187 return 1
188
189
190cdef class EventWindowHide(Event):
191 cdef int _set_obj(self, void *o) except 0:
192 cdef Ecore_X_Event_Window_Hide *obj
193 obj = <Ecore_X_Event_Window_Hide *>o
194 self.win = Window_from_xid(obj.win)
195 self.time = obj.time
196 return 1
197
198
199cdef class EventWindowShow(Event):
200 cdef int _set_obj(self, void *o) except 0:
201 cdef Ecore_X_Event_Window_Show *obj
202 obj = <Ecore_X_Event_Window_Show *>o
203 self.win = Window_from_xid(obj.win)
204 self.time = obj.time
205 return 1
206
207
208cdef class EventWindowShowRequest(Event):
209 cdef int _set_obj(self, void *o) except 0:
210 cdef Ecore_X_Event_Window_Show_Request *obj
211 obj = <Ecore_X_Event_Window_Show_Request *>o
212 self.win = Window_from_xid(obj.win)
213 self.parent = Window_from_xid(obj.parent)
214 self.time = obj.time
215 return 1
216
217
218cdef class EventWindowReparent(Event):
219 cdef int _set_obj(self, void *o) except 0:
220 cdef Ecore_X_Event_Window_Reparent *obj
221 obj = <Ecore_X_Event_Window_Reparent *>o
222 self.win = Window_from_xid(obj.win)
223 self.parent = Window_from_xid(obj.parent)
224 self.time = obj.time
225 return 1
226
227
228cdef class EventWindowConfigure(Event):
229 cdef int _set_obj(self, void *o) except 0:
230 cdef Ecore_X_Event_Window_Configure *obj
231 obj = <Ecore_X_Event_Window_Configure *>o
232 self.win = Window_from_xid(obj.win)
233 self.above_win = Window_from_xid(obj.abovewin)
234 self.x = obj.x
235 self.y = obj.y
236 self.w = obj.w
237 self.h = obj.h
238 self.border = obj.border
239 self.override = obj.override
240 self.from_wm = obj.from_wm
241 self.time = obj.time
242 return 1
243
244
245cdef class EventWindowConfigureRequest(Event):
246 cdef int _set_obj(self, void *o) except 0:
247 cdef Ecore_X_Event_Window_Configure_Request *obj
248 obj = <Ecore_X_Event_Window_Configure_Request *>o
249 self.win = Window_from_xid(obj.win)
250 self.above_win = Window_from_xid(obj.abovewin)
251 self.x = obj.x
252 self.y = obj.y
253 self.w = obj.w
254 self.h = obj.h
255 self.border = obj.border
256 self.stack_mode = obj.detail
257 self.value_mask = obj.value_mask
258 self.time = obj.time
259 return 1
260
261
262cdef class EventWindowGravity(Event):
263 cdef int _set_obj(self, void *o) except 0:
264 cdef Ecore_X_Event_Window_Gravity *obj
265 obj = <Ecore_X_Event_Window_Gravity *>o
266 self.win = Window_from_xid(obj.win)
267 self.time = obj.time
268 return 1
269
270
271cdef class EventWindowResizeRequest(Event):
272 cdef int _set_obj(self, void *o) except 0:
273 cdef Ecore_X_Event_Window_Resize_Request *obj
274 obj = <Ecore_X_Event_Window_Resize_Request *>o
275 self.win = Window_from_xid(obj.win)
276 self.w = obj.w
277 self.h = obj.h
278 self.time = obj.time
279 return 1
280
281
282cdef class EventWindowStack(Event):
283 cdef int _set_obj(self, void *o) except 0:
284 cdef Ecore_X_Event_Window_Stack *obj
285 obj = <Ecore_X_Event_Window_Stack *>o
286 self.win = Window_from_xid(obj.win)
287 self.event_win = Window_from_xid(obj.event_win)
288 self.stack_mode = obj.detail
289 self.time = obj.time
290 return 1
291
292
293cdef class EventWindowStackRequest(Event):
294 cdef int _set_obj(self, void *o) except 0:
295 cdef Ecore_X_Event_Window_Stack_Request *obj
296 obj = <Ecore_X_Event_Window_Stack_Request *>o
297 self.win = Window_from_xid(obj.win)
298 self.parent = Window_from_xid(obj.parent)
299 self.stack_mode = obj.detail
300 self.time = obj.time
301 return 1
302
303
304cdef class EventPing(Event):
305 cdef int _set_obj(self, void *o) except 0:
306 cdef Ecore_X_Event_Ping *obj
307 obj = <Ecore_X_Event_Ping *>o
308 self.win = Window_from_xid(obj.win)
309 self.event_win = Window_from_xid(obj.event_win)
310 self.time = obj.time
311 return 1
312
313
314cdef class EventWindowStateRequest(Event):
315 cdef int _set_obj(self, void *o) except 0:
316 cdef Ecore_X_Event_Window_State_Request *obj
317 obj = <Ecore_X_Event_Window_State_Request *>o
318 self.win = Window_from_xid(obj.win)
319 self.action = obj.action
320 self.state1 = obj.state[0]
321 self.state2 = obj.state[1]
322 self.source = obj.source
323 return 1
324
325
326cdef class EventFrameExtentsRequest(Event):
327 cdef int _set_obj(self, void *o) except 0:
328 cdef Ecore_X_Event_Frame_Extents_Request *obj
329 obj = <Ecore_X_Event_Frame_Extents_Request *>o
330 self.win = Window_from_xid(obj.win)
331 return 1
332
333
334cdef class EventWindowShape(Event):
335 cdef int _set_obj(self, void *o) except 0:
336 cdef Ecore_X_Event_Window_Shape *obj
337 obj = <Ecore_X_Event_Window_Shape *>o
338 self.win = Window_from_xid(obj.win)
339 self.time = obj.time
340 return 1
341
342
343cdef class EventScreensaverNotify(Event):
344 cdef int _set_obj(self, void *o) except 0:
345 cdef Ecore_X_Event_Screensaver_Notify *obj
346 obj = <Ecore_X_Event_Screensaver_Notify *>o
347 self.win = Window_from_xid(obj.win)
348 self.on = obj.on
349 self.time = obj.time
350 return 1
351
352
353cdef class EventSyncCounter(Event):
354 cdef int _set_obj(self, void *o) except 0:
355 cdef Ecore_X_Event_Sync_Counter *obj
356 obj = <Ecore_X_Event_Sync_Counter *>o
357 self.time = obj.time
358 return 1
359
360
361cdef class EventSyncAlarm(Event):
362 cdef int _set_obj(self, void *o) except 0:
363 cdef Ecore_X_Event_Sync_Alarm *obj
364 obj = <Ecore_X_Event_Sync_Alarm *>o
365 self.time = obj.time
366 self.alarm = obj.alarm
367 return 1
368
369
370cdef class EventScreenChange(Event):
371 cdef int _set_obj(self, void *o) except 0:
372 cdef Ecore_X_Event_Screen_Change *obj
373 obj = <Ecore_X_Event_Screen_Change *>o
374 self.win = Window_from_xid(obj.win)
375 self.root = Window_from_xid(obj.root)
376
377 mmsize = (obj.size.width, obj.size.height,
378 obj.size.width_mm, obj.size.height_mm)
379
380 self.size = mmsize
381 self.time = obj.time
382 self.config_time = obj.config_time
383 self.orientation = obj.orientation
384 self.subpixel_order = obj.subpixel_order
385 self.size_id = obj.size_id
386 return 1
387
388
389cdef class EventWindowDeleteRequest(Event):
390 cdef int _set_obj(self, void *o) except 0:
391 cdef Ecore_X_Event_Window_Delete_Request *obj
392 obj = <Ecore_X_Event_Window_Delete_Request *>o
393 self.win = Window_from_xid(obj.win)
394 self.time = obj.time
395 return 1
396
397
398cdef class EventWindowMoveResizeRequest(Event):
399 cdef int _set_obj(self, void *o) except 0:
400 cdef Ecore_X_Event_Window_Move_Resize_Request *obj
401 obj = <Ecore_X_Event_Window_Move_Resize_Request *>o
402 self.win = Window_from_xid(obj.win)
403 self.x = obj.x
404 self.y = obj.y
405 self.button = obj.button
406 self.source = obj.source
407 return 1
408
409
410cdef class _Events:
411 property KEY_DOWN:
412 def __get__(self):
413 return ECORE_EVENT_KEY_DOWN
414
415 property KEY_UP:
416 def __get__(self):
417 return ECORE_EVENT_KEY_UP
418
419 property MOUSE_BUTTON_DOWN:
420 def __get__(self):
421 return ECORE_EVENT_MOUSE_BUTTON_DOWN
422
423 property MOUSE_BUTTON_UP:
424 def __get__(self):
425 return ECORE_EVENT_MOUSE_BUTTON_UP
426
427 property MOUSE_MOVE:
428 def __get__(self):
429 return ECORE_EVENT_MOUSE_MOVE
430
431 property MOUSE_IN:
432 def __get__(self):
433 return ECORE_EVENT_MOUSE_IN
434
435 property MOUSE_OUT:
436 def __get__(self):
437 return ECORE_EVENT_MOUSE_OUT
438
439 property MOUSE_WHEEL:
440 def __get__(self):
441 return ECORE_EVENT_MOUSE_WHEEL
442
443 property WINDOW_FOCUS_IN:
444 def __get__(self):
445 return ECORE_X_EVENT_WINDOW_FOCUS_IN
446
447 property WINDOW_FOCUS_OUT:
448 def __get__(self):
449 return ECORE_X_EVENT_WINDOW_FOCUS_OUT
450
451 property WINDOW_KEYMAP:
452 def __get__(self):
453 return ECORE_X_EVENT_WINDOW_KEYMAP
454
455 property WINDOW_DAMAGE:
456 def __get__(self):
457 return ECORE_X_EVENT_WINDOW_DAMAGE
458
459 property WINDOW_VISIBILITY_CHANGE:
460 def __get__(self):
461 return ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE
462
463 property WINDOW_CREATE:
464 def __get__(self):
465 return ECORE_X_EVENT_WINDOW_CREATE
466
467 property WINDOW_DESTROY:
468 def __get__(self):
469 return ECORE_X_EVENT_WINDOW_DESTROY
470
471 property WINDOW_HIDE:
472 def __get__(self):
473 return ECORE_X_EVENT_WINDOW_HIDE
474
475 property WINDOW_SHOW:
476 def __get__(self):
477 return ECORE_X_EVENT_WINDOW_SHOW
478
479 property WINDOW_SHOW_REQUEST:
480 def __get__(self):
481 return ECORE_X_EVENT_WINDOW_SHOW_REQUEST
482
483 property WINDOW_REPARENT:
484 def __get__(self):
485 return ECORE_X_EVENT_WINDOW_REPARENT
486
487 property WINDOW_CONFIGURE:
488 def __get__(self):
489 return ECORE_X_EVENT_WINDOW_CONFIGURE
490
491 property WINDOW_CONFIGURE_REQUEST:
492 def __get__(self):
493 return ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST
494
495 property WINDOW_GRAVITY:
496 def __get__(self):
497 return ECORE_X_EVENT_WINDOW_GRAVITY
498
499 property WINDOW_RESIZE_REQUEST:
500 def __get__(self):
501 return ECORE_X_EVENT_WINDOW_RESIZE_REQUEST
502
503 property WINDOW_STACK:
504 def __get__(self):
505 return ECORE_X_EVENT_WINDOW_STACK
506
507 property WINDOW_STACK_REQUEST:
508 def __get__(self):
509 return ECORE_X_EVENT_WINDOW_STACK_REQUEST
510
511 property WINDOW_PROPERTY:
512 def __get__(self):
513 return ECORE_X_EVENT_WINDOW_PROPERTY
514
515 property WINDOW_COLORMAP:
516 def __get__(self):
517 return ECORE_X_EVENT_WINDOW_COLORMAP
518
519 property WINDOW_MAPPING:
520 def __get__(self):
521 return ECORE_X_EVENT_WINDOW_MAPPING
522
523 property SELECTION_CLEAR:
524 def __get__(self):
525 return ECORE_X_EVENT_SELECTION_CLEAR
526
527 property SELECTION_REQUEST:
528 def __get__(self):
529 return ECORE_X_EVENT_SELECTION_REQUEST
530
531 property SELECTION_NOTIFY:
532 def __get__(self):
533 return ECORE_X_EVENT_SELECTION_NOTIFY
534
535 property CLIENT_MESSAGE:
536 def __get__(self):
537 return ECORE_X_EVENT_CLIENT_MESSAGE
538
539 property WINDOW_SHAPE:
540 def __get__(self):
541 return ECORE_X_EVENT_WINDOW_SHAPE
542
543 property SCREENSAVER_NOTIFY:
544 def __get__(self):
545 return ECORE_X_EVENT_SCREENSAVER_NOTIFY
546
547 property SYNC_COUNTER:
548 def __get__(self):
549 return ECORE_X_EVENT_SYNC_COUNTER
550
551 property SYNC_ALARM:
552 def __get__(self):
553 return ECORE_X_EVENT_SYNC_ALARM
554
555 property SCREEN_CHANGE:
556 def __get__(self):
557 return ECORE_X_EVENT_SCREEN_CHANGE
558
559 property DAMAGE_NOTIFY:
560 def __get__(self):
561 return ECORE_X_EVENT_DAMAGE_NOTIFY
562
563 property WINDOW_DELETE_REQUEST:
564 def __get__(self):
565 return ECORE_X_EVENT_WINDOW_DELETE_REQUEST
566
567 property WINDOW_MOVE_RESIZE_REQUEST:
568 def __get__(self):
569 return ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST
570
571 property WINDOW_STATE_REQUEST:
572 def __get__(self):
573 return ECORE_X_EVENT_WINDOW_STATE_REQUEST
574
575 property FRAME_EXTENTS_REQUEST:
576 def __get__(self):
577 return ECORE_X_EVENT_FRAME_EXTENTS_REQUEST
578
579 property PING:
580 def __get__(self):
581 return ECORE_X_EVENT_PING
582
583 property DESKTOP_CHANGE:
584 def __get__(self):
585 return ECORE_X_EVENT_DESKTOP_CHANGE
586
587 property STARTUP_SEQUENCE_NEW:
588 def __get__(self):
589 return ECORE_X_EVENT_STARTUP_SEQUENCE_NEW
590
591 property STARTUP_SEQUENCE_CHANGE:
592 def __get__(self):
593 return ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE
594
595 property STARTUP_SEQUENCE_REMOVE:
596 def __get__(self):
597 return ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE
598
599Events = _Events()
600
601
602cdef int _x_events_registered = 0
603from efl.ecore cimport _event_mapping_register as reg
604
605# Just call after ecore_x_init() is done, otherwise all event type will be 0.
606cdef int x_events_register() except 0:
607 global _x_events_registered
608 if _x_events_registered != 0:
609 return 1
610 _x_events_registered = 1
611
612 reg(ECORE_EVENT_KEY_DOWN, EventKey)
613 reg(ECORE_EVENT_KEY_UP, EventKey)
614 reg(ECORE_EVENT_MOUSE_BUTTON_DOWN, EventMouseButton)
615 reg(ECORE_EVENT_MOUSE_BUTTON_UP, EventMouseButton)
616 reg(ECORE_EVENT_MOUSE_MOVE, EventMouseMove)
617 reg(ECORE_EVENT_MOUSE_IN, EventMouseIO)
618 reg(ECORE_EVENT_MOUSE_OUT, EventMouseIO)
619 reg(ECORE_EVENT_MOUSE_WHEEL, EventMouseWheel)
620 reg(ECORE_X_EVENT_WINDOW_FOCUS_IN, EventWindowFocusIn)
621 reg(ECORE_X_EVENT_WINDOW_FOCUS_OUT, EventWindowFocusOut)
622 reg(ECORE_X_EVENT_WINDOW_KEYMAP, EventWindowKeymap)
623 reg(ECORE_X_EVENT_WINDOW_DAMAGE, EventWindowDamage)
624 reg(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, EventWindowVisibilityChange)
625 reg(ECORE_X_EVENT_WINDOW_CREATE, EventWindowCreate)
626 reg(ECORE_X_EVENT_WINDOW_DESTROY, EventWindowDestroy)
627 reg(ECORE_X_EVENT_WINDOW_HIDE, EventWindowHide)
628 reg(ECORE_X_EVENT_WINDOW_SHOW, EventWindowShow)
629 reg(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, EventWindowShowRequest)
630 reg(ECORE_X_EVENT_WINDOW_REPARENT, EventWindowReparent)
631 reg(ECORE_X_EVENT_WINDOW_CONFIGURE, EventWindowConfigure)
632 reg(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, EventWindowConfigureRequest)
633 reg(ECORE_X_EVENT_WINDOW_GRAVITY, EventWindowGravity)
634 reg(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, EventWindowResizeRequest)
635 reg(ECORE_X_EVENT_WINDOW_STACK, EventWindowStack)
636 reg(ECORE_X_EVENT_WINDOW_STACK_REQUEST, EventWindowStackRequest)
637## reg(ECORE_X_EVENT_WINDOW_PROPERTY, EventWindowProperty) # TODO
638## reg(ECORE_X_EVENT_WINDOW_COLORMAP, EventWindowColormap) # TODO
639## reg(ECORE_X_EVENT_WINDOW_MAPPING, EventWindowMapping) # ?
640## reg(ECORE_X_EVENT_SELECTION_CLEAR, EventSelectionClear) # TODO
641## reg(ECORE_X_EVENT_SELECTION_REQUEST, EventSelectionRequest) # TODO
642## reg(ECORE_X_EVENT_SELECTION_NOTIFY, EventSelectionNotify) # TODO
643## reg(ECORE_X_EVENT_CLIENT_MESSAGE, EventClientMessage)
644 reg(ECORE_X_EVENT_WINDOW_SHAPE, EventWindowShape)
645 reg(ECORE_X_EVENT_SCREENSAVER_NOTIFY, EventScreensaverNotify)
646 reg(ECORE_X_EVENT_SYNC_COUNTER, EventSyncCounter)
647 reg(ECORE_X_EVENT_SYNC_ALARM, EventSyncAlarm)
648 reg(ECORE_X_EVENT_SCREEN_CHANGE, EventScreenChange)
649## reg(ECORE_X_EVENT_DAMAGE_NOTIFY, EventDamage)
650 reg(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, EventWindowDeleteRequest)
651 reg(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST, EventWindowMoveResizeRequest)
652 reg(ECORE_X_EVENT_WINDOW_STATE_REQUEST, EventWindowStateRequest)
653 reg(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST, EventFrameExtentsRequest)
654 reg(ECORE_X_EVENT_PING, EventPing)
655 reg(ECORE_X_EVENT_DESKTOP_CHANGE, EventDesktopChange)
656## reg(ECORE_X_EVENT_STARTUP_SEQUENCE_NEW, EventSTartupSequenceNew) #?
657## reg(ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE, EventStartupSequenceChange) #?
658## reg(ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE, EventStartupSequenceRemove) #?
659
660 return 1
661
662
663def on_key_down_add(func, *args, **kargs):
664 """Creates an ecore event handler for ECORE_EVENT_KEY_DOWN.
665
666 :see: :py:class:`efl.ecore.EventHandler`
667 """
668 return EventHandler(ECORE_EVENT_KEY_DOWN,
669 func, *args, **kargs)
670
671def on_key_up_add(func, *args, **kargs):
672 """Creates an ecore event handler for ECORE_EVENT_KEY_UP.
673
674 :see: :py:class:`efl.ecore.EventHandler`
675 """
676 return EventHandler(ECORE_EVENT_KEY_UP,
677 func, *args, **kargs)
678
679
680def on_mouse_button_down_add(func, *args, **kargs):
681 """Creates an ecore event handler for ECORE_EVENT_MOUSE_BUTTON_DOWN.
682
683 :see: :py:class:`efl.ecore.EventHandler`
684 """
685 return EventHandler(ECORE_EVENT_MOUSE_BUTTON_DOWN,
686 func, *args, **kargs)
687
688def on_mouse_button_up_add(func, *args, **kargs):
689 """Create an ecore event handler for ECORE_EVENT_MOUSE_BUTTON_UP.
690
691 :see: :py:class:`efl.ecore.EventHandler`
692 """
693 return EventHandler(ECORE_EVENT_MOUSE_BUTTON_UP,
694 func, *args, **kargs)
695
696def on_mouse_move_add(func, *args, **kargs):
697 """Create an ecore event handler for ECORE_EVENT_MOUSE_MOVE.
698
699 :see: :py:class:`efl.ecore.EventHandler`
700 """
701 return EventHandler(ECORE_EVENT_MOUSE_MOVE,
702 func, *args, **kargs)
703
704def on_mouse_in_add(func, *args, **kargs):
705 """Create an ecore event handler for ECORE_EVENT_MOUSE_IN.
706
707 :see: :py:class:`efl.ecore.EventHandler`
708 """
709 return EventHandler(ECORE_EVENT_MOUSE_IN,
710 func, *args, **kargs)
711
712def on_mouse_out_add(func, *args, **kargs):
713 """Create an ecore event handler for ECORE_EVENT_MOUSE_OUT.
714
715 :see: :py:class:`efl.ecore.EventHandler`
716 """
717 return EventHandler(ECORE_EVENT_MOUSE_OUT,
718 func, *args, **kargs)
719
720def on_mouse_wheel_add(func, *args, **kargs):
721 """Create an ecore event handler for ECORE_EVENT_MOUSE_WHEEL.
722
723 :see: :py:class:`efl.ecore.EventHandler`
724 """
725 return EventHandler(ECORE_EVENT_MOUSE_WHEEL,
726 func, *args, **kargs)
727
728def on_window_focus_in_add(func, *args, **kargs):
729 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_FOCUS_IN.
730
731 :see: :py:class:`efl.ecore.EventHandler`
732 """
733 return EventHandler(ECORE_X_EVENT_WINDOW_FOCUS_IN,
734 func, *args, **kargs)
735
736def on_window_focus_out_add(func, *args, **kargs):
737 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_FOCUS_OUT.
738
739 :see: :py:class:`efl.ecore.EventHandler`
740 """
741 return EventHandler(ECORE_X_EVENT_WINDOW_FOCUS_OUT,
742 func, *args, **kargs)
743
744def on_window_keymap_add(func, *args, **kargs):
745 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_KEYMAP.
746
747 :see: :py:class:`efl.ecore.EventHandler`
748 """
749 return EventHandler(ECORE_X_EVENT_WINDOW_KEYMAP,
750 func, *args, **kargs)
751
752def on_window_damage_add(func, *args, **kargs):
753 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_DAMAGE.
754
755 :see: :py:class:`efl.ecore.EventHandler`
756 """
757 return EventHandler(ECORE_X_EVENT_WINDOW_DAMAGE,
758 func, *args, **kargs)
759
760def on_window_visibility_change_add(func, *args, **kargs):
761 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE.
762
763 :see: :py:class:`efl.ecore.EventHandler`
764 """
765 return EventHandler(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE,
766 func, *args, **kargs)
767
768def on_window_create_add(func, *args, **kargs):
769 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_CREATE.
770
771 :see: :py:class:`efl.ecore.EventHandler`
772 """
773 return EventHandler(ECORE_X_EVENT_WINDOW_CREATE,
774 func, *args, **kargs)
775
776def on_window_destroy_add(func, *args, **kargs):
777 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_DESTROY.
778
779 :see: :py:class:`efl.ecore.EventHandler`
780 """
781 return EventHandler(ECORE_X_EVENT_WINDOW_DESTROY,
782 func, *args, **kargs)
783
784def on_window_hide_add(func, *args, **kargs):
785 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_HIDE.
786
787 :see: :py:class:`efl.ecore.EventHandler`
788 """
789 return EventHandler(ECORE_X_EVENT_WINDOW_HIDE,
790 func, *args, **kargs)
791
792def on_window_show_add(func, *args, **kargs):
793 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_SHOW.
794
795 :see: :py:class:`efl.ecore.EventHandler`
796 """
797 return EventHandler(ECORE_X_EVENT_WINDOW_SHOW,
798 func, *args, **kargs)
799
800def on_window_show_request_add(func, *args, **kargs):
801 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_SHOW_REQUEST.
802
803 :see: :py:class:`efl.ecore.EventHandler`
804 """
805 return EventHandler(ECORE_X_EVENT_WINDOW_SHOW_REQUEST,
806 func, *args, **kargs)
807
808def on_window_reparent_add(func, *args, **kargs):
809 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_REPARENT.
810
811 :see: :py:class:`efl.ecore.EventHandler`
812 """
813 return EventHandler(ECORE_X_EVENT_WINDOW_REPARENT,
814 func, *args, **kargs)
815
816def on_window_configure_add(func, *args, **kargs):
817 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_CONFIGURE.
818
819 :see: :py:class:`efl.ecore.EventHandler`
820 """
821 return EventHandler(ECORE_X_EVENT_WINDOW_CONFIGURE,
822 func, *args, **kargs)
823
824def on_window_configure_request_add(func, *args, **kargs):
825 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST.
826
827 :see: :py:class:`efl.ecore.EventHandler`
828 """
829 return EventHandler(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST,
830 func, *args, **kargs)
831
832def on_window_gravity_add(func, *args, **kargs):
833 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_GRAVITY.
834
835 :see: :py:class:`efl.ecore.EventHandler`
836 """
837 return EventHandler(ECORE_X_EVENT_WINDOW_GRAVITY,
838 func, *args, **kargs)
839
840def on_window_resize_request_add(func, *args, **kargs):
841 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_RESIZE_REQUEST.
842
843 :see: :py:class:`efl.ecore.EventHandler`
844 """
845 return EventHandler(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST,
846 func, *args, **kargs)
847
848def on_window_stack_add(func, *args, **kargs):
849 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_STACK.
850
851 :see: :py:class:`efl.ecore.EventHandler`
852 """
853 return EventHandler(ECORE_X_EVENT_WINDOW_STACK,
854 func, *args, **kargs)
855
856def on_window_stack_request_add(func, *args, **kargs):
857 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_STACK_REQUEST.
858
859 :see: :py:class:`efl.ecore.EventHandler`
860 """
861 return EventHandler(ECORE_X_EVENT_WINDOW_STACK_REQUEST,
862 func, *args, **kargs)
863
864## def on_window_property_add(func, *args, **kargs):
865## """Create an ecore event handler for ECORE_X_EVENT_WINDOW_PROPERTY.
866
867## :see: :py:class:`efl.ecore.EventHandler`
868## """
869## return EventHandler(ECORE_X_EVENT_WINDOW_PROPERTY,
870## func, *args, **kargs)
871
872## def on_window_colormap_add(func, *args, **kargs):
873## """Create an ecore event handler for ECORE_X_EVENT_WINDOW_COLORMAP.
874
875## :see: :py:class:`efl.ecore.EventHandler`
876## """
877## return EventHandler(ECORE_X_EVENT_WINDOW_COLORMAP,
878## func, *args, **kargs)
879
880## def on_window_mapping_add(func, *args, **kargs):
881## """Create an ecore event handler for ECORE_X_EVENT_WINDOW_MAPPING.
882
883## :see: :py:class:`efl.ecore.EventHandler`
884## """
885## return EventHandler(ECORE_X_EVENT_WINDOW_MAPPING,
886## func, *args, **kargs)
887
888## def on_selection_clear_add(func, *args, **kargs):
889## """Create an ecore event handler for ECORE_X_EVENT_SELECTION_CLEAR.
890
891## :see: :py:class:`efl.ecore.EventHandler`
892## """
893## return EventHandler(ECORE_X_EVENT_SELECTION_CLEAR,
894## func, *args, **kargs)
895
896## def on_selection_request_add(func, *args, **kargs):
897## """Create an ecore event handler for ECORE_X_EVENT_SELECTION_REQUEST.
898
899## :see: :py:class:`efl.ecore.EventHandler`
900## """
901## return EventHandler(ECORE_X_EVENT_SELECTION_REQUEST,
902## func, *args, **kargs)
903
904## def on_selection_notify_add(func, *args, **kargs):
905## """Create an ecore event handler for ECORE_X_EVENT_SELECTION_NOTIFY.
906
907## :see: :py:class:`efl.ecore.EventHandler`
908## """
909## return EventHandler(ECORE_X_EVENT_SELECTION_NOTIFY,
910## func, *args, **kargs)
911
912## def on_client_message_add(func, *args, **kargs):
913## """Create an ecore event handler for ECORE_X_EVENT_CLIENT_MESSAGE.
914
915## :see: :py:class:`efl.ecore.EventHandler`
916## """
917## return EventHandler(ECORE_X_EVENT_CLIENT_MESSAGE,
918## func, *args, **kargs)
919
920def on_window_shape_add(func, *args, **kargs):
921 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_SHAPE.
922
923 :see: :py:class:`efl.ecore.EventHandler`
924 """
925 return EventHandler(ECORE_X_EVENT_WINDOW_SHAPE,
926 func, *args, **kargs)
927
928def on_screensaver_notify_add(func, *args, **kargs):
929 """Create an ecore event handler for ECORE_X_EVENT_SCREENSAVER_NOTIFY.
930
931 :see: :py:class:`efl.ecore.EventHandler`
932 """
933 return EventHandler(ECORE_X_EVENT_SCREENSAVER_NOTIFY,
934 func, *args, **kargs)
935
936def on_sync_counter_add(func, *args, **kargs):
937 """Create an ecore event handler for ECORE_X_EVENT_SYNC_COUNTER.
938
939 :see: :py:class:`efl.ecore.EventHandler`
940 """
941 return EventHandler(ECORE_X_EVENT_SYNC_COUNTER,
942 func, *args, **kargs)
943
944def on_sync_alarm_add(func, *args, **kargs):
945 """Create an ecore event handler for ECORE_X_EVENT_SYNC_ALARM.
946
947 :see: :py:class:`efl.ecore.EventHandler`
948 """
949 return EventHandler(ECORE_X_EVENT_SYNC_ALARM,
950 func, *args, **kargs)
951
952def on_screen_change_add(func, *args, **kargs):
953 """Create an ecore event handler for ECORE_X_EVENT_SCREEN_CHANGE.
954
955 :see: :py:class:`efl.ecore.EventHandler`
956 """
957 return EventHandler(ECORE_X_EVENT_SCREEN_CHANGE,
958 func, *args, **kargs)
959
960## def on_damage_notify_add(func, *args, **kargs):
961## """Create an ecore event handler for ECORE_X_EVENT_DAMAGE_NOTIFY.
962
963## :see: :py:class:`efl.ecore.EventHandler`
964## """
965## return EventHandler(ECORE_X_EVENT_DAMAGE_NOTIFY,
966## func, *args, **kargs)
967
968def on_window_delete_request_add(func, *args, **kargs):
969 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_DELETE_REQUEST.
970
971 :see: :py:class:`efl.ecore.EventHandler`
972 """
973 return EventHandler(ECORE_X_EVENT_WINDOW_DELETE_REQUEST,
974 func, *args, **kargs)
975
976def on_window_move_resize_request_add(func, *args, **kargs):
977 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST.
978
979 :see: :py:class:`efl.ecore.EventHandler`
980 """
981 return EventHandler(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST,
982 func, *args, **kargs)
983
984def on_window_state_request_add(func, *args, **kargs):
985 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_STATE_REQUEST.
986
987 :see: :py:class:`efl.ecore.EventHandler`
988 """
989 return EventHandler(ECORE_X_EVENT_WINDOW_STATE_REQUEST,
990 func, *args, **kargs)
991
992def on_frame_extents_request_add(func, *args, **kargs):
993 """Create an ecore event handler for ECORE_X_EVENT_FRAME_EXTENTS_REQUEST.
994
995 :see: :py:class:`efl.ecore.EventHandler`
996 """
997 return EventHandler(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST,
998 func, *args, **kargs)
999
1000def on_ping_add(func, *args, **kargs):
1001 """Create an ecore event handler for ECORE_X_EVENT_PING.
1002
1003 :see: :py:class:`efl.ecore.EventHandler`
1004 """
1005 return EventHandler(ECORE_X_EVENT_PING,
1006 func, *args, **kargs)
1007
1008def on_desktop_change_add(func, *args, **kargs):
1009 """Create an ecore event handler for ECORE_X_EVENT_DESKTOP_CHANGE.
1010
1011 :see: :py:class:`efl.ecore.EventHandler`
1012 """
1013 return EventHandler(ECORE_X_EVENT_DESKTOP_CHANGE,
1014 func, *args, **kargs)
1015
1016## def on_startup_sequence_new_add(func, *args, **kargs):
1017## """Create an ecore event handler for ECORE_X_EVENT_STARTUP_SEQUENCE_NEW.
1018
1019## :see: :py:class:`efl.ecore.EventHandler`
1020## """
1021## return EventHandler(ECORE_X_EVENT_STARTUP_SEQUENCE_NEW,
1022## func, *args, **kargs)
1023
1024## def on_startup_sequence_change_add(func, *args, **kargs):
1025## """Create an ecore event handler for ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE.
1026
1027## :see: :py:class:`efl.ecore.EventHandler`
1028## """
1029## return EventHandler(ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE,
1030## func, *args, **kargs)
1031
1032## def on_startup_sequence_remove_add(func, *args, **kargs):
1033## """Create an ecore event handler for ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE.
1034
1035## :see: :py:class:`efl.ecore.EventHandler`
1036## """
1037## return EventHandler(ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE,
1038## func, *args, **kargs)
1039
diff --git a/efl/ecore_x/efl.ecore_x_window.pxi b/efl/ecore_x/efl.ecore_x_window.pxi
new file mode 100644
index 0000000..d67581b
--- /dev/null
+++ b/efl/ecore_x/efl.ecore_x_window.pxi
@@ -0,0 +1,466 @@
1# Copyright (C) 2007-2015 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 3 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17
18cdef class Window:
19 def __init__(self, Window parent=None, int x=0, int y=0, int w=1, int h=1,
20 input=False, argb=False, override_redirect=False):
21 """Create a new X window.
22
23 :param parent: window to use as parent, or None to use the
24 root window.
25 :param x: horizontal position.
26 :param y: vertical position.
27 :param w: horizontal size.
28 :param h: vertical size.
29 :param input: if should be an input-only window or not.
30 :param argb: if window should be ARGB.
31 :param override_redirect: if override redirect attribute must be set.
32 """
33 cdef Ecore_X_Window p_xid, xid
34 if parent is <Window>None:
35 p_xid = 0
36 else:
37 p_xid = parent.xid
38
39 if not input and not argb and not override_redirect:
40 xid = ecore_x_window_new(p_xid, x, y, w, h)
41 elif argb:
42 if not override_redirect:
43 xid = ecore_x_window_argb_new(p_xid, x, y, w, h)
44 else:
45 xid = ecore_x_window_override_argb_new(p_xid, x, y, w, h)
46 elif input:
47 xid = ecore_x_window_input_new(p_xid, x, y, w, h)
48 elif override_redirect:
49 xid = ecore_x_window_override_new(p_xid, x, y, w, h)
50 else:
51 raise ValueError("not able to create window!")
52
53 self._set_xid(xid)
54
55 cdef int _set_xid(self, Ecore_X_Window xid) except 0:
56 if self.xid == 0:
57 self.xid = xid
58 return 1
59 else:
60 raise ValueError("object already wraps an X Window.")
61
62 def __str__(self):
63 cdef int x, y, w, h, visible
64 cdef unsigned int parent
65
66 ecore_x_window_geometry_get(self.xid, &x, &y, &w, &h)
67 parent = ecore_x_window_parent_get(self.xid)
68 visible = ecore_x_window_visible_get(self.xid)
69 return "%s(xid=%#x, parent=%#x, x=%d, y=%d, w=%d, h=%d, visible=%s)" % \
70 (self.__class__.__name__, self.xid, parent, x, y, w, h,
71 bool(visible))
72
73 def __repr__(self):
74 cdef int x, y, w, h
75 cdef unsigned int parent
76
77 ecore_x_window_geometry_get(self.xid, &x, &y, &w, &h)
78 parent = ecore_x_window_parent_get(self.xid)
79 return "%s(%#x, xid=%#x, parent=%#x, x=%d, y=%d, w=%d, h=%d)" % \
80 (self.__class__.__name__, <unsigned long><void *>self,
81 self.xid, parent, x, y, w, h)
82
83 def __richcmp__(self, other, int op):
84 if op == 2: # equal
85 if self is other:
86 return 1
87 else:
88 return self.xid == int(other)
89 else:
90 return 0
91
92 def __int__(self):
93 return self.xid
94
95 def __long__(self):
96 return self.xid
97
98 def delete(self):
99 "Deletes the current window."
100 if self.xid != 0:
101 ecore_x_window_free(self.xid)
102 self.xid = 0
103
104 def delete_request_send(self):
105 "Sends a delete request to this window."
106 ecore_x_window_delete_request_send(self.xid)
107
108 def root_get(self):
109 ":rtype: Window"
110 cdef Ecore_X_Window xid
111 xid = ecore_x_window_root_get(self.xid)
112 return Window_from_xid(xid)
113
114 def reparent(self, Window new_parent=None, int x=0, int y=0):
115 """Moves this window to within another window at a given position.
116
117 :param new_parent: window to use as parent, or None to use the root
118 window.
119 :param x: horizontal position within the new parent.
120 :param y: vertical position within the new parent.
121 """
122 cdef Ecore_X_Window p_xid
123 if new_parent is <Window>None:
124 p_xid = 0
125 else:
126 p_xid = new_parent.xid
127 ecore_x_window_reparent(self.xid, p_xid, x, y)
128
129 def parent_set(self, Window new_parent=None):
130 """Set window parent.
131
132 :param new_parent: window to use as parent, or None to use the root
133 window.
134 :see: same as :py:meth:`reparent` with both x and y being 0.
135 """
136 cdef Ecore_X_Window p_xid
137 if new_parent is <Window>None:
138 p_xid = 0
139 else:
140 p_xid = new_parent.xid
141 ecore_x_window_reparent(self.xid, p_xid, 0, 0)
142
143 def parent_get(self):
144 ":rtype: Window"
145 cdef Ecore_X_Window xid
146 xid = ecore_x_window_parent_get(self.xid)
147 return Window_from_xid(xid)
148
149 property parent:
150 def __set__(self, value):
151 self.parent_set(value)
152
153 def __get__(self):
154 return self.parent_get()
155
156 def show(self):
157 """Shows this window.
158
159 Synonymous to "mapping" a window in X Window System terminology.
160 """
161 ecore_x_window_show(self.xid)
162
163 def hide(self):
164 """Hides a window.
165
166 Synonymous to "unmapping" a window in X Window System terminology.
167 """
168 ecore_x_window_hide(self.xid)
169
170 def visible_set(self, value):
171 if value:
172 self.show()
173 else:
174 self.hide()
175
176 def visible_get(self):
177 ":rtype: bool"
178 return bool(ecore_x_window_visible_get(self.xid))
179
180 def focus(self):
181 "Give focus to this windows."
182 ecore_x_window_focus(self.xid)
183
184 def focus_at_time(self, Ecore_X_Time time):
185 """Sets the focus this window at a specific time.
186
187 :param time: time specification, see :py:meth:`current_time_get`.
188 """
189 ecore_x_window_focus_at_time(self.xid, time)
190
191 def ignore_set(self, int setting):
192 ecore_x_window_ignore_set(self.xid, bool(setting))
193
194 def raise_(self):
195 "Raises this window."
196 ecore_x_window_raise(self.xid)
197
198 def lower(self):
199 "Lowers this window."
200 ecore_x_window_lower(self.xid)
201
202 def move(self, int x, int y):
203 """Set window position.
204
205 :param x: horizontal.
206 :param y: vertical.
207 """
208 ecore_x_window_move(self.xid, x, y)
209
210 def pos_set(self, int x, int y):
211 """Set window position.
212
213 :param x: horizontal.
214 :param y: vertical.
215
216 .. note:: alias for :py:meth:`move`
217 """
218 ecore_x_window_move(self.xid, x, y)
219
220 def pos_get(self):
221 ":rtype: tuple of int"
222 cdef int x, y, w, h
223 ecore_x_window_geometry_get(self.xid, &x, &y, &w, &h)
224 return (x, y)
225
226 property pos:
227 def __set__(self, spec):
228 self.pos_set(*spec)
229
230 def __get__(self):
231 return self.pos_get()
232
233 def resize(self, int w, int h):
234 """Set window size.
235
236 :param w: horizontal.
237 :param h: vertical.
238 """
239 ecore_x_window_resize(self.xid, w, h)
240
241 def size_set(self, int w, int h):
242 """Set window size.
243
244 :param w: horizontal.
245 :param h: vertical.
246
247 .. note:: alias for :py:meth:`resize`
248 """
249 ecore_x_window_resize(self.xid, w, h)
250
251 def size_get(self):
252 ":rtype: tuple of int"
253 cdef int w, h
254 ecore_x_window_size_get(self.xid, &w, &h)
255 return (w, h)
256
257 property size:
258 def __set__(self, spec):
259 self.size_set(*spec)
260
261 def __get__(self):
262 return self.size_get()
263
264 def move_resize(self, int x, int y, int w, int h):
265 """Set both position and size.
266
267 :param x: horizontal position.
268 :param y: vertical position.
269 :param w: horizontal size.
270 :param h: vertical size.
271 """
272 ecore_x_window_move_resize(self.xid, x, y, w, h)
273
274 def geometry_set(self, int x, int y, int w, int h):
275 """Set both position and size.
276
277 :param x: horizontal position.
278 :param y: vertical position.
279 :param w: horizontal size.
280 :param h: vertical size.
281 """
282 ecore_x_window_move_resize(self.xid, x, y, w, h)
283
284 def geometry_get(self):
285 ":rtype: tuple of int"
286 cdef int x, y, w, h
287 ecore_x_window_geometry_get(self.xid, &x, &y, &w, &h)
288 return (x, y, w, h)
289
290 property geometry:
291 def __set__(self, spec):
292 self.geometry_set(*spec)
293
294 def __get__(self):
295 return self.geometry_get()
296
297 def border_width_set(self, int width):
298 """Sets the width of the border of this window.
299
300 :param width: border width, in pixels.
301 """
302 ecore_x_window_border_width_set(self.xid, width)
303
304 def border_width_get(self):
305 ":rtype: int"
306 return ecore_x_window_border_width_get(self.xid)
307
308 property border_width:
309 def __set__(self, spec):
310 self.border_width_set(*spec)
311
312 def __get__(self):
313 return self.border_width_get()
314
315 def depth_get(self):
316 ":rtype: int"
317 return ecore_x_window_depth_get(self.xid)
318
319 property depth:
320 def __get__(self):
321 return self.depth_get()
322
323 def configure(self, int mask, int x, int y, int w, int h, int border_width,
324 Window sibling, int stack_mode):
325 cdef Ecore_X_Window sibling_xid
326 if sibling is <Window>None:
327 sibling_xid = 0
328 else:
329 sibling_xid = sibling.xid
330 ecore_x_window_configure(self.xid, <Ecore_X_Window_Configure_Mask>mask,
331 x, y, w, h, border_width, sibling_xid,
332 stack_mode)
333
334 def cursor_show(self):
335 ecore_x_window_cursor_show(self.xid, 1)
336
337 def cursor_hide(self):
338 ecore_x_window_cursor_show(self.xid, 0)
339
340 def cursor_set(self, Ecore_X_Cursor cursor):
341 ecore_x_window_cursor_set(self.xid, cursor)
342
343 def pointer_warp(self, int x, int y):
344 ecore_x_pointer_warp(self.xid, x, y)
345
346 def pointer_xy_get(self):
347 cdef int x, y
348 ecore_x_pointer_xy_get(self.xid, &x, &y);
349 return (x, y)
350
351 def defaults_set(self):
352 """Sets the default properties for the given window.
353
354 The default properties set for the window are WM_CLIENT_MACHINE and
355 _NET_WM_PID.
356 """
357 ecore_x_window_defaults_set(self.xid)
358
359 def killall_children(self):
360 "Kill all clients with subwindows under this window."
361 ecore_x_killall(self.xid)
362
363 def kill(self):
364 "Kill this specific client"
365 ecore_x_kill(self.xid)
366
367 def background_color_set(self, int r, int g, int b):
368 """Set background color.
369
370 :param r: red (0...65536, 16 bits)
371 :param g: green (0...65536, 16 bits)
372 :param b: blue (0...65536, 16 bits)
373 """
374 ecore_x_window_background_color_set(self.xid, r, g, b)
375
376 def area_clear(self, int x, int y, int w, int h):
377 "Paints the specified area with background's color or pixmap."
378 ecore_x_window_area_clear(self.xid, x, y, w, h)
379
380 def area_expose(self, int x, int y, int w, int h):
381 "Like :py:meth:`area_clear`, but generates exposures."
382 ecore_x_window_area_expose(self.xid, x, y, w, h)
383
384 def override_set(self, int setting):
385 ecore_x_window_override_set(self.xid, bool(setting))
386
387 def argb_get(self):
388 ":rtype: bool"
389 return bool(ecore_x_window_argb_get(self.xid))
390
391 def gravity_set(self, int gravity):
392 ecore_x_window_gravity_set(self.xid, <Ecore_X_Gravity>gravity)
393
394 def pixel_gravity_set(self, int gravity):
395 ecore_x_window_pixel_gravity_set(self.xid, <Ecore_X_Gravity>gravity)
396
397 def event_mask_set(self, int mask):
398 ecore_x_event_mask_set(self.xid, <Ecore_X_Event_Mask>mask)
399
400 def event_mask_unset(self, int mask):
401 ecore_x_event_mask_unset(self.xid, <Ecore_X_Event_Mask>mask)
402
403 def icccm_hints_set(self, int accepts_focus, int initial_state,
404 int icon_pixmap, int icon_mask, int icon_window,
405 int window_group, int is_urgent):
406 """Set ICCCM window hints.
407
408 :param accepts_focus: if window accepts focus or not.
409 :param initial_state: one of ECORE_X_WINDOW_STATE_HINT_*.
410 :param icon_pixmap: pixmap id to be used as icon.
411 :param icon_mask: pixmap id to be used as icon mask.
412 :param icon_window: window id to be used as icon.
413 :param window_group: window id representing the group.
414 :param is_urgent: if window is urgent or not.
415 """
416 ecore_x_icccm_hints_set(self.xid, accepts_focus,
417 <Ecore_X_Window_State_Hint>initial_state,
418 icon_pixmap, icon_mask, icon_window,
419 window_group, is_urgent)
420
421 def icccm_hints_get(self):
422 """Get ICCCM window hints.
423
424 :see: :py:meth:`icccm_hints_set`
425 :return: tuple with: accepts_focus, initial_state, icon_pixmap,
426 icon_mask, icon_window, window_group, is_urgent
427 """
428 cdef Eina_Bool accepts_focus, is_urgent
429 cdef int initial_state, icon_pixmap, icon_mask, \
430 icon_window, window_group
431 ecore_x_icccm_hints_get(self.xid, &accepts_focus,
432 <Ecore_X_Window_State_Hint *>&initial_state,
433 <Ecore_X_Pixmap *>&icon_pixmap,
434 <Ecore_X_Pixmap *>&icon_mask,
435 <Ecore_X_Window *>&icon_window,
436 <Ecore_X_Window *>&window_group,
437 &is_urgent)
438 return (bool(accepts_focus), initial_state, icon_pixmap, icon_mask,
439 icon_window, window_group, bool(is_urgent))
440
441 def type_set(self, int type):
442 ecore_x_netwm_window_type_set(self.xid, <Ecore_X_Window_Type>type)
443
444 def state_set(self, states):
445 # building list
446 cdef Ecore_X_Window_State *_states
447 _states = <Ecore_X_Window_State *>PyMem_Malloc(len(states) * sizeof(Ecore_X_Window_State))
448 for i in xrange(len(states)):
449 _states[i] = states[i]
450
451 ecore_x_netwm_window_state_set(self.xid, _states, len(states))
452 PyMem_Free(<void*>_states)
453
454 def keyboard_grab(self):
455 return bool(ecore_x_keyboard_grab(self.xid))
456
457def Window_from_xid(unsigned long xid):
458 """Create a Python wrapper for given window id.
459
460 :param xid: window id.
461 :rtype: L{Window}
462 """
463 cdef Window w
464 w = Window.__new__(Window)
465 w._set_xid(xid)
466 return w