Class: ActiveWindowX::PropertyEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/active_window_x/property_event.rb,
lib/active_window_x.rb

Overview

binding for XPropertyEvent on X11

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(display, raw) ⇒ PropertyEvent

Returns a new instance of PropertyEvent.



34
35
36
37
38
39
40
41
42
43
# File 'lib/active_window_x/property_event.rb', line 34

def initialize display, raw
  super
  @serial = raw.serial
  @send_event = (raw.send_event != 0)
  @display = display
  @window = Window.new display, raw.window
  @atom = Atom.new display, raw.atom
  @time = raw.time
  @state = raw.state
end

Instance Attribute Details

#atomObject (readonly)

the property’s atom and indicates which property was changed or desired



21
22
23
# File 'lib/active_window_x/property_event.rb', line 21

def atom
  @atom
end

#displayObject (readonly)

Display the event was read from



15
16
17
# File 'lib/active_window_x/property_event.rb', line 15

def display
  @display
end

#send_eventObject (readonly)

true if this came from a SendEvent request



12
13
14
# File 'lib/active_window_x/property_event.rb', line 12

def send_event
  @send_event
end

#serialObject (readonly)

the number of last request processed by server



9
10
11
# File 'lib/active_window_x/property_event.rb', line 9

def serial
  @serial
end

#stateObject (readonly)

  • PropertyNewValue when a property of the window is changed using XChangeProperty or XRotateWindowProperties (even when adding zero-length data using XChangeProperty) and when replacing all or part of a property with identical data using XChangeProperty or XRotateWindowProperties.

  • PropertyDelete when a property of the window is deleted using XDeleteProperty or, if the delete argument is True, XGetWindowProperty



32
33
34
# File 'lib/active_window_x/property_event.rb', line 32

def state
  @state
end

#timeObject (readonly)

the server time when the property was changed



24
25
26
# File 'lib/active_window_x/property_event.rb', line 24

def time
  @time
end

#windowObject (readonly)

the window whose associated property was changed



18
19
20
# File 'lib/active_window_x/property_event.rb', line 18

def window
  @window
end