libx11 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -5
- data/.travis.yml +1 -1
- data/Rakefile +1 -9
- data/example/aliases.rb +2 -0
- data/example/create_window.rb +15 -13
- data/example/window_manager.rb +30 -22
- data/lib/libx11.rb +4 -2
- data/lib/libx11/keysymdef.rb +2272 -0
- data/lib/libx11/version.rb +1 -1
- data/lib/libx11/x.rb +148 -0
- data/lib/libx11/xlib.rb +42 -0
- data/lib/libx11/xlib/display.rb +52 -0
- data/lib/libx11/xlib/xany_event.rb +13 -0
- data/lib/libx11/xlib/xbutton_event.rb +23 -0
- data/lib/libx11/xlib/xcirculate_event.rb +15 -0
- data/lib/libx11/xlib/xcirculate_request_event.rb +15 -0
- data/lib/libx11/xlib/xclient_message_event.rb +24 -0
- data/lib/libx11/xlib/xcolormap_event.rb +16 -0
- data/lib/libx11/xlib/xconfigure_event.rb +21 -0
- data/lib/libx11/xlib/xconfigure_request_event.rb +22 -0
- data/lib/libx11/xlib/xcreate_window_event.rb +20 -0
- data/lib/libx11/xlib/xcrossing_event.rb +25 -0
- data/lib/libx11/xlib/xdestroy_window_event.rb +14 -0
- data/lib/libx11/xlib/xerror_event.rb +15 -0
- data/lib/libx11/xlib/xevent.rb +77 -0
- data/lib/libx11/xlib/xexpose_event.rb +18 -0
- data/lib/libx11/xlib/xfocus_change_event.rb +15 -0
- data/lib/libx11/xlib/xgeneric_event.rb +14 -0
- data/lib/libx11/xlib/xgeneric_event_cookie.rb +16 -0
- data/lib/libx11/xlib/xgraphics_expose_event.rb +21 -0
- data/lib/libx11/xlib/xgravity_event.rb +16 -0
- data/lib/libx11/xlib/xkey_event.rb +23 -0
- data/lib/libx11/xlib/xkeymap_event.rb +14 -0
- data/lib/libx11/xlib/xmap_event.rb +15 -0
- data/lib/libx11/xlib/xmap_request_event.rb +18 -0
- data/lib/libx11/xlib/xmapping_event.rb +16 -0
- data/lib/libx11/xlib/xmotion_event.rb +23 -0
- data/lib/libx11/xlib/xno_expose_event.rb +15 -0
- data/lib/libx11/xlib/xproperty_event.rb +16 -0
- data/lib/libx11/xlib/xreparent_event.rb +18 -0
- data/lib/libx11/xlib/xresize_request_event.rb +15 -0
- data/lib/libx11/xlib/xselection_clear_event.rb +15 -0
- data/lib/libx11/xlib/xselection_event.rb +17 -0
- data/lib/libx11/xlib/xselection_request_event.rb +18 -0
- data/lib/libx11/xlib/xunmap_event.rb +15 -0
- data/lib/libx11/xlib/xvisibility_event.rb +14 -0
- data/libx11.gemspec +1 -1
- metadata +56 -13
- data/HACKING.md +0 -14
- data/ext/libx11_ruby/constants.c +0 -182
- data/ext/libx11_ruby/display.c +0 -197
- data/ext/libx11_ruby/extconf.rb +0 -6
- data/ext/libx11_ruby/libx11_ruby.c +0 -13
- data/ext/libx11_ruby/libx11_ruby.h +0 -14
- data/ext/libx11_ruby/window.c +0 -33
- data/ext/libx11_ruby/xerror_event.c +0 -104
- data/ext/libx11_ruby/xevent.c +0 -134
@@ -0,0 +1,77 @@
|
|
1
|
+
require 'libx11/xlib/xany_event'
|
2
|
+
require 'libx11/xlib/xbutton_event'
|
3
|
+
require 'libx11/xlib/xcirculate_event'
|
4
|
+
require 'libx11/xlib/xcirculate_request_event'
|
5
|
+
require 'libx11/xlib/xclient_message_event'
|
6
|
+
require 'libx11/xlib/xcolormap_event'
|
7
|
+
require 'libx11/xlib/xconfigure_event'
|
8
|
+
require 'libx11/xlib/xconfigure_request_event'
|
9
|
+
require 'libx11/xlib/xcreate_window_event'
|
10
|
+
require 'libx11/xlib/xcrossing_event'
|
11
|
+
require 'libx11/xlib/xdestroy_window_event'
|
12
|
+
require 'libx11/xlib/xerror_event'
|
13
|
+
require 'libx11/xlib/xexpose_event'
|
14
|
+
require 'libx11/xlib/xfocus_change_event'
|
15
|
+
require 'libx11/xlib/xgeneric_event'
|
16
|
+
require 'libx11/xlib/xgeneric_event_cookie'
|
17
|
+
require 'libx11/xlib/xgraphics_expose_event'
|
18
|
+
require 'libx11/xlib/xgravity_event'
|
19
|
+
require 'libx11/xlib/xkey_event'
|
20
|
+
require 'libx11/xlib/xkeymap_event'
|
21
|
+
require 'libx11/xlib/xmap_event'
|
22
|
+
require 'libx11/xlib/xmap_request_event'
|
23
|
+
require 'libx11/xlib/xmapping_event'
|
24
|
+
require 'libx11/xlib/xmotion_event'
|
25
|
+
require 'libx11/xlib/xno_expose_event'
|
26
|
+
require 'libx11/xlib/xproperty_event'
|
27
|
+
require 'libx11/xlib/xreparent_event'
|
28
|
+
require 'libx11/xlib/xresize_request_event'
|
29
|
+
require 'libx11/xlib/xselection_clear_event'
|
30
|
+
require 'libx11/xlib/xselection_event'
|
31
|
+
require 'libx11/xlib/xselection_request_event'
|
32
|
+
require 'libx11/xlib/xunmap_event'
|
33
|
+
require 'libx11/xlib/xvisibility_event'
|
34
|
+
|
35
|
+
module LibX11
|
36
|
+
module Xlib
|
37
|
+
class XEvent < FFI::Struct
|
38
|
+
layout(
|
39
|
+
:type, :int,
|
40
|
+
:xany, XAnyEvent,
|
41
|
+
:xkey, XKeyEvent,
|
42
|
+
:xbutton, XButtonEvent,
|
43
|
+
:xmotion, XMotionEvent,
|
44
|
+
:xcrossing, XCrossingEvent,
|
45
|
+
:xfocus, XFocusChangeEvent,
|
46
|
+
:xexpose, XExposeEvent,
|
47
|
+
:xgraphicsexpose, XGraphicsExposeEvent,
|
48
|
+
:xnoexpose, XNoExposeEvent,
|
49
|
+
:xvisibility, XVisibilityEvent,
|
50
|
+
:xcreatewindow, XCreateWindowEvent,
|
51
|
+
:xdestroywindow, XDestroyWindowEvent,
|
52
|
+
:xunmap, XUnmapEvent,
|
53
|
+
:xmap, XMapEvent,
|
54
|
+
:xmaprequest, XMapRequestEvent,
|
55
|
+
:xreparent, XReparentEvent,
|
56
|
+
:xconfigure, XConfigureEvent,
|
57
|
+
:xgravity, XGravityEvent,
|
58
|
+
:xresizerequest, XResizeRequestEvent,
|
59
|
+
:xconfigurerequest, XConfigureRequestEvent,
|
60
|
+
:xcirculate, XCirculateEvent,
|
61
|
+
:xcirculaterequest, XCirculateRequestEvent,
|
62
|
+
:xproperty, XPropertyEvent,
|
63
|
+
:xselectionclear, XSelectionClearEvent,
|
64
|
+
:xselectionrequest, XSelectionRequestEvent,
|
65
|
+
:xselection, XSelectionEvent,
|
66
|
+
:xcolormap, XColormapEvent,
|
67
|
+
:xclient, XClientMessageEvent,
|
68
|
+
:xmapping, XMappingEvent,
|
69
|
+
:xerror, XErrorEvent,
|
70
|
+
:xkeymap, XKeymapEvent,
|
71
|
+
:xgeneric, XGenericEvent,
|
72
|
+
:xcookie, XGenericEventCookie,
|
73
|
+
:pad, [:long, 24],
|
74
|
+
)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XExposeEvent < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:window, :Window,
|
10
|
+
:x, :int,
|
11
|
+
:y, :int,
|
12
|
+
:width, :int,
|
13
|
+
:height, :int,
|
14
|
+
:count, :int,
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XGenericEventCookie < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:extension, :int,
|
10
|
+
:evtype, :int,
|
11
|
+
:cookie, :uint,
|
12
|
+
:data, :pointer,
|
13
|
+
)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XGraphicsExposeEvent < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:window, :Window,
|
10
|
+
:drawable, :Drawable,
|
11
|
+
:x, :int,
|
12
|
+
:y, :int,
|
13
|
+
:width, :int,
|
14
|
+
:height, :int,
|
15
|
+
:count, :int,
|
16
|
+
:major_code, :int,
|
17
|
+
:minor_code, :int,
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XKeyEvent < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:window, :Window,
|
10
|
+
:root, :Window,
|
11
|
+
:subwindow, :Window,
|
12
|
+
:time, :Time,
|
13
|
+
:x, :int,
|
14
|
+
:y, :int,
|
15
|
+
:x_root, :int,
|
16
|
+
:y_root, :int,
|
17
|
+
:state, :uint,
|
18
|
+
:keycode, :uint,
|
19
|
+
:same_screen, :Bool,
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XMapRequestEvent < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:event, :Window,
|
10
|
+
:window, :Window,
|
11
|
+
:parent, :Window,
|
12
|
+
:x, :int,
|
13
|
+
:y, :int,
|
14
|
+
:override_redirect, :Bool,
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XMappingEvent < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:window, :Window,
|
10
|
+
:request, :int,
|
11
|
+
:first_keycode, :int,
|
12
|
+
:count, :int,
|
13
|
+
)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XMotionEvent < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:window, :Window,
|
10
|
+
:root, :Window,
|
11
|
+
:subwindow, :Window,
|
12
|
+
:time, :Time,
|
13
|
+
:x, :int,
|
14
|
+
:y, :int,
|
15
|
+
:x_root, :int,
|
16
|
+
:y_root, :int,
|
17
|
+
:state, :uint,
|
18
|
+
:is_hint, :char,
|
19
|
+
:same_screen, :Bool,
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XPropertyEvent < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:window, :Window,
|
10
|
+
:atom, :Atom,
|
11
|
+
:time, :Time,
|
12
|
+
:state, :int,
|
13
|
+
)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XReparentEvent < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:event, :Window,
|
10
|
+
:window, :Window,
|
11
|
+
:parent, :Window,
|
12
|
+
:x, :int,
|
13
|
+
:y, :int,
|
14
|
+
:override_redirect, :Bool,
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module LibX11
|
2
|
+
module Xlib
|
3
|
+
class XSelectionEvent < FFI::Struct
|
4
|
+
layout(
|
5
|
+
:type, :int,
|
6
|
+
:serial, :ulong,
|
7
|
+
:send_event, :Bool,
|
8
|
+
:display, Display.ptr,
|
9
|
+
:requestor, :Window,
|
10
|
+
:selection, :Atom,
|
11
|
+
:target, :Atom,
|
12
|
+
:property, :Atom,
|
13
|
+
:time, :Time,
|
14
|
+
)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|