uh 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ce0054f79a0757f35bd8ca08cc01d7ca91d9562
4
- data.tar.gz: 736b278f6331a23d8534c7196cacd366cab209ca
3
+ metadata.gz: 437af62d5e0ae05ad1fbc597ae4b794527225fc5
4
+ data.tar.gz: bfb30aba0989bc588578b0299d42281db3769a85
5
5
  SHA512:
6
- metadata.gz: 5dc071e6265bf0854cbb39e63a5e85a61db27bd7d12c44248c3cb91b4b2a6531222cf34db2f58406e36baa3fa29ec46d623dafe76b81c4b0d6b9dc72733f29d0
7
- data.tar.gz: 796c15fdf3093752733f9dc9418633caa690f7edf6f9cb37c6ed5b3c2c772cc8c9fdd9d6644e810006be419d9929cab7325c23addc32dad8239ac79bf586d28a
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
 
@@ -148,7 +148,7 @@ VALUE display_opened_p(VALUE self) {
148
148
  return DPY ? Qtrue : Qfalse;
149
149
  }
150
150
 
151
- VALUE display_pending_p(VALUE self) {
151
+ VALUE display_pending(VALUE self) {
152
152
  SET_DISPLAY(self);
153
153
 
154
154
  rb_funcall(self, rb_intern("check!"), 0);
@@ -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", display_pending_p, 0);
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
  }
@@ -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 display_pending_p(VALUE self);
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
 
@@ -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);
@@ -1,3 +1,3 @@
1
1
  module Uh
2
- VERSION = '2.0.1'.freeze
2
+ VERSION = '2.0.2'.freeze
3
3
  end
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.1
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-04-29 00:00:00.000000000 Z
11
+ date: 2015-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake