gdk3 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +18 -4
  3. data/lib/gdk3/atom.rb +26 -0
  4. data/lib/gdk3/cairo.rb +60 -0
  5. data/lib/gdk3/color.rb +27 -0
  6. data/lib/gdk3/deprecated.rb +14 -16
  7. data/lib/gdk3/event.rb +38 -0
  8. data/lib/gdk3/loader.rb +266 -0
  9. data/lib/gdk3/rectangle.rb +38 -0
  10. data/lib/gdk3/rgba.rb +32 -0
  11. data/lib/gdk3/window-attr.rb +28 -0
  12. data/lib/gdk3/window.rb +21 -0
  13. data/lib/gdk3.rb +61 -2
  14. data/test/run-test.rb +15 -6
  15. data/test/test-gdk-cairo.rb +41 -0
  16. data/test/test-gdk-event-type.rb +25 -0
  17. data/test/test-gdk-event.rb +47 -49
  18. data/test/test-gdk-keyval.rb +21 -0
  19. data/test/test-gdk-pixbuf.rb +49 -0
  20. data/test/test-gdk-rectangle.rb +35 -4
  21. data/test/test-gdk-rgba.rb +6 -1
  22. data/test/test-gdk-window-attr.rb +1 -1
  23. metadata +23 -51
  24. data/ext/gdk3/depend +0 -11
  25. data/ext/gdk3/extconf.rb +0 -130
  26. data/ext/gdk3/gdk3.def +0 -12
  27. data/ext/gdk3/init.c +0 -35
  28. data/ext/gdk3/rbgdk.c +0 -491
  29. data/ext/gdk3/rbgdk3.h +0 -73
  30. data/ext/gdk3/rbgdk3conversions.h +0 -121
  31. data/ext/gdk3/rbgdk3private.h +0 -85
  32. data/ext/gdk3/rbgdkatom.c +0 -122
  33. data/ext/gdk3/rbgdkcairo.c +0 -91
  34. data/ext/gdk3/rbgdkcolor.c +0 -137
  35. data/ext/gdk3/rbgdkconst.c +0 -33
  36. data/ext/gdk3/rbgdkcursor.c +0 -92
  37. data/ext/gdk3/rbgdkdevice.c +0 -253
  38. data/ext/gdk3/rbgdkdevicemanager.c +0 -39
  39. data/ext/gdk3/rbgdkdisplay.c +0 -434
  40. data/ext/gdk3/rbgdkdisplaymanager.c +0 -55
  41. data/ext/gdk3/rbgdkdragcontext.c +0 -191
  42. data/ext/gdk3/rbgdkevent.c +0 -1173
  43. data/ext/gdk3/rbgdkgeometry.c +0 -253
  44. data/ext/gdk3/rbgdkkeymap.c +0 -151
  45. data/ext/gdk3/rbgdkkeyval.c +0 -108
  46. data/ext/gdk3/rbgdkpango.c +0 -197
  47. data/ext/gdk3/rbgdkpangorenderer.c +0 -144
  48. data/ext/gdk3/rbgdkpixbuf.c +0 -176
  49. data/ext/gdk3/rbgdkproperty.c +0 -305
  50. data/ext/gdk3/rbgdkrectangle.c +0 -140
  51. data/ext/gdk3/rbgdkrgb.c +0 -199
  52. data/ext/gdk3/rbgdkrgba.c +0 -142
  53. data/ext/gdk3/rbgdkscreen.c +0 -443
  54. data/ext/gdk3/rbgdkselection.c +0 -146
  55. data/ext/gdk3/rbgdkthreads.c +0 -77
  56. data/ext/gdk3/rbgdktimecoord.c +0 -133
  57. data/ext/gdk3/rbgdkvisual.c +0 -251
  58. data/ext/gdk3/rbgdkwindow.c +0 -1069
  59. data/ext/gdk3/rbgdkwindowattr.c +0 -191
  60. data/ext/gdk3/rbgdkx11.c +0 -102
  61. data/ext/gdk3/rbgdkx11x11window.c +0 -66
  62. data/extconf.rb +0 -49
  63. data/lib/gdk3/base.rb +0 -59
@@ -1,55 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 2002-2006 Ruby-GNOME2 Project Team
5
- *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License, or (at your option) any later version.
10
- *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
- * MA 02110-1301 USA
20
- */
21
-
22
- #include "rbgdk3private.h"
23
-
24
- #define RG_TARGET_NAMESPACE cDisplayManager
25
- #define _SELF(obj) RVAL2GDKDISPLAYMANAGER(obj)
26
-
27
- static VALUE
28
- rg_s_get(G_GNUC_UNUSED VALUE self)
29
- {
30
- return GOBJ2RVAL(gdk_display_manager_get());
31
- }
32
-
33
- static VALUE
34
- rg_displays(VALUE self)
35
- {
36
- return GOBJGSLIST2RVAL_FREE(gdk_display_manager_list_displays(_SELF(self)),
37
- g_slist_free, NULL);
38
- }
39
-
40
- /* Move to Gdk::Display.
41
- static VALUE
42
- gdkdisplaymanager_get_core_pointer(VALUE self)
43
- {
44
- return GOBJ2RVAL(gdk_display_get_core_pointer(_SELF(self)));
45
- }
46
- */
47
-
48
- void
49
- Init_gdk_display_manager(VALUE mGdk)
50
- {
51
- VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_DISPLAY_MANAGER, "DisplayManager", mGdk);
52
-
53
- RG_DEF_SMETHOD(get, 0);
54
- RG_DEF_METHOD(displays, 0);
55
- }
@@ -1,191 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 2002,2003 Masao Mutoh
5
- *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License, or (at your option) any later version.
10
- *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
- * MA 02110-1301 USA
20
- */
21
-
22
- #include "rbgdk3private.h"
23
-
24
- #define RG_TARGET_NAMESPACE cDragContext
25
- #define _SELF(self) (RVAL2GDKDRAGCONTEXT(self))
26
-
27
- static VALUE
28
- rg_protocol(VALUE self)
29
- {
30
- return GDKDRAGPROTOCOL2RVAL(gdk_drag_context_get_protocol(_SELF(self)));
31
- }
32
-
33
- static VALUE
34
- rg_source_window(VALUE self)
35
- {
36
- return GOBJ2RVAL(gdk_drag_context_get_source_window(_SELF(self)));
37
- }
38
-
39
- static VALUE
40
- rg_dest_window(VALUE self)
41
- {
42
- return GOBJ2RVAL(gdk_drag_context_get_dest_window(_SELF(self)));
43
- }
44
-
45
- static VALUE
46
- rg_targets(VALUE self)
47
- {
48
- GList *list, *cur;
49
- VALUE ary = rb_ary_new();
50
-
51
- list = gdk_drag_context_list_targets(_SELF(self));
52
- for (cur = list; cur != NULL; cur = cur->next) {
53
- rb_ary_push(ary, GDKATOM2RVAL((GdkAtom)cur->data));
54
- }
55
- return ary;
56
- }
57
-
58
- static VALUE
59
- rg_actions(VALUE self)
60
- {
61
- return GDKDRAGACTION2RVAL(gdk_drag_context_get_actions(_SELF(self)));
62
- }
63
-
64
- static VALUE
65
- rg_suggested_action(VALUE self)
66
- {
67
- return GDKDRAGACTION2RVAL(gdk_drag_context_get_suggested_action(_SELF(self)));
68
- }
69
-
70
- static VALUE
71
- rg_selected_action(VALUE self)
72
- {
73
- return GDKDRAGACTION2RVAL(gdk_drag_context_get_selected_action(_SELF(self)));
74
- }
75
-
76
- static VALUE
77
- rg_selection(VALUE self)
78
- {
79
- return GDKATOM2RVAL(gdk_drag_get_selection(_SELF(self)));
80
- }
81
-
82
- static VALUE
83
- rg_drag_abort(VALUE self, VALUE time)
84
- {
85
- gdk_drag_abort(_SELF(self), NUM2UINT(time));
86
- return self;
87
- }
88
-
89
- static VALUE
90
- rg_drop_reply(VALUE self, VALUE ok, VALUE time)
91
- {
92
- gdk_drop_reply(_SELF(self), RVAL2CBOOL(ok), NUM2UINT(time));
93
- return self;
94
- }
95
-
96
- static VALUE
97
- rg_drag_drop(VALUE self, VALUE time)
98
- {
99
- gdk_drag_drop(_SELF(self), NUM2UINT(time));
100
- return self;
101
- }
102
-
103
- static VALUE
104
- rg_find_window(int argc, VALUE *argv, VALUE self)
105
- {
106
- VALUE drag_window, x_root, y_root;
107
- GdkWindow *dest_window;
108
- GdkDragProtocol prot;
109
-
110
- if (argc == 3) {
111
- /* deprecated
112
- rb_scan_args(argc, argv, "30", &drag_window, &x_root, &y_root);
113
- gdk_drag_find_window(_SELF(self),
114
- RVAL2GDKWINDOW(drag_window),
115
- NUM2INT(x_root), NUM2INT(y_root),
116
- &dest_window, &prot);
117
- */
118
- } else {
119
- VALUE screen;
120
- rb_scan_args(argc, argv, "40", &drag_window, &screen, &x_root, &y_root);
121
- gdk_drag_find_window_for_screen(_SELF(self),
122
- RVAL2GDKWINDOW(drag_window),
123
- RVAL2GDKSCREEN(screen),
124
- NUM2INT(x_root), NUM2INT(y_root),
125
- &dest_window, &prot);
126
- }
127
-
128
- return rb_ary_new3(2, GOBJ2RVAL(dest_window),
129
- GDKDRAGPROTOCOL2RVAL(prot));
130
- }
131
-
132
- static VALUE
133
- rg_drag_motion(VALUE self, VALUE dest_window, VALUE protocol, VALUE x_root, VALUE y_root, VALUE suggested_action, VALUE possible_actions, VALUE time)
134
- {
135
- gboolean ret = gdk_drag_motion(_SELF(self),
136
- RVAL2GDKWINDOW(dest_window),
137
- RVAL2GDKDRAGPROTOCOL(protocol),
138
- NUM2INT(x_root), NUM2INT(y_root),
139
- RVAL2GDKDRAGACTION(suggested_action),
140
- RVAL2GDKDRAGACTION(possible_actions),
141
- NUM2UINT(time));
142
- return CBOOL2RVAL(ret);
143
- }
144
-
145
- static VALUE
146
- rg_drop_finish(VALUE self, VALUE success, VALUE time)
147
- {
148
- gdk_drop_finish(_SELF(self), RVAL2CBOOL(success), NUM2UINT(time));
149
- return self;
150
- }
151
-
152
- static VALUE
153
- rg_drag_status(VALUE self, VALUE action, VALUE time)
154
- {
155
- gdk_drag_status(_SELF(self),
156
- RVAL2GDKDRAGACTION(action), NUM2UINT(time));
157
- return self;
158
- }
159
-
160
- static VALUE
161
- rg_drag_drop_succeeded_p(VALUE self)
162
- {
163
- return CBOOL2RVAL(gdk_drag_drop_succeeded(_SELF(self)));
164
- }
165
-
166
- void
167
- Init_gdk_dragcontext(VALUE mGdk)
168
- {
169
- VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_DRAG_CONTEXT, "DragContext", mGdk);
170
-
171
- RG_DEF_METHOD(protocol, 0);
172
- RG_DEF_METHOD(source_window, 0);
173
- RG_DEF_METHOD(dest_window, 0);
174
- RG_DEF_METHOD(targets, 0);
175
- RG_DEF_METHOD(actions, 0);
176
- RG_DEF_METHOD(suggested_action, 0);
177
- RG_DEF_METHOD(selected_action, 0);
178
-
179
- RG_DEF_METHOD(selection, 0);
180
- RG_DEF_METHOD(drag_abort, 1);
181
- RG_DEF_METHOD(drop_reply, 2);
182
- RG_DEF_METHOD(drag_drop, 1);
183
- RG_DEF_METHOD(find_window, 4);
184
- RG_DEF_METHOD(drag_motion, 7);
185
- RG_DEF_METHOD(drop_finish, 2);
186
- RG_DEF_METHOD(drag_status, 2);
187
- RG_DEF_METHOD_P(drag_drop_succeeded, 0);
188
-
189
- G_DEF_CLASS(GDK_TYPE_DRAG_PROTOCOL, "Protocol", RG_TARGET_NAMESPACE);
190
- G_DEF_CLASS(GDK_TYPE_DRAG_ACTION, "Action", RG_TARGET_NAMESPACE);
191
- }