uh 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -11
- data/ext/uh/display.c +1 -1
- data/ext/uh/uh.c +2 -1
- data/ext/uh/uh.h +2 -1
- data/ext/uh/window.c +20 -0
- data/lib/uh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 437af62d5e0ae05ad1fbc597ae4b794527225fc5
|
4
|
+
data.tar.gz: bfb30aba0989bc588578b0299d42281db3769a85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e114af20e2c7cde643b238eaa9be23b09c5ccd09ebd488c012d6ecf087dbf3d5b543252e7c91eea1f852e9167b318111bdf231f9d9bef2716ad0c04e529c9ce8
|
7
|
+
data.tar.gz: c975dc914792a5772074b355d69cfd3a2c340129f5f0469e7d52212d0acf28d44a4e7763cef0f294d46746a225924ab2dc377f2aacdfea189c92b1742a406a5e
|
data/README.md
CHANGED
@@ -12,17 +12,17 @@ uh
|
|
12
12
|
Similar or related code
|
13
13
|
-----------------------
|
14
14
|
|
15
|
-
https://github.com/meh/ruby-x11 (gem, FFI, WM)
|
16
|
-
https://github.com/ayanko/x11_client (gem, C ext)
|
17
|
-
https://github.com/frankhale/ruby-window-management (C ext, WM)
|
18
|
-
https://github.com/christopheraue/ruby-xlib (gem, FFI)
|
19
|
-
https://github.com/rkh/ruby-xlib (C ext)
|
20
|
-
https://github.com/rramsden/ruby-x11 (pure ruby)
|
21
|
-
|
22
|
-
http://ruby-xlib-wrap.sourceforge.net/ (ext, SWIG)
|
23
|
-
http://www.moriq.com/ruby/xlib/
|
24
|
-
http://artengine.ca/matju/RubyX11/
|
25
|
-
https://github.com/mhanne/ruby-xcb (XCB, FFI)
|
15
|
+
* https://github.com/meh/ruby-x11 (gem, FFI, WM)
|
16
|
+
* https://github.com/ayanko/x11_client (gem, C ext)
|
17
|
+
* https://github.com/frankhale/ruby-window-management (C ext, WM)
|
18
|
+
* https://github.com/christopheraue/ruby-xlib (gem, FFI)
|
19
|
+
* https://github.com/rkh/ruby-xlib (C ext)
|
20
|
+
* https://github.com/rramsden/ruby-x11 (pure ruby)
|
21
|
+
|
22
|
+
* http://ruby-xlib-wrap.sourceforge.net/ (ext, SWIG)
|
23
|
+
* http://www.moriq.com/ruby/xlib/
|
24
|
+
* http://artengine.ca/matju/RubyX11/
|
25
|
+
* https://github.com/mhanne/ruby-xcb (XCB, FFI)
|
26
26
|
|
27
27
|
|
28
28
|
|
data/ext/uh/display.c
CHANGED
data/ext/uh/uh.c
CHANGED
@@ -48,7 +48,7 @@ void uh_display() {
|
|
48
48
|
rb_define_method(cDisplay, "next_event", display_next_event, 0);
|
49
49
|
rb_define_method(cDisplay, "open", display_open, 0);
|
50
50
|
rb_define_method(cDisplay, "opened?", display_opened_p, 0);
|
51
|
-
rb_define_method(cDisplay, "pending",
|
51
|
+
rb_define_method(cDisplay, "pending", display_pending, 0);
|
52
52
|
rb_define_method(cDisplay, "root", display_root, 0);
|
53
53
|
rb_define_method(cDisplay, "screens", display_screens, 0);
|
54
54
|
rb_define_method(cDisplay, "sync", display_sync, 1);
|
@@ -144,4 +144,5 @@ void uh_window() {
|
|
144
144
|
rb_define_method(cWindow, "raise", window_raise, 0);
|
145
145
|
rb_define_method(cWindow, "unmap", window_unmap, 0);
|
146
146
|
rb_define_method(cWindow, "wclass", window_wclass, 0);
|
147
|
+
rb_define_method(cWindow, "wclass=", window_wclass_set, 1);
|
147
148
|
}
|
data/ext/uh/uh.h
CHANGED
@@ -62,7 +62,7 @@ VALUE display_listen_events(int argc, VALUE *argv, VALUE self);
|
|
62
62
|
VALUE display_next_event(VALUE self);
|
63
63
|
VALUE display_open(VALUE self);
|
64
64
|
VALUE display_opened_p(VALUE self);
|
65
|
-
VALUE
|
65
|
+
VALUE display_pending(VALUE self);
|
66
66
|
VALUE display_root(VALUE self);
|
67
67
|
VALUE display_root_change_attributes(VALUE self, VALUE mask);
|
68
68
|
VALUE display_screens(VALUE self);
|
@@ -103,6 +103,7 @@ VALUE window_override_redirect(VALUE self);
|
|
103
103
|
VALUE window_raise(VALUE self);
|
104
104
|
VALUE window_unmap(VALUE self);
|
105
105
|
VALUE window_wclass(VALUE self);
|
106
|
+
VALUE window_wclass_set(VALUE self, VALUE rwclass);
|
106
107
|
int window_id(VALUE window);
|
107
108
|
VALUE window_make(Display *display, Window window_id);
|
108
109
|
|
data/ext/uh/window.c
CHANGED
@@ -257,6 +257,26 @@ VALUE window_wclass(VALUE self) {
|
|
257
257
|
return wclass;
|
258
258
|
}
|
259
259
|
|
260
|
+
VALUE window_wclass_set(VALUE self, VALUE rwclass) {
|
261
|
+
XClassHint *ch;
|
262
|
+
VALUE rres_name;
|
263
|
+
VALUE rres_class;
|
264
|
+
SET_WINDOW(self);
|
265
|
+
|
266
|
+
rres_name = rb_ary_entry(rwclass, 0);
|
267
|
+
StringValue(rres_name);
|
268
|
+
rres_class = rb_ary_entry(rwclass, 1);
|
269
|
+
StringValue(rres_class);
|
270
|
+
if ((ch = XAllocClassHint())) {
|
271
|
+
ch->res_name = RSTRING_PTR(rres_name);
|
272
|
+
ch->res_class = RSTRING_PTR(rres_class);
|
273
|
+
XSetClassHint(DPY, WINDOW, ch);
|
274
|
+
XFree(ch);
|
275
|
+
}
|
276
|
+
|
277
|
+
return Qnil;
|
278
|
+
}
|
279
|
+
|
260
280
|
|
261
281
|
int window_id(VALUE self) {
|
262
282
|
SET_WINDOW(self);
|
data/lib/uh/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thibault Jouan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|