summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-05-13 17:59:48 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-05-13 17:59:48 +0300
commit1466ea72071e27380e6d86de4d1712e587fce3b3 (patch)
treed24bbb868725f7cf233aa66b52f005e2157ef4a8
parentd98cd27107ce3588d8f84f4c90ae1f19f2840cbd (diff)
efl.ecore: Return of ecore.x (from python-ecore)
Made some corrections to make it compile and fixed doc formatting.
-rw-r--r--doc/ecore/ecore.rst1
-rw-r--r--doc/ecore/x.rst8
-rw-r--r--efl/ecore/__init__.pxd3
-rw-r--r--efl/ecore/efl.ecore_events.pxi4
-rw-r--r--efl/ecore/x.pxd1612
-rw-r--r--efl/ecore/x.pyx237
-rw-r--r--efl/ecore/x_events.pxi1038
-rw-r--r--efl/ecore/x_window.pxi463
-rw-r--r--examples/ecore/x/mplayer_embed.py44
-rw-r--r--examples/ecore/x/window_creation.py43
-rwxr-xr-xsetup.py33
11 files changed, 3477 insertions, 9 deletions
diff --git a/doc/ecore/ecore.rst b/doc/ecore/ecore.rst
index e208150..f675f33 100644
--- a/doc/ecore/ecore.rst
+++ b/doc/ecore/ecore.rst
@@ -89,6 +89,7 @@ API Reference
89 :maxdepth: 4 89 :maxdepth: 4
90 90
91 ecore_module 91 ecore_module
92 x
92 timer 93 timer
93 animator 94 animator
94 poller 95 poller
diff --git a/doc/ecore/x.rst b/doc/ecore/x.rst
new file mode 100644
index 0000000..b369834
--- /dev/null
+++ b/doc/ecore/x.rst
@@ -0,0 +1,8 @@
1:mod:`efl.ecore.x` Module
2--------------------------
3
4.. automodule:: efl.ecore.x
5
6.. inheritance-diagram::
7 efl.ecore.x
8 :parts: 2
diff --git a/efl/ecore/__init__.pxd b/efl/ecore/__init__.pxd
index 29758c1..2516ab3 100644
--- a/efl/ecore/__init__.pxd
+++ b/efl/ecore/__init__.pxd
@@ -346,3 +346,6 @@ cdef class FileMonitor:
346 cdef readonly object kargs 346 cdef readonly object kargs
347 347
348 cdef object _exec_monitor(self, Ecore_File_Event event, const char *path) 348 cdef object _exec_monitor(self, Ecore_File_Event event, const char *path)
349
350cdef object _event_mapping_register(int type, cls)
351cdef object _event_mapping_unregister(int type)
diff --git a/efl/ecore/efl.ecore_events.pxi b/efl/ecore/efl.ecore_events.pxi
index 5e55edc..1320f9a 100644
--- a/efl/ecore/efl.ecore_events.pxi
+++ b/efl/ecore/efl.ecore_events.pxi
@@ -18,7 +18,7 @@
18 18
19cdef object _event_type_mapping = dict() 19cdef object _event_type_mapping = dict()
20 20
21def _event_mapping_register(int type, cls): 21cdef object _event_mapping_register(int type, cls):
22 if type in _event_type_mapping: 22 if type in _event_type_mapping:
23 raise ValueError("event type '%d' already registered." % type) 23 raise ValueError("event type '%d' already registered." % type)
24 if not issubclass(cls, Event): 24 if not issubclass(cls, Event):
@@ -26,7 +26,7 @@ def _event_mapping_register(int type, cls):
26 _event_type_mapping[type] = cls 26 _event_type_mapping[type] = cls
27 27
28 28
29def _event_mapping_unregister(int type): 29cdef object _event_mapping_unregister(int type):
30 _event_type_mapping.pop(type) 30 _event_type_mapping.pop(type)
31 31
32 32
diff --git a/efl/ecore/x.pxd b/efl/ecore/x.pxd
new file mode 100644
index 0000000..12dd83b
--- /dev/null
+++ b/efl/ecore/x.pxd
@@ -0,0 +1,1612 @@
1# Copyright (C) 2007-2014 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
1307from efl.ecore cimport Event
1308
1309
1310cdef class Window:
1311 cdef readonly Ecore_X_Window xid
1312
1313 cdef int _set_xid(self, Ecore_X_Window xid)
1314
1315
1316cdef class EventKey(Event):
1317 cdef readonly object keyname
1318 cdef readonly object key
1319 cdef readonly object string
1320 cdef readonly object compose
1321 cdef readonly Window window
1322 cdef readonly Window root_window
1323 cdef readonly Window event_window
1324 cdef readonly unsigned int modifiers
1325 cdef readonly unsigned int timestamp
1326 cdef readonly int same_screen
1327
1328
1329cdef class EventPoint:
1330 cdef readonly int x
1331 cdef readonly int y
1332
1333
1334cdef class EventMouseButton(Event):
1335 cdef readonly Window window
1336 cdef readonly Window root_window
1337 cdef readonly Window event_window
1338 cdef readonly unsigned int modifiers
1339 cdef readonly unsigned int timestamp
1340 cdef readonly unsigned int buttons
1341 cdef readonly unsigned int double_click
1342 cdef readonly unsigned int triple_click
1343 cdef readonly int same_screen
1344 cdef readonly int x
1345 cdef readonly int y
1346 cdef readonly EventPoint root
1347
1348
1349cdef class EventMouseMove(Event):
1350 cdef readonly Window window
1351 cdef readonly Window root_window
1352 cdef readonly Window event_window
1353 cdef readonly unsigned int modifiers
1354 cdef readonly unsigned int timestamp
1355 cdef readonly int same_screen
1356 cdef readonly int x
1357 cdef readonly int y
1358 cdef readonly EventPoint root
1359
1360
1361cdef class EventMouseIO(Event):
1362 cdef readonly Window window
1363 cdef readonly Window event_window
1364 cdef readonly unsigned int modifiers
1365 cdef readonly unsigned int timestamp
1366 cdef readonly int x
1367 cdef readonly int y
1368
1369
1370cdef class EventMouseWheel(Event):
1371 cdef readonly Window window
1372 cdef readonly Window root_window
1373 cdef readonly Window event_window
1374 cdef readonly unsigned int modifiers
1375 cdef readonly unsigned int timestamp
1376 cdef readonly int same_screen
1377 cdef readonly int direction
1378 cdef readonly int z
1379 cdef readonly int x
1380 cdef readonly int y
1381 cdef readonly EventPoint root
1382
1383
1384cdef class EventWindowFocusIn(Event):
1385 cdef readonly Window win
1386 cdef readonly int mode
1387 cdef readonly int detail
1388 cdef readonly unsigned int time
1389
1390
1391cdef class EventWindowFocusOut(Event):
1392 cdef readonly Window win
1393 cdef readonly int mode
1394 cdef readonly int detail
1395 cdef readonly unsigned int time
1396
1397
1398cdef class EventWindowKeymap(Event):
1399 cdef readonly Window win
1400
1401
1402cdef class EventWindowDamage(Event):
1403 cdef readonly Window win
1404 cdef readonly int x
1405 cdef readonly int y
1406 cdef readonly int w
1407 cdef readonly int h
1408 cdef readonly int count
1409 cdef readonly unsigned int time
1410
1411
1412cdef class EventWindowVisibilityChange(Event):
1413 cdef readonly Window win
1414 cdef readonly int fully_obscured
1415 cdef readonly unsigned int time
1416
1417
1418cdef class EventWindowCreate(Event):
1419 cdef readonly Window win
1420 cdef readonly int override
1421 cdef readonly unsigned int time
1422
1423
1424cdef class EventWindowDestroy(Event):
1425 cdef readonly Window win
1426 cdef readonly unsigned int time
1427
1428
1429cdef class EventWindowHide(Event):
1430 cdef readonly Window win
1431 cdef readonly unsigned int time
1432
1433
1434cdef class EventWindowShow(Event):
1435 cdef readonly Window win
1436 cdef readonly unsigned int time
1437
1438
1439cdef class EventWindowShowRequest(Event):
1440 cdef readonly Window win
1441 cdef readonly Window parent
1442 cdef readonly unsigned int time
1443
1444
1445cdef class EventWindowReparent(Event):
1446 cdef readonly Window win
1447 cdef readonly Window parent
1448 cdef readonly unsigned int time
1449
1450
1451cdef class EventWindowConfigure(Event):
1452 cdef readonly Window win
1453 cdef readonly Window above_win
1454 cdef readonly int x
1455 cdef readonly int y
1456 cdef readonly int w
1457 cdef readonly int h
1458 cdef readonly int border
1459 cdef readonly unsigned int override
1460 cdef readonly unsigned int from_wm
1461 cdef readonly unsigned int time
1462
1463
1464cdef class EventWindowConfigureRequest(Event):
1465 cdef readonly Window win
1466 cdef readonly Window above_win
1467 cdef readonly int x
1468 cdef readonly int y
1469 cdef readonly int w
1470 cdef readonly int h
1471 cdef readonly int border
1472 cdef readonly int stack_mode
1473 cdef readonly unsigned long value_mask
1474 cdef readonly unsigned int time
1475
1476
1477cdef class EventWindowGravity(Event):
1478 cdef readonly Window win
1479 cdef readonly unsigned int time
1480
1481
1482cdef class EventWindowResizeRequest(Event):
1483 cdef readonly Window win
1484 cdef readonly int w
1485 cdef readonly int h
1486 cdef readonly unsigned int time
1487
1488
1489cdef class EventWindowStack(Event):
1490 cdef readonly Window win
1491 cdef readonly Window event_win
1492 cdef readonly int stack_mode
1493 cdef readonly unsigned int time
1494
1495
1496cdef class EventWindowStackRequest(Event):
1497 cdef readonly Window win
1498 cdef readonly Window parent
1499 cdef readonly int stack_mode
1500 cdef readonly unsigned int time
1501
1502
1503cdef class EventDesktopChange(Event):
1504 cdef readonly Window win
1505 cdef readonly long desktop
1506 cdef readonly unsigned int time
1507
1508
1509cdef class EventPing(Event):
1510 cdef readonly Window win
1511 cdef readonly Window event_win
1512 cdef readonly unsigned int time
1513
1514
1515cdef class EventWindowStateRequest(Event):
1516 cdef readonly Window win
1517 cdef readonly int action
1518 cdef readonly int state1
1519 cdef readonly int state2
1520 cdef readonly int source
1521
1522
1523cdef class EventFrameExtentsRequest(Event):
1524 cdef readonly Window win
1525
1526
1527cdef class EventWindowShape(Event):
1528 cdef readonly Window win
1529 cdef readonly unsigned int time
1530
1531
1532cdef class EventScreensaverNotify(Event):
1533 cdef readonly Window win
1534 cdef readonly int on
1535 cdef readonly unsigned int time
1536
1537
1538cdef class EventSyncCounter(Event):
1539 cdef readonly unsigned int time
1540
1541
1542cdef class EventSyncAlarm(Event):
1543 cdef readonly unsigned int time
1544 cdef readonly unsigned int alarm
1545
1546
1547cdef class EventScreenChange(Event):
1548 cdef readonly Window win
1549 cdef readonly Window root
1550 cdef readonly int width
1551 cdef readonly int height
1552
1553
1554cdef class EventWindowDeleteRequest(Event):
1555 cdef readonly Window win
1556 cdef readonly unsigned int time
1557
1558
1559cdef class EventWindowMoveResizeRequest(Event):
1560 cdef readonly Window win
1561 cdef readonly int x
1562 cdef readonly int y
1563 cdef readonly int button
1564 cdef readonly int source
1565
1566
1567
1568
1569## cdef class EventWindowProperty(Event):
1570## cdef readonly Window win
1571## Atom atom
1572## cdef readonly unsigned int time
1573
1574
1575## cdef class EventWindowColormap(Event):
1576## cdef readonly Window win
1577## Colormap cmap
1578## cdef readonly int installed
1579## cdef readonly unsigned int time
1580
1581
1582## cdef class EventSelectionClear(Event):
1583## cdef readonly Window win
1584## Selection selection
1585## cdef readonly unsigned int time
1586
1587
1588## cdef class EventSelectionRequest(Event):
1589## cdef readonly Window owner
1590## cdef readonly Window requestor
1591## cdef readonly unsigned int time
1592## Atom selection
1593## Atom target
1594## Atom property
1595
1596
1597## cdef class EventSelectionNotify(Event):
1598## cdef readonly Window win
1599## cdef readonly unsigned int time
1600## Selection selection
1601## cdef readonly object target
1602## void *data
1603
1604
1605## cdef class EventDamage(Event):
1606## cdef readonly int level
1607## Ecore_X_Drawable drawable
1608## Ecore_X_Damage damage
1609## cdef readonly int more
1610## cdef readonly unsigned int time
1611## cdef readonly EventRectangle area
1612## cdef readonly EventRectangle geometry
diff --git a/efl/ecore/x.pyx b/efl/ecore/x.pyx
new file mode 100644
index 0000000..045be39
--- /dev/null
+++ b/efl/ecore/x.pyx
@@ -0,0 +1,237 @@
1# Copyright (C) 2007-2014 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
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 char *s
29 cdef int i
30 if name is None:
31 s = NULL
32 else:
33 s = name
34 i = ecore_x_init(s)
35 x_events_register()
36 return i
37
38
39def shutdown():
40 """Shuts down the Ecore X library.
41
42 In shutting down the library, the X display connection is terminated
43 and any event handlers for it are removed.
44
45 :rtype: int
46 """
47 return ecore_x_shutdown()
48
49
50def disconnect():
51 """Shuts down the Ecore X library.
52
53 As ecore_x_shutdown, except do not close Display, only connection.
54
55 :rtype: int
56 """
57 return ecore_x_disconnect()
58
59
60def fd_get():
61 """Retrieves the X display file descriptor.
62
63 :rtype: int
64 """
65 return ecore_x_fd_get()
66
67
68def double_click_time_set(double t):
69 """Sets the timeout for a double and triple clicks to be flagged.
70
71 This sets the time between clicks before the double_click flag is
72 set in a button down event. If 3 clicks occur within double this
73 time, the triple_click flag is also set.
74 """
75 ecore_x_double_click_time_set(t)
76
77def double_click_time_get():
78 ":rtype: float"
79 return ecore_x_double_click_time_get()
80
81
82def flush():
83 "Sends all X commands in the X Display buffer."
84 ecore_x_flush()
85
86
87def sync():
88 "Flushes the command buffer and waits until all requests have been"
89 ecore_x_sync()
90
91
92def current_time_get():
93 "Return the last event time."
94 return ecore_x_current_time_get()
95
96
97def error_request_get():
98 """Get the request code that caused the error.
99
100 :rtype: int
101 """
102 return ecore_x_error_request_get()
103
104
105def error_code_get():
106 """Get the error code from the error.
107
108 :rtype: int
109 """
110 return ecore_x_error_code_get()
111
112
113def window_focus_get():
114 """Returns the window that has the focus.
115
116 :rtype: L{Window}
117 """
118 cdef Ecore_X_Window xid
119 xid = ecore_x_window_focus_get()
120 return Window_from_xid(xid)
121
122
123cdef int _skip_list_build(skip_list, Ecore_X_Window **pskips, int *pskip_num) except 0:
124 cdef Window win
125 cdef int i
126
127 if skip_list:
128 pskip_num[0] = len(skip_list)
129 else:
130 pskip_num[0] = 0
131
132 if pskip_num[0] == 0:
133 pskips[0] = NULL
134 return 1
135 else:
136 pskips[0] = <Ecore_X_Window *>PyMem_Malloc(pskip_num[0] * sizeof(Ecore_X_Window))
137 i = 0
138 try:
139 for w in skip_list:
140 win = w
141 pskips[0][i] = win.xid
142 i += 1
143 except:
144 pskip_num[0] = 0
145 PyMem_Free(<void*>pskips[0])
146 raise
147 return 1
148
149
150def window_shadow_tree_at_xy_with_skip_get(Window base, int x, int y, skip_list=None):
151 """Retrieves the top, visible window at the given location,
152 but skips the windows in the list. This uses a shadow tree built from the
153 window tree that is only updated the first time
154 L{window_shadow_tree_at_xy_with_skip_get()} is called, or the next time
155 it is called after a L{window_shadow_tree_flush()}.
156
157 :param base: Window to use as base, or None to use root window.
158 :param x: The given X position.
159 :param y: The given Y position.
160 :rtype: Window
161 """
162 cdef:
163 Ecore_X_Window base_xid, ret_xid
164 Ecore_X_Window *skips
165 int skip_num
166 if base is <Window>None:
167 base_xid = 0
168 else:
169 base_xid = base.xid
170
171 _skip_list_build(skip_list, &skips, &skip_num)
172 ret_xid = ecore_x_window_shadow_tree_at_xy_with_skip_get(base_xid, x, y,
173 skips, skip_num)
174 if skips != NULL:
175 PyMem_Free(<void*>skips)
176
177 return Window_from_xid(ret_xid)
178
179
180def window_shadow_tree_flush():
181 "Flushes the window shadow tree so nothing is stored."
182 ecore_x_window_shadow_tree_flush()
183
184
185def window_at_xy_get(int x, int y):
186 """Retrieves the top, visible window at the given location.
187
188 :param x: horizontal position.
189 :param y: vertical position.
190 :rtype: Window
191 """
192 cdef Ecore_X_Window xid
193 xid = ecore_x_window_at_xy_get(x, y)
194 return Window_from_xid(xid)
195
196
197def window_at_xy_with_skip_get(int x, int y, skip_list=None):
198 """Retrieves the top, visible window at the given location.
199
200 :param x: horizontal position.
201 :param y: vertical position.
202 :rtype: Window
203 """
204 cdef:
205 Ecore_X_Window xid
206 Ecore_X_Window *skips
207 int skip_num
208
209 _skip_list_build(skip_list, &skips, &skip_num)
210 xid = ecore_x_window_at_xy_with_skip_get(x, y, skips, skip_num)
211
212 if skips != NULL:
213 PyMem_Free(<void*>skips)
214
215 return Window_from_xid(xid)
216
217
218def window_at_xy_begin_get(Window begin, int x, int y):
219 """Retrieves the top, visible window at the given location, starting from
220 begin.
221
222 :param begin: Window to start at.
223 :param x: horizontal position.
224 :param y: vertical position.
225 :rtype: Window
226 """
227 cdef Ecore_X_Window xid, begin_xid
228 if begin is <Window>None:
229 begin_xid = 0
230 else:
231 begin_xid = begin.xid
232 xid = ecore_x_window_at_xy_begin_get(begin_xid, x, y)
233 return Window_from_xid(xid)
234
235
236include "x_window.pxi"
237include "x_events.pxi"
diff --git a/efl/ecore/x_events.pxi b/efl/ecore/x_events.pxi
new file mode 100644
index 0000000..680239e
--- /dev/null
+++ b/efl/ecore/x_events.pxi
@@ -0,0 +1,1038 @@
1# Copyright (C) 2007-2014 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
19
20cdef object _charp_to_str(const char *p):
21 if p != NULL:
22 return p
23 else:
24 return None
25
26
27cdef class EventKey(Event):
28 cdef int _set_obj(self, void *o) except 0:
29 cdef Ecore_Event_Key *obj
30 obj = <Ecore_Event_Key*>o
31 self.keyname = _charp_to_str(obj.keyname)
32 self.key = _charp_to_str(obj.key)
33 self.string = _charp_to_str(obj.string)
34 self.compose = _charp_to_str(obj.compose)
35 self.window = Window_from_xid(<unsigned long><void*>obj.window)
36 self.root_window = Window_from_xid(<unsigned long><void*>obj.root_window)
37 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
38 self.timestamp = obj.timestamp
39 self.modifiers = obj.modifiers
40 self.same_screen = obj.same_screen
41 return 1
42
43
44cdef class EventPoint:
45 def __init__(self, int x, int y):
46 self.x = x
47 self.y = y
48
49
50cdef class EventMouseButton(Event):
51 cdef int _set_obj(self, void *o) except 0:
52 cdef Ecore_Event_Mouse_Button *obj
53 obj = <Ecore_Event_Mouse_Button*>o
54 self.window = Window_from_xid(<unsigned long><void*>obj.window)
55 self.root_window = Window_from_xid(<unsigned long><void*>obj.root_window)
56 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
57 self.timestamp = obj.timestamp
58 self.modifiers = obj.modifiers
59 self.buttons = obj.buttons
60 self.double_click = obj.double_click
61 self.triple_click = obj.triple_click
62 self.same_screen = obj.same_screen
63 self.x = obj.x
64 self.y = obj.y
65 self.root = EventPoint(obj.root.x, obj.root.y)
66 return 1
67
68
69cdef class EventMouseMove(Event):
70 cdef int _set_obj(self, void *o) except 0:
71 cdef Ecore_Event_Mouse_Move *obj
72 obj = <Ecore_Event_Mouse_Move *>o
73 self.window = Window_from_xid(<unsigned long><void*>obj.window)
74 self.root_window = Window_from_xid(<unsigned long><void*>obj.root_window)
75 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
76 self.timestamp = obj.timestamp
77 self.modifiers = obj.modifiers
78 self.same_screen = obj.same_screen
79 self.x = obj.x
80 self.y = obj.y
81 self.root = EventPoint(obj.root.x, obj.root.y)
82 return 1
83
84
85cdef class EventMouseIO(Event):
86 cdef int _set_obj(self, void *o) except 0:
87 cdef Ecore_Event_Mouse_IO *obj
88 obj = <Ecore_Event_Mouse_IO *>o
89 self.window = Window_from_xid(<unsigned long><void*>obj.window)
90 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
91 self.timestamp = obj.timestamp
92 self.modifiers = obj.modifiers
93 self.x = obj.x
94 self.y = obj.y
95 return 1
96
97
98cdef class EventMouseWheel(Event):
99 cdef int _set_obj(self, void *o) except 0:
100 cdef Ecore_Event_Mouse_Wheel *obj
101 obj = <Ecore_Event_Mouse_Wheel *>o
102 self.window = Window_from_xid(<unsigned long><void*>obj.window)
103 self.root_window = Window_from_xid(<unsigned long><void*>obj.root_window)
104 self.event_window = Window_from_xid(<unsigned long><void*>obj.event_window)
105 self.timestamp = obj.timestamp
106 self.modifiers = obj.modifiers
107 self.same_screen = obj.same_screen
108 self.direction = obj.direction
109 self.z = obj.z
110 self.x = obj.x
111 self.y = obj.y
112 self.root = EventPoint(obj.root.x, obj.root.y)
113 return 1
114
115
116cdef class EventWindowFocusIn(Event):
117 cdef int _set_obj(self, void *o) except 0:
118 cdef Ecore_X_Event_Window_Focus_In *obj
119 obj = <Ecore_X_Event_Window_Focus_In *>o
120 self.win = Window_from_xid(obj.win)
121 self.mode = obj.mode
122 self.detail = obj.detail
123 self.time = obj.time
124 return 1
125
126
127cdef class EventWindowFocusOut(Event):
128 cdef int _set_obj(self, void *o) except 0:
129 cdef Ecore_X_Event_Window_Focus_Out *obj
130 obj = <Ecore_X_Event_Window_Focus_Out *>o
131 self.win = Window_from_xid(obj.win)
132 self.mode = obj.mode
133 self.detail = obj.detail
134 self.time = obj.time
135 return 1
136
137
138cdef class EventWindowKeymap(Event):
139 cdef int _set_obj(self, void *o) except 0:
140 cdef Ecore_X_Event_Window_Keymap *obj
141 obj = <Ecore_X_Event_Window_Keymap *>o
142 self.win = Window_from_xid(obj.win)
143 return 1
144
145
146cdef class EventWindowDamage(Event):
147 cdef int _set_obj(self, void *o) except 0:
148 cdef Ecore_X_Event_Window_Damage *obj
149 obj = <Ecore_X_Event_Window_Damage *>o
150 self.win = Window_from_xid(obj.win)
151 self.x = obj.x
152 self.y = obj.y
153 self.w = obj.w
154 self.h = obj.h
155 self.count = obj.count
156 self.time = obj.time
157 return 1
158
159
160cdef class EventWindowVisibilityChange(Event):
161 cdef int _set_obj(self, void *o) except 0:
162 cdef Ecore_X_Event_Window_Visibility_Change *obj
163 obj = <Ecore_X_Event_Window_Visibility_Change *>o
164 self.win = Window_from_xid(obj.win)
165 self.fully_obscured = obj.fully_obscured
166 self.time = obj.time
167 return 1
168
169
170cdef class EventWindowCreate(Event):
171 cdef int _set_obj(self, void *o) except 0:
172 cdef Ecore_X_Event_Window_Create *obj
173 obj = <Ecore_X_Event_Window_Create *>o
174 self.win = Window_from_xid(obj.win)
175 self.override = obj.override
176 self.time = obj.time
177 return 1
178
179
180cdef class EventWindowDestroy(Event):
181 cdef int _set_obj(self, void *o) except 0:
182 cdef Ecore_X_Event_Window_Destroy *obj
183 obj = <Ecore_X_Event_Window_Destroy *>o
184 self.win = Window_from_xid(obj.win)
185 self.time = obj.time
186 return 1
187
188
189cdef class EventWindowHide(Event):
190 cdef int _set_obj(self, void *o) except 0:
191 cdef Ecore_X_Event_Window_Hide *obj
192 obj = <Ecore_X_Event_Window_Hide *>o
193 self.win = Window_from_xid(obj.win)
194 self.time = obj.time
195 return 1
196
197
198cdef class EventWindowShow(Event):
199 cdef int _set_obj(self, void *o) except 0:
200 cdef Ecore_X_Event_Window_Show *obj
201 obj = <Ecore_X_Event_Window_Show *>o
202 self.win = Window_from_xid(obj.win)
203 self.time = obj.time
204 return 1
205
206
207cdef class EventWindowShowRequest(Event):
208 cdef int _set_obj(self, void *o) except 0:
209 cdef Ecore_X_Event_Window_Show_Request *obj
210 obj = <Ecore_X_Event_Window_Show_Request *>o
211 self.win = Window_from_xid(obj.win)
212 self.parent = Window_from_xid(obj.parent)
213 self.time = obj.time
214 return 1
215
216
217cdef class EventWindowReparent(Event):
218 cdef int _set_obj(self, void *o) except 0:
219 cdef Ecore_X_Event_Window_Reparent *obj
220 obj = <Ecore_X_Event_Window_Reparent *>o
221 self.win = Window_from_xid(obj.win)
222 self.parent = Window_from_xid(obj.parent)
223 self.time = obj.time
224 return 1
225
226
227cdef class EventWindowConfigure(Event):
228 cdef int _set_obj(self, void *o) except 0:
229 cdef Ecore_X_Event_Window_Configure *obj
230 obj = <Ecore_X_Event_Window_Configure *>o
231 self.win = Window_from_xid(obj.win)
232 self.above_win = Window_from_xid(obj.abovewin)
233 self.x = obj.x
234 self.y = obj.y
235 self.w = obj.w
236 self.h = obj.h
237 self.border = obj.border
238 self.override = obj.override
239 self.from_wm = obj.from_wm
240 self.time = obj.time
241 return 1
242
243
244cdef class EventWindowConfigureRequest(Event):
245 cdef int _set_obj(self, void *o) except 0:
246 cdef Ecore_X_Event_Window_Configure_Request *obj
247 obj = <Ecore_X_Event_Window_Configure_Request *>o
248 self.win = Window_from_xid(obj.win)
249 self.above_win = Window_from_xid(obj.abovewin)
250 self.x = obj.x
251 self.y = obj.y
252 self.w = obj.w
253 self.h = obj.h
254 self.border = obj.border
255 self.stack_mode = obj.detail
256 self.value_mask = obj.value_mask
257 self.time = obj.time
258 return 1
259
260
261cdef class EventWindowGravity(Event):
262 cdef int _set_obj(self, void *o) except 0:
263 cdef Ecore_X_Event_Window_Gravity *obj
264 obj = <Ecore_X_Event_Window_Gravity *>o
265 self.win = Window_from_xid(obj.win)
266 self.time = obj.time
267 return 1
268
269
270cdef class EventWindowResizeRequest(Event):
271 cdef int _set_obj(self, void *o) except 0:
272 cdef Ecore_X_Event_Window_Resize_Request *obj
273 obj = <Ecore_X_Event_Window_Resize_Request *>o
274 self.win = Window_from_xid(obj.win)
275 self.w = obj.w
276 self.h = obj.h
277 self.time = obj.time
278 return 1
279
280
281cdef class EventWindowStack(Event):
282 cdef int _set_obj(self, void *o) except 0:
283 cdef Ecore_X_Event_Window_Stack *obj
284 obj = <Ecore_X_Event_Window_Stack *>o
285 self.win = Window_from_xid(obj.win)
286 self.event_win = Window_from_xid(obj.event_win)
287 self.stack_mode = obj.detail
288 self.time = obj.time
289 return 1
290
291
292cdef class EventWindowStackRequest(Event):
293 cdef int _set_obj(self, void *o) except 0:
294 cdef Ecore_X_Event_Window_Stack_Request *obj
295 obj = <Ecore_X_Event_Window_Stack_Request *>o
296 self.win = Window_from_xid(obj.win)
297 self.parent = Window_from_xid(obj.parent)
298 self.stack_mode = obj.detail
299 self.time = obj.time
300 return 1
301
302
303cdef class EventPing(Event):
304 cdef int _set_obj(self, void *o) except 0:
305 cdef Ecore_X_Event_Ping *obj
306 obj = <Ecore_X_Event_Ping *>o
307 self.win = Window_from_xid(obj.win)
308 self.event_win = Window_from_xid(obj.event_win)
309 self.time = obj.time
310 return 1
311
312
313cdef class EventWindowStateRequest(Event):
314 cdef int _set_obj(self, void *o) except 0:
315 cdef Ecore_X_Event_Window_State_Request *obj
316 obj = <Ecore_X_Event_Window_State_Request *>o
317 self.win = Window_from_xid(obj.win)
318 self.action = obj.action
319 self.state1 = obj.state[0]
320 self.state2 = obj.state[1]
321 self.source = obj.source
322 return 1
323
324
325cdef class EventFrameExtentsRequest(Event):
326 cdef int _set_obj(self, void *o) except 0:
327 cdef Ecore_X_Event_Frame_Extents_Request *obj
328 obj = <Ecore_X_Event_Frame_Extents_Request *>o
329 self.win = Window_from_xid(obj.win)
330 return 1
331
332
333cdef class EventWindowShape(Event):
334 cdef int _set_obj(self, void *o) except 0:
335 cdef Ecore_X_Event_Window_Shape *obj
336 obj = <Ecore_X_Event_Window_Shape *>o
337 self.win = Window_from_xid(obj.win)
338 self.time = obj.time
339 return 1
340
341
342cdef class EventScreensaverNotify(Event):
343 cdef int _set_obj(self, void *o) except 0:
344 cdef Ecore_X_Event_Screensaver_Notify *obj
345 obj = <Ecore_X_Event_Screensaver_Notify *>o
346 self.win = Window_from_xid(obj.win)
347 self.on = obj.on
348 self.time = obj.time
349 return 1
350
351
352cdef class EventSyncCounter(Event):
353 cdef int _set_obj(self, void *o) except 0:
354 cdef Ecore_X_Event_Sync_Counter *obj
355 obj = <Ecore_X_Event_Sync_Counter *>o
356 self.time = obj.time
357 return 1
358
359
360cdef class EventSyncAlarm(Event):
361 cdef int _set_obj(self, void *o) except 0:
362 cdef Ecore_X_Event_Sync_Alarm *obj
363 obj = <Ecore_X_Event_Sync_Alarm *>o
364 self.time = obj.time
365 self.alarm = obj.alarm
366 return 1
367
368
369cdef class EventScreenChange(Event):
370 cdef int _set_obj(self, void *o) except 0:
371 cdef Ecore_X_Event_Screen_Change *obj
372 obj = <Ecore_X_Event_Screen_Change *>o
373 self.win = Window_from_xid(obj.win)
374 self.root = Window_from_xid(obj.root)
375
376 mmsize = (obj.size.width, obj.size.height,
377 obj.size.width_mm, obj.size.height_mm)
378
379 self.size = mmsize
380 self.time = obj.time
381 self.config_time = obj.config_time
382 self.orientation = obj.orientation
383 self.subpixel_order = obj.subpixel_order
384 self.size_id = obj.size_id
385 return 1
386
387
388cdef class EventWindowDeleteRequest(Event):
389 cdef int _set_obj(self, void *o) except 0:
390 cdef Ecore_X_Event_Window_Delete_Request *obj
391 obj = <Ecore_X_Event_Window_Delete_Request *>o
392 self.win = Window_from_xid(obj.win)
393 self.time = obj.time
394 return 1
395
396
397cdef class EventWindowMoveResizeRequest(Event):
398 cdef int _set_obj(self, void *o) except 0:
399 cdef Ecore_X_Event_Window_Move_Resize_Request *obj
400 obj = <Ecore_X_Event_Window_Move_Resize_Request *>o
401 self.win = Window_from_xid(obj.win)
402 self.x = obj.x
403 self.y = obj.y
404 self.button = obj.button
405 self.source = obj.source
406 return 1
407
408
409cdef class _Events:
410 property KEY_DOWN:
411 def __get__(self):
412 return ECORE_EVENT_KEY_DOWN
413
414 property KEY_UP:
415 def __get__(self):
416 return ECORE_EVENT_KEY_UP
417
418 property MOUSE_BUTTON_DOWN:
419 def __get__(self):
420 return ECORE_EVENT_MOUSE_BUTTON_DOWN
421
422 property MOUSE_BUTTON_UP:
423 def __get__(self):
424 return ECORE_EVENT_MOUSE_BUTTON_UP
425
426 property MOUSE_MOVE:
427 def __get__(self):
428 return ECORE_EVENT_MOUSE_MOVE
429
430 property MOUSE_IN:
431 def __get__(self):
432 return ECORE_EVENT_MOUSE_IN
433
434 property MOUSE_OUT:
435 def __get__(self):
436 return ECORE_EVENT_MOUSE_OUT
437
438 property MOUSE_WHEEL:
439 def __get__(self):
440 return ECORE_EVENT_MOUSE_WHEEL
441
442 property WINDOW_FOCUS_IN:
443 def __get__(self):
444 return ECORE_X_EVENT_WINDOW_FOCUS_IN
445
446 property WINDOW_FOCUS_OUT:
447 def __get__(self):
448 return ECORE_X_EVENT_WINDOW_FOCUS_OUT
449
450 property WINDOW_KEYMAP:
451 def __get__(self):
452 return ECORE_X_EVENT_WINDOW_KEYMAP
453
454 property WINDOW_DAMAGE:
455 def __get__(self):
456 return ECORE_X_EVENT_WINDOW_DAMAGE
457
458 property WINDOW_VISIBILITY_CHANGE:
459 def __get__(self):
460 return ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE
461
462 property WINDOW_CREATE:
463 def __get__(self):
464 return ECORE_X_EVENT_WINDOW_CREATE
465
466 property WINDOW_DESTROY:
467 def __get__(self):
468 return ECORE_X_EVENT_WINDOW_DESTROY
469
470 property WINDOW_HIDE:
471 def __get__(self):
472 return ECORE_X_EVENT_WINDOW_HIDE
473
474 property WINDOW_SHOW:
475 def __get__(self):
476 return ECORE_X_EVENT_WINDOW_SHOW
477
478 property WINDOW_SHOW_REQUEST:
479 def __get__(self):
480 return ECORE_X_EVENT_WINDOW_SHOW_REQUEST
481
482 property WINDOW_REPARENT:
483 def __get__(self):
484 return ECORE_X_EVENT_WINDOW_REPARENT
485
486 property WINDOW_CONFIGURE:
487 def __get__(self):
488 return ECORE_X_EVENT_WINDOW_CONFIGURE
489
490 property WINDOW_CONFIGURE_REQUEST:
491 def __get__(self):
492 return ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST
493
494 property WINDOW_GRAVITY:
495 def __get__(self):
496 return ECORE_X_EVENT_WINDOW_GRAVITY
497
498 property WINDOW_RESIZE_REQUEST:
499 def __get__(self):
500 return ECORE_X_EVENT_WINDOW_RESIZE_REQUEST
501
502 property WINDOW_STACK:
503 def __get__(self):
504 return ECORE_X_EVENT_WINDOW_STACK
505
506 property WINDOW_STACK_REQUEST:
507 def __get__(self):
508 return ECORE_X_EVENT_WINDOW_STACK_REQUEST
509
510 property WINDOW_PROPERTY:
511 def __get__(self):
512 return ECORE_X_EVENT_WINDOW_PROPERTY
513
514 property WINDOW_COLORMAP:
515 def __get__(self):
516 return ECORE_X_EVENT_WINDOW_COLORMAP
517
518 property WINDOW_MAPPING:
519 def __get__(self):
520 return ECORE_X_EVENT_WINDOW_MAPPING
521
522 property SELECTION_CLEAR:
523 def __get__(self):
524 return ECORE_X_EVENT_SELECTION_CLEAR
525
526 property SELECTION_REQUEST:
527 def __get__(self):
528 return ECORE_X_EVENT_SELECTION_REQUEST
529
530 property SELECTION_NOTIFY:
531 def __get__(self):
532 return ECORE_X_EVENT_SELECTION_NOTIFY
533
534 property CLIENT_MESSAGE:
535 def __get__(self):
536 return ECORE_X_EVENT_CLIENT_MESSAGE
537
538 property WINDOW_SHAPE:
539 def __get__(self):
540 return ECORE_X_EVENT_WINDOW_SHAPE
541
542 property SCREENSAVER_NOTIFY:
543 def __get__(self):
544 return ECORE_X_EVENT_SCREENSAVER_NOTIFY
545
546 property SYNC_COUNTER:
547 def __get__(self):
548 return ECORE_X_EVENT_SYNC_COUNTER
549
550 property SYNC_ALARM:
551 def __get__(self):
552 return ECORE_X_EVENT_SYNC_ALARM
553
554 property SCREEN_CHANGE:
555 def __get__(self):
556 return ECORE_X_EVENT_SCREEN_CHANGE
557
558 property DAMAGE_NOTIFY:
559 def __get__(self):
560 return ECORE_X_EVENT_DAMAGE_NOTIFY
561
562 property WINDOW_DELETE_REQUEST:
563 def __get__(self):
564 return ECORE_X_EVENT_WINDOW_DELETE_REQUEST
565
566 property WINDOW_MOVE_RESIZE_REQUEST:
567 def __get__(self):
568 return ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST
569
570 property WINDOW_STATE_REQUEST:
571 def __get__(self):
572 return ECORE_X_EVENT_WINDOW_STATE_REQUEST
573
574 property FRAME_EXTENTS_REQUEST:
575 def __get__(self):
576 return ECORE_X_EVENT_FRAME_EXTENTS_REQUEST
577
578 property PING:
579 def __get__(self):
580 return ECORE_X_EVENT_PING
581
582 property DESKTOP_CHANGE:
583 def __get__(self):
584 return ECORE_X_EVENT_DESKTOP_CHANGE
585
586 property STARTUP_SEQUENCE_NEW:
587 def __get__(self):
588 return ECORE_X_EVENT_STARTUP_SEQUENCE_NEW
589
590 property STARTUP_SEQUENCE_CHANGE:
591 def __get__(self):
592 return ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE
593
594 property STARTUP_SEQUENCE_REMOVE:
595 def __get__(self):
596 return ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE
597
598Events = _Events()
599
600
601cdef int _x_events_registered = 0
602from efl.ecore cimport _event_mapping_register as reg
603
604# Just call after ecore_x_init() is done, otherwise all event type will be 0.
605cdef int x_events_register() except 0:
606 global _x_events_registered
607 if _x_events_registered != 0:
608 return 1
609 _x_events_registered = 1
610
611 reg(ECORE_EVENT_KEY_DOWN, EventKey)
612 reg(ECORE_EVENT_KEY_UP, EventKey)
613 reg(ECORE_EVENT_MOUSE_BUTTON_DOWN, EventMouseButton)
614 reg(ECORE_EVENT_MOUSE_BUTTON_UP, EventMouseButton)
615 reg(ECORE_EVENT_MOUSE_MOVE, EventMouseMove)
616 reg(ECORE_EVENT_MOUSE_IN, EventMouseIO)
617 reg(ECORE_EVENT_MOUSE_OUT, EventMouseIO)
618 reg(ECORE_EVENT_MOUSE_WHEEL, EventMouseWheel)
619 reg(ECORE_X_EVENT_WINDOW_FOCUS_IN, EventWindowFocusIn)
620 reg(ECORE_X_EVENT_WINDOW_FOCUS_OUT, EventWindowFocusOut)
621 reg(ECORE_X_EVENT_WINDOW_KEYMAP, EventWindowKeymap)
622 reg(ECORE_X_EVENT_WINDOW_DAMAGE, EventWindowDamage)
623 reg(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, EventWindowVisibilityChange)
624 reg(ECORE_X_EVENT_WINDOW_CREATE, EventWindowCreate)
625 reg(ECORE_X_EVENT_WINDOW_DESTROY, EventWindowDestroy)
626 reg(ECORE_X_EVENT_WINDOW_HIDE, EventWindowHide)
627 reg(ECORE_X_EVENT_WINDOW_SHOW, EventWindowShow)
628 reg(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, EventWindowShowRequest)
629 reg(ECORE_X_EVENT_WINDOW_REPARENT, EventWindowReparent)
630 reg(ECORE_X_EVENT_WINDOW_CONFIGURE, EventWindowConfigure)
631 reg(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, EventWindowConfigureRequest)
632 reg(ECORE_X_EVENT_WINDOW_GRAVITY, EventWindowGravity)
633 reg(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, EventWindowResizeRequest)
634 reg(ECORE_X_EVENT_WINDOW_STACK, EventWindowStack)
635 reg(ECORE_X_EVENT_WINDOW_STACK_REQUEST, EventWindowStackRequest)
636## reg(ECORE_X_EVENT_WINDOW_PROPERTY, EventWindowProperty) # TODO
637## reg(ECORE_X_EVENT_WINDOW_COLORMAP, EventWindowColormap) # TODO
638## reg(ECORE_X_EVENT_WINDOW_MAPPING, EventWindowMapping) # ?
639## reg(ECORE_X_EVENT_SELECTION_CLEAR, EventSelectionClear) # TODO
640## reg(ECORE_X_EVENT_SELECTION_REQUEST, EventSelectionRequest) # TODO
641## reg(ECORE_X_EVENT_SELECTION_NOTIFY, EventSelectionNotify) # TODO
642## reg(ECORE_X_EVENT_CLIENT_MESSAGE, EventClientMessage)
643 reg(ECORE_X_EVENT_WINDOW_SHAPE, EventWindowShape)
644 reg(ECORE_X_EVENT_SCREENSAVER_NOTIFY, EventScreensaverNotify)
645 reg(ECORE_X_EVENT_SYNC_COUNTER, EventSyncCounter)
646 reg(ECORE_X_EVENT_SYNC_ALARM, EventSyncAlarm)
647 reg(ECORE_X_EVENT_SCREEN_CHANGE, EventScreenChange)
648## reg(ECORE_X_EVENT_DAMAGE_NOTIFY, EventDamage)
649 reg(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, EventWindowDeleteRequest)
650 reg(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST, EventWindowMoveResizeRequest)
651 reg(ECORE_X_EVENT_WINDOW_STATE_REQUEST, EventWindowStateRequest)
652 reg(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST, EventFrameExtentsRequest)
653 reg(ECORE_X_EVENT_PING, EventPing)
654 reg(ECORE_X_EVENT_DESKTOP_CHANGE, EventDesktopChange)
655## reg(ECORE_X_EVENT_STARTUP_SEQUENCE_NEW, EventSTartupSequenceNew) #?
656## reg(ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE, EventStartupSequenceChange) #?
657## reg(ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE, EventStartupSequenceRemove) #?
658
659 return 1
660
661
662def on_key_down_add(func, *args, **kargs):
663 """Creates an ecore event handler for ECORE_EVENT_KEY_DOWN.
664
665 :see: :py:class:`efl.ecore.EventHandler`
666 """
667 return EventHandler(ECORE_EVENT_KEY_DOWN,
668 func, *args, **kargs)
669
670def on_key_up_add(func, *args, **kargs):
671 """Creates an ecore event handler for ECORE_EVENT_KEY_UP.
672
673 :see: :py:class:`efl.ecore.EventHandler`
674 """
675 return EventHandler(ECORE_EVENT_KEY_UP,
676 func, *args, **kargs)
677
678
679def on_mouse_button_down_add(func, *args, **kargs):
680 """Creates an ecore event handler for ECORE_EVENT_MOUSE_BUTTON_DOWN.
681
682 :see: :py:class:`efl.ecore.EventHandler`
683 """
684 return EventHandler(ECORE_EVENT_MOUSE_BUTTON_DOWN,
685 func, *args, **kargs)
686
687def on_mouse_button_up_add(func, *args, **kargs):
688 """Create an ecore event handler for ECORE_EVENT_MOUSE_BUTTON_UP.
689
690 :see: :py:class:`efl.ecore.EventHandler`
691 """
692 return EventHandler(ECORE_EVENT_MOUSE_BUTTON_UP,
693 func, *args, **kargs)
694
695def on_mouse_move_add(func, *args, **kargs):
696 """Create an ecore event handler for ECORE_EVENT_MOUSE_MOVE.
697
698 :see: :py:class:`efl.ecore.EventHandler`
699 """
700 return EventHandler(ECORE_EVENT_MOUSE_MOVE,
701 func, *args, **kargs)
702
703def on_mouse_in_add(func, *args, **kargs):
704 """Create an ecore event handler for ECORE_EVENT_MOUSE_IN.
705
706 :see: :py:class:`efl.ecore.EventHandler`
707 """
708 return EventHandler(ECORE_EVENT_MOUSE_IN,
709 func, *args, **kargs)
710
711def on_mouse_out_add(func, *args, **kargs):
712 """Create an ecore event handler for ECORE_EVENT_MOUSE_OUT.
713
714 :see: :py:class:`efl.ecore.EventHandler`
715 """
716 return EventHandler(ECORE_EVENT_MOUSE_OUT,
717 func, *args, **kargs)
718
719def on_mouse_wheel_add(func, *args, **kargs):
720 """Create an ecore event handler for ECORE_EVENT_MOUSE_WHEEL.
721
722 :see: :py:class:`efl.ecore.EventHandler`
723 """
724 return EventHandler(ECORE_EVENT_MOUSE_WHEEL,
725 func, *args, **kargs)
726
727def on_window_focus_in_add(func, *args, **kargs):
728 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_FOCUS_IN.
729
730 :see: :py:class:`efl.ecore.EventHandler`
731 """
732 return EventHandler(ECORE_X_EVENT_WINDOW_FOCUS_IN,
733 func, *args, **kargs)
734
735def on_window_focus_out_add(func, *args, **kargs):
736 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_FOCUS_OUT.
737
738 :see: :py:class:`efl.ecore.EventHandler`
739 """
740 return EventHandler(ECORE_X_EVENT_WINDOW_FOCUS_OUT,
741 func, *args, **kargs)
742
743def on_window_keymap_add(func, *args, **kargs):
744 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_KEYMAP.
745
746 :see: :py:class:`efl.ecore.EventHandler`
747 """
748 return EventHandler(ECORE_X_EVENT_WINDOW_KEYMAP,
749 func, *args, **kargs)
750
751def on_window_damage_add(func, *args, **kargs):
752 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_DAMAGE.
753
754 :see: :py:class:`efl.ecore.EventHandler`
755 """
756 return EventHandler(ECORE_X_EVENT_WINDOW_DAMAGE,
757 func, *args, **kargs)
758
759def on_window_visibility_change_add(func, *args, **kargs):
760 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE.
761
762 :see: :py:class:`efl.ecore.EventHandler`
763 """
764 return EventHandler(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE,
765 func, *args, **kargs)
766
767def on_window_create_add(func, *args, **kargs):
768 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_CREATE.
769
770 :see: :py:class:`efl.ecore.EventHandler`
771 """
772 return EventHandler(ECORE_X_EVENT_WINDOW_CREATE,
773 func, *args, **kargs)
774
775def on_window_destroy_add(func, *args, **kargs):
776 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_DESTROY.
777
778 :see: :py:class:`efl.ecore.EventHandler`
779 """
780 return EventHandler(ECORE_X_EVENT_WINDOW_DESTROY,
781 func, *args, **kargs)
782
783def on_window_hide_add(func, *args, **kargs):
784 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_HIDE.
785
786 :see: :py:class:`efl.ecore.EventHandler`
787 """
788 return EventHandler(ECORE_X_EVENT_WINDOW_HIDE,
789 func, *args, **kargs)
790
791def on_window_show_add(func, *args, **kargs):
792 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_SHOW.
793
794 :see: :py:class:`efl.ecore.EventHandler`
795 """
796 return EventHandler(ECORE_X_EVENT_WINDOW_SHOW,
797 func, *args, **kargs)
798
799def on_window_show_request_add(func, *args, **kargs):
800 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_SHOW_REQUEST.
801
802 :see: :py:class:`efl.ecore.EventHandler`
803 """
804 return EventHandler(ECORE_X_EVENT_WINDOW_SHOW_REQUEST,
805 func, *args, **kargs)
806
807def on_window_reparent_add(func, *args, **kargs):
808 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_REPARENT.
809
810 :see: :py:class:`efl.ecore.EventHandler`
811 """
812 return EventHandler(ECORE_X_EVENT_WINDOW_REPARENT,
813 func, *args, **kargs)
814
815def on_window_configure_add(func, *args, **kargs):
816 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_CONFIGURE.
817
818 :see: :py:class:`efl.ecore.EventHandler`
819 """
820 return EventHandler(ECORE_X_EVENT_WINDOW_CONFIGURE,
821 func, *args, **kargs)
822
823def on_window_configure_request_add(func, *args, **kargs):
824 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST.
825
826 :see: :py:class:`efl.ecore.EventHandler`
827 """
828 return EventHandler(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST,
829 func, *args, **kargs)
830
831def on_window_gravity_add(func, *args, **kargs):
832 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_GRAVITY.
833
834 :see: :py:class:`efl.ecore.EventHandler`
835 """
836 return EventHandler(ECORE_X_EVENT_WINDOW_GRAVITY,
837 func, *args, **kargs)
838
839def on_window_resize_request_add(func, *args, **kargs):
840 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_RESIZE_REQUEST.
841
842 :see: :py:class:`efl.ecore.EventHandler`
843 """
844 return EventHandler(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST,
845 func, *args, **kargs)
846
847def on_window_stack_add(func, *args, **kargs):
848 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_STACK.
849
850 :see: :py:class:`efl.ecore.EventHandler`
851 """
852 return EventHandler(ECORE_X_EVENT_WINDOW_STACK,
853 func, *args, **kargs)
854
855def on_window_stack_request_add(func, *args, **kargs):
856 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_STACK_REQUEST.
857
858 :see: :py:class:`efl.ecore.EventHandler`
859 """
860 return EventHandler(ECORE_X_EVENT_WINDOW_STACK_REQUEST,
861 func, *args, **kargs)
862
863## def on_window_property_add(func, *args, **kargs):
864## """Create an ecore event handler for ECORE_X_EVENT_WINDOW_PROPERTY.
865
866## :see: :py:class:`efl.ecore.EventHandler`
867## """
868## return EventHandler(ECORE_X_EVENT_WINDOW_PROPERTY,
869## func, *args, **kargs)
870
871## def on_window_colormap_add(func, *args, **kargs):
872## """Create an ecore event handler for ECORE_X_EVENT_WINDOW_COLORMAP.
873
874## :see: :py:class:`efl.ecore.EventHandler`
875## """
876## return EventHandler(ECORE_X_EVENT_WINDOW_COLORMAP,
877## func, *args, **kargs)
878
879## def on_window_mapping_add(func, *args, **kargs):
880## """Create an ecore event handler for ECORE_X_EVENT_WINDOW_MAPPING.
881
882## :see: :py:class:`efl.ecore.EventHandler`
883## """
884## return EventHandler(ECORE_X_EVENT_WINDOW_MAPPING,
885## func, *args, **kargs)
886
887## def on_selection_clear_add(func, *args, **kargs):
888## """Create an ecore event handler for ECORE_X_EVENT_SELECTION_CLEAR.
889
890## :see: :py:class:`efl.ecore.EventHandler`
891## """
892## return EventHandler(ECORE_X_EVENT_SELECTION_CLEAR,
893## func, *args, **kargs)
894
895## def on_selection_request_add(func, *args, **kargs):
896## """Create an ecore event handler for ECORE_X_EVENT_SELECTION_REQUEST.
897
898## :see: :py:class:`efl.ecore.EventHandler`
899## """
900## return EventHandler(ECORE_X_EVENT_SELECTION_REQUEST,
901## func, *args, **kargs)
902
903## def on_selection_notify_add(func, *args, **kargs):
904## """Create an ecore event handler for ECORE_X_EVENT_SELECTION_NOTIFY.
905
906## :see: :py:class:`efl.ecore.EventHandler`
907## """
908## return EventHandler(ECORE_X_EVENT_SELECTION_NOTIFY,
909## func, *args, **kargs)
910
911## def on_client_message_add(func, *args, **kargs):
912## """Create an ecore event handler for ECORE_X_EVENT_CLIENT_MESSAGE.
913
914## :see: :py:class:`efl.ecore.EventHandler`
915## """
916## return EventHandler(ECORE_X_EVENT_CLIENT_MESSAGE,
917## func, *args, **kargs)
918
919def on_window_shape_add(func, *args, **kargs):
920 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_SHAPE.
921
922 :see: :py:class:`efl.ecore.EventHandler`
923 """
924 return EventHandler(ECORE_X_EVENT_WINDOW_SHAPE,
925 func, *args, **kargs)
926
927def on_screensaver_notify_add(func, *args, **kargs):
928 """Create an ecore event handler for ECORE_X_EVENT_SCREENSAVER_NOTIFY.
929
930 :see: :py:class:`efl.ecore.EventHandler`
931 """
932 return EventHandler(ECORE_X_EVENT_SCREENSAVER_NOTIFY,
933 func, *args, **kargs)
934
935def on_sync_counter_add(func, *args, **kargs):
936 """Create an ecore event handler for ECORE_X_EVENT_SYNC_COUNTER.
937
938 :see: :py:class:`efl.ecore.EventHandler`
939 """
940 return EventHandler(ECORE_X_EVENT_SYNC_COUNTER,
941 func, *args, **kargs)
942
943def on_sync_alarm_add(func, *args, **kargs):
944 """Create an ecore event handler for ECORE_X_EVENT_SYNC_ALARM.
945
946 :see: :py:class:`efl.ecore.EventHandler`
947 """
948 return EventHandler(ECORE_X_EVENT_SYNC_ALARM,
949 func, *args, **kargs)
950
951def on_screen_change_add(func, *args, **kargs):
952 """Create an ecore event handler for ECORE_X_EVENT_SCREEN_CHANGE.
953
954 :see: :py:class:`efl.ecore.EventHandler`
955 """
956 return EventHandler(ECORE_X_EVENT_SCREEN_CHANGE,
957 func, *args, **kargs)
958
959## def on_damage_notify_add(func, *args, **kargs):
960## """Create an ecore event handler for ECORE_X_EVENT_DAMAGE_NOTIFY.
961
962## :see: :py:class:`efl.ecore.EventHandler`
963## """
964## return EventHandler(ECORE_X_EVENT_DAMAGE_NOTIFY,
965## func, *args, **kargs)
966
967def on_window_delete_request_add(func, *args, **kargs):
968 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_DELETE_REQUEST.
969
970 :see: :py:class:`efl.ecore.EventHandler`
971 """
972 return EventHandler(ECORE_X_EVENT_WINDOW_DELETE_REQUEST,
973 func, *args, **kargs)
974
975def on_window_move_resize_request_add(func, *args, **kargs):
976 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST.
977
978 :see: :py:class:`efl.ecore.EventHandler`
979 """
980 return EventHandler(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST,
981 func, *args, **kargs)
982
983def on_window_state_request_add(func, *args, **kargs):
984 """Create an ecore event handler for ECORE_X_EVENT_WINDOW_STATE_REQUEST.
985
986 :see: :py:class:`efl.ecore.EventHandler`
987 """
988 return EventHandler(ECORE_X_EVENT_WINDOW_STATE_REQUEST,
989 func, *args, **kargs)
990
991def on_frame_extents_request_add(func, *args, **kargs):
992 """Create an ecore event handler for ECORE_X_EVENT_FRAME_EXTENTS_REQUEST.
993
994 :see: :py:class:`efl.ecore.EventHandler`
995 """
996 return EventHandler(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST,
997 func, *args, **kargs)
998
999def on_ping_add(func, *args, **kargs):
1000 """Create an ecore event handler for ECORE_X_EVENT_PING.
1001
1002 :see: :py:class:`efl.ecore.EventHandler`
1003 """
1004 return EventHandler(ECORE_X_EVENT_PING,
1005 func, *args, **kargs)
1006
1007def on_desktop_change_add(func, *args, **kargs):
1008 """Create an ecore event handler for ECORE_X_EVENT_DESKTOP_CHANGE.
1009
1010 :see: :py:class:`efl.ecore.EventHandler`
1011 """
1012 return EventHandler(ECORE_X_EVENT_DESKTOP_CHANGE,
1013 func, *args, **kargs)
1014
1015## def on_startup_sequence_new_add(func, *args, **kargs):
1016## """Create an ecore event handler for ECORE_X_EVENT_STARTUP_SEQUENCE_NEW.
1017
1018## :see: :py:class:`efl.ecore.EventHandler`
1019## """
1020## return EventHandler(ECORE_X_EVENT_STARTUP_SEQUENCE_NEW,
1021## func, *args, **kargs)
1022
1023## def on_startup_sequence_change_add(func, *args, **kargs):
1024## """Create an ecore event handler for ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE.
1025
1026## :see: :py:class:`efl.ecore.EventHandler`
1027## """
1028## return EventHandler(ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE,
1029## func, *args, **kargs)
1030
1031## def on_startup_sequence_remove_add(func, *args, **kargs):
1032## """Create an ecore event handler for ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE.
1033
1034## :see: :py:class:`efl.ecore.EventHandler`
1035## """
1036## return EventHandler(ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE,
1037## func, *args, **kargs)
1038
diff --git a/efl/ecore/x_window.pxi b/efl/ecore/x_window.pxi
new file mode 100644
index 0000000..dd6cda9
--- /dev/null
+++ b/efl/ecore/x_window.pxi
@@ -0,0 +1,463 @@
1# Copyright (C) 2007-2014 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
454def Window_from_xid(unsigned long xid):
455 """Create a Python wrapper for given window id.
456
457 :param xid: window id.
458 :rtype: L{Window}
459 """
460 cdef Window w
461 w = Window.__new__(Window)
462 w._set_xid(xid)
463 return w
diff --git a/examples/ecore/x/mplayer_embed.py b/examples/ecore/x/mplayer_embed.py
new file mode 100644
index 0000000..079ded0
--- /dev/null
+++ b/examples/ecore/x/mplayer_embed.py
@@ -0,0 +1,44 @@
1#!/usr/bin/env python
2
3import sys
4import efl.ecore
5from efl.ecore.x import init, Window, on_window_configure_add
6from subprocess import Popen, PIPE
7
8init()
9
10try:
11 filename = sys.argv[1]
12except IndexError, e:
13 raise SystemExit("Usage: %s <filename>" % sys.argv[0])
14
15main_window = Window(w=800, h=600)
16main_window.background_color_set(0xffff, 0, 0)
17main_window.show()
18
19sub_window = Window(main_window, 10, 10, 780, 580)
20sub_window.background_color_set(0, 0, 0xffff)
21sub_window.show()
22
23cmd = ["/usr/bin/mplayer", "-slave", "-nomouseinput", "-quiet",
24 "-wid", str(sub_window.xid), filename]
25p = Popen(cmd, stdin=PIPE, stdout=PIPE, close_fds=True)
26
27
28def handle_read(fd_handler, file):
29 line = file.read(1)
30 r = bool(line and not fd_handler.has_error())
31 if not r:
32 efl.ecore.main_loop_quit()
33 return r
34
35
36def on_configure(event, main_window, sub_window):
37 if event.win == main_window:
38 sub_window.resize(event.w - 20, event.h - 20)
39 return True
40on_window_configure_add(on_configure, main_window, sub_window)
41
42efl.ecore.fd_handler_add(
43 p.stdout, efl.ecore.ECORE_FD_ALL, handle_read, p.stdout)
44efl.ecore.main_loop_begin()
diff --git a/examples/ecore/x/window_creation.py b/examples/ecore/x/window_creation.py
new file mode 100644
index 0000000..61c455a
--- /dev/null
+++ b/examples/ecore/x/window_creation.py
@@ -0,0 +1,43 @@
1#!/usr/bin/env python
2
3import efl.ecore
4from efl.ecore.x import init, Window, on_window_configure_add
5
6init()
7
8# method 1
9main_window = Window(w=800, h=600)
10main_window.background_color_set(0xffff, 0, 0)
11main_window.show()
12
13sub_window = Window(main_window, 10, 10, 780, 580)
14sub_window.background_color_set(0, 0, 0xffff)
15sub_window.show()
16
17
18def cb_on_configure(event, main_window, sub_window):
19 if event.win == main_window:
20 sub_window.resize(event.w - 20, event.h - 20)
21 return True
22on_window_configure_add(cb_on_configure, main_window, sub_window)
23
24
25# method 2: inheritance
26class MyWindow(Window):
27 def __init__(self, w, h):
28 Window.__init__(self, w=w, h=h)
29 self.background_color_set(0xffff, 0, 0)
30 self.sub_window = Window(self, 10, 10, w - 20, h - 20)
31 self.sub_window.background_color_set(0, 0, 0xffff)
32 self.sub_window.show()
33 on_window_configure_add(self._cb_on_configure)
34
35 def _cb_on_configure(self, event):
36 if event.win == self:
37 self.sub_window.resize(event.w - 20, event.h - 20)
38 return True
39
40other_window = MyWindow(400, 300)
41other_window.show()
42
43efl.ecore.main_loop_begin()
diff --git a/setup.py b/setup.py
index 090070b..73b12f9 100755
--- a/setup.py
+++ b/setup.py
@@ -232,13 +232,32 @@ if set(("build", "build_ext", "install", "bdist", "sdist")) & set(sys.argv):
232 ecore_cflags, ecore_libs = pkg_config('Ecore', 'ecore', EFL_MIN_VERSION) 232 ecore_cflags, ecore_libs = pkg_config('Ecore', 'ecore', EFL_MIN_VERSION)
233 ecore_file_cflags, ecore_file_libs = pkg_config( 233 ecore_file_cflags, ecore_file_libs = pkg_config(
234 'EcoreFile', 'ecore-file', EFL_MIN_VERSION) 234 'EcoreFile', 'ecore-file', EFL_MIN_VERSION)
235 ecore_ext = Extension( 235 ecore_input_cflags, ecore_input_libs = pkg_config(
236 "ecore.__init__", ["efl/ecore/__init__" + module_suffix], 236 'EcoreInput', 'ecore-input', EFL_MIN_VERSION)
237 include_dirs=['include/'], 237 ecore_x_cflags, ecore_x_libs = pkg_config(
238 extra_compile_args=list(set(ecore_cflags + ecore_file_cflags)), 238 'EcoreX', 'ecore-x', EFL_MIN_VERSION)
239 extra_link_args=ecore_libs + ecore_file_libs + eina_libs + evas_libs, 239 ecore_exts = (
240 ) 240 Extension(
241 modules.append(ecore_ext) 241 "ecore.__init__", ["efl/ecore/__init__" + module_suffix],
242 include_dirs=['include/'],
243 extra_compile_args=list(set(ecore_cflags + ecore_file_cflags)),
244 extra_link_args=ecore_libs + ecore_file_libs + eina_libs +
245 evas_libs
246 ),
247 Extension(
248 "ecore.x", ["efl/ecore/x" + module_suffix],
249 include_dirs=['include/'],
250 extra_compile_args=
251 list(set(
252 ecore_cflags + ecore_file_cflags + ecore_x_cflags +
253 ecore_input_cflags
254 )),
255 extra_link_args=
256 ecore_libs + ecore_file_libs + ecore_x_libs + ecore_input_libs +
257 eina_libs + evas_libs,
258 )
259 )
260 modules += ecore_exts
242 packages.append("efl.ecore") 261 packages.append("efl.ecore")
243 262
244 # compatibility 263 # compatibility