uh 2.0.0.pre1 → 2.0.0.pre2

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: 2fc046078c7d4c3b9c91826b14cacb8c114820ae
4
- data.tar.gz: 7f0f09757ee40f4c5dc5f8f303a6bee3f8fb342e
3
+ metadata.gz: ae8112ff62f6b50b0350600aac2b425a32c849a0
4
+ data.tar.gz: 7d8b94bfd7fb873c1ec83c46be51864342c64f5f
5
5
  SHA512:
6
- metadata.gz: b7d9e2e8aa2a75f4332e2a17851f651ae1759336c0aaa88f216f7290d8d9dd2b2756e13a2e08b271d19b034163eb3044791e60560202fe3b301fa674d83ccd4a
7
- data.tar.gz: c61bc88493bdf8d047f5b88a6d47b91ef034eb9fb54b01954aaa706c00b6358062bf91c7abcf1f3c6babb539306bc7a4ae0240f3884d80232fc996633c469c48
6
+ metadata.gz: f61e009049dbc020a4b09b5b6848f8adc398e98899cf10740325b3e1767497a1b499fcef7f76a6f64562ac3e7253fa75eba99e7041d826eb0fe1771d4470ebb3
7
+ data.tar.gz: 3d68373f04fbbe0214b02c76468166502cd0b33e51dd53c50c6b2d4a017311bb80af2b983e634e72df28f1231135dfec748128f5d18ade7b72b721263e990737
data/ext/uh/uh.c CHANGED
@@ -120,6 +120,7 @@ void uh_screen() {
120
120
  void uh_window() {
121
121
  cWindow = rb_define_class_under(mUh, "Window", rb_cObject);
122
122
  rb_define_attr(cWindow, "id", 1, 0);
123
+ rb_define_method(cWindow, "destroy", window_destroy, 0);
123
124
  rb_define_method(cWindow, "focus", window_focus, 0);
124
125
  rb_define_method(cWindow, "kill", window_kill, 0);
125
126
  rb_define_method(cWindow, "map", window_map, 0);
data/ext/uh/uh.h CHANGED
@@ -80,6 +80,7 @@ VALUE pixmap_make(Display *display, Pixmap xpixmap, VALUE width, VALUE height);
80
80
 
81
81
  VALUE screen_init(VALUE self, VALUE id, VALUE x, VALUE y, VALUE w, VALUE h);
82
82
 
83
+ VALUE window_destroy(VALUE self);
83
84
  VALUE window_focus(VALUE self);
84
85
  VALUE window_icccm_wm_delete(VALUE self);
85
86
  VALUE window_icccm_wm_protocols(VALUE self);
data/ext/uh/window.c CHANGED
@@ -9,6 +9,14 @@
9
9
  #define WINDOW window->id
10
10
 
11
11
 
12
+ VALUE window_destroy(VALUE self) {
13
+ SET_WINDOW(self);
14
+
15
+ XDestroyWindow(DPY, WINDOW);
16
+
17
+ return Qnil;
18
+ }
19
+
12
20
  VALUE window_focus(VALUE self) {
13
21
  SET_WINDOW(self);
14
22
 
data/lib/uh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Uh
2
- VERSION = '2.0.0.pre1'.freeze
2
+ VERSION = '2.0.0.pre2'.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.0.pre1
4
+ version: 2.0.0.pre2
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-16 00:00:00.000000000 Z
11
+ date: 2015-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake