xlib-objects 0.5.0 → 0.6.0

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: 88f009cd9b2bead97318e62d2dc2eb5398156d2e
4
- data.tar.gz: 038d2d50a883a97dfda1442a046b86f420905e20
3
+ metadata.gz: 56a42360acde3da1a1964f66fead72e947210c0d
4
+ data.tar.gz: 2cff63e644daa7e3eab089aa1406bfbec4e0807d
5
5
  SHA512:
6
- metadata.gz: 1ef8e3f5832173185ec963d433a90ad7e64b3669caba19517a93e58ecca8390a07af1344e4d545e207eb4be6603b94906f0bd184624d03b7fb9721369d064e51
7
- data.tar.gz: 8f5b9e742bff08d20c45e989938886a5f8c1a3a756da3ec3f131429e0b2cf9735f880c43e2ea540cd2095d895c2e59abdabd87ff642290a06ee59539897614c4
6
+ metadata.gz: 6a8b5f717a7315da150db54a3370745071cca338cce2fc35371c3bcebd38eaf182c32e6e15481c624e5cf1d8fb93528e90acf295e6a9cd7c24f433b1a28baf9d
7
+ data.tar.gz: b17e3b57f492f137a83d34a05a32f109ca222faf946b793bdcf0dc77fee93bcb800d39ce6f6129dcf70370798ebc02e3bbea5487b510605ff6dd71289363783e
data/lib/display.rb CHANGED
@@ -86,6 +86,11 @@ module XlibObj
86
86
  Xlib.XSetIOErrorHandler(@io_error_handler)
87
87
  end
88
88
 
89
+ def flush
90
+ Xlib.XFlush(to_native)
91
+ handle_events
92
+ end
93
+
89
94
  private
90
95
 
91
96
  def internal_window
@@ -22,7 +22,7 @@ module XlibObj
22
22
  @receiver = receiver
23
23
  Xlib.XSendEvent(@receiver.display.to_native, @receiver.to_native, false,
24
24
  Xlib::SubstructureNotifyMask | Xlib::SubstructureRedirectMask, to_native)
25
- Xlib.XFlush(@receiver.display.to_native)
25
+ @receiver.display.flush
26
26
  end
27
27
 
28
28
  private
@@ -15,7 +15,7 @@ module XlibObj
15
15
 
16
16
  def send_to(receiver)
17
17
  Xlib.XSendEvent(receiver.display.to_native, receiver.to_native, false, 0, event(receiver))
18
- Xlib.XFlush(receiver.display.to_native)
18
+ receiver.display.flush
19
19
  end
20
20
 
21
21
  private
@@ -119,7 +119,7 @@ module XlibObj
119
119
  def select_events
120
120
  Xlib.XSelectInput(@display.to_native, @window_id, @event_mask)
121
121
  Xlib.XRRSelectInput(@display.to_native, @window_id, @rr_event_mask)
122
- Xlib.XFlush(@display.to_native)
122
+ @display.flush
123
123
  end
124
124
  end
125
125
  end
@@ -69,7 +69,7 @@ module XlibObj
69
69
  @window.display.to_native, @window.to_native, @atom.to_native,
70
70
  Atom.new(@window.display, item_type).to_native, item_width,
71
71
  Xlib::PropModeReplace, bytes, item_count)
72
- Xlib.XFlush(@window.display.to_native)
72
+ @window.display.flush
73
73
  self
74
74
  end
75
75
 
data/lib/window.rb CHANGED
@@ -68,37 +68,37 @@ module XlibObj
68
68
 
69
69
  def move_resize(x, y, width, height)
70
70
  Xlib.XMoveResizeWindow(@display.to_native, @to_native, x, y, width, height)
71
- Xlib.XFlush(@display.to_native)
71
+ @display.flush
72
72
  self
73
73
  end
74
74
 
75
75
  def map
76
76
  Xlib.XMapWindow(@display.to_native, @to_native)
77
- Xlib.XFlush(@display.to_native)
77
+ @display.flush
78
78
  self
79
79
  end
80
80
 
81
81
  def unmap
82
82
  Xlib.XUnmapWindow(@display.to_native, @to_native)
83
- Xlib.XFlush(@display.to_native)
83
+ @display.flush
84
84
  self
85
85
  end
86
86
 
87
87
  def iconify
88
88
  Xlib.XIconifyWindow(@display.to_native, @to_native, screen.number)
89
- Xlib.XFlush(@display.to_native)
89
+ @display.flush
90
90
  self
91
91
  end
92
92
 
93
93
  def raise
94
94
  Xlib.XRaiseWindow(@display.to_native, @to_native)
95
- Xlib.XFlush(@display.to_native)
95
+ @display.flush
96
96
  self
97
97
  end
98
98
 
99
99
  def focus
100
100
  Xlib.XSetInputFocus(@display.to_native, @to_native, Xlib::RevertToParent, Xlib::CurrentTime)
101
- Xlib.XFlush(@display.to_native)
101
+ @display.flush
102
102
  self
103
103
  end
104
104
 
@@ -155,7 +155,7 @@ module XlibObj
155
155
  property_atom = Atom.new(@display, property)
156
156
  Xlib.XConvertSelection(@display.to_native, type_atom.to_native, target_atom.to_native,
157
157
  property_atom.to_native, @to_native, Xlib::CurrentTime)
158
- Xlib.XFlush(@display.to_native)
158
+ @display.flush
159
159
 
160
160
  self
161
161
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xlib-objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Aue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-30 00:00:00.000000000 Z
11
+ date: 2015-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xlib
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.4.5
108
+ rubygems_version: 2.4.8
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: A light object wrapper around xlib