Class: Tk::Event::Data
- Defined in:
- lib/ffi-tk/event/data.rb,
lib/ffi-tk/event/data.rb
Constant Summary collapse
- PROPERTIES =
[ ['%#', :Integer, :serial ], ['%b', :Integer, :button ], ['%c', :Integer, :count ], ['%d', :String, :detail ], ['%f', :String, :focus ], ['%h', :Integer, :height ], ['%i', :String, :window ], ['%k', :String, :keycode ], ['%m', :String, :mode ], ['%o', :String, :override_redirect ], ['%p', :String, :place ], ['%s', :String, :state ], ['%t', :String, :time ], ['%w', :Integer, :width ], ['%x', :Integer, :x ], ['%y', :Integer, :y ], ['%A', :String, :unicode ], ['%B', :Integer, :border_width ], ['%D', :String, :mousewheel_delta ], ['%E', :String, :send_event ], ['%K', :String, :keysym ], ['%N', :String, :keysym_number ], ['%P', :String, :property ], ['%R', :Integer, :root ], ['%S', :Integer, :subwindow ], ['%T', :Integer, :type ], ['%W', :String, :window_path ], ['%X', :Integer, :x_root ], ['%Y', :Integer, :y_root ], ]
Instance Attribute Summary collapse
-
#border_width ⇒ Object
Returns the value of attribute border_width.
-
#button ⇒ Object
Returns the value of attribute button.
-
#count ⇒ Object
Returns the value of attribute count.
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#focus ⇒ Object
Returns the value of attribute focus.
-
#height ⇒ Object
Returns the value of attribute height.
-
#id ⇒ Object
Returns the value of attribute id.
-
#keycode ⇒ Object
Returns the value of attribute keycode.
-
#keysym ⇒ Object
Returns the value of attribute keysym.
-
#keysym_number ⇒ Object
Returns the value of attribute keysym_number.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#mousewheel_delta ⇒ Object
Returns the value of attribute mousewheel_delta.
-
#override_redirect ⇒ Object
Returns the value of attribute override_redirect.
-
#place ⇒ Object
Returns the value of attribute place.
-
#property ⇒ Object
Returns the value of attribute property.
-
#root ⇒ Object
Returns the value of attribute root.
-
#send_event ⇒ Object
Returns the value of attribute send_event.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
-
#serial ⇒ Object
Returns the value of attribute serial.
-
#state ⇒ Object
Returns the value of attribute state.
-
#subwindow ⇒ Object
Returns the value of attribute subwindow.
-
#time ⇒ Object
Returns the value of attribute time.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unicode ⇒ Object
Returns the value of attribute unicode.
-
#width ⇒ Object
Returns the value of attribute width.
-
#window ⇒ Object
Returns the value of attribute window.
-
#window_path ⇒ Object
Returns the value of attribute window_path.
-
#x ⇒ Object
Returns the value of attribute x.
-
#x_root ⇒ Object
Returns the value of attribute x_root.
-
#y ⇒ Object
Returns the value of attribute y.
-
#y_root ⇒ Object
Returns the value of attribute y_root.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(id, sequence, *properties) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(id, sequence, *properties) ⇒ Data
Returns a new instance of Data.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/ffi-tk/event/data.rb', line 44 def initialize(id, sequence, *properties) super id, sequence PROPERTIES.each do |code, conv, name| property = properties.shift next if property == '??' converted = __send__(conv, property) self[name] = converted end end |
Instance Attribute Details
#border_width ⇒ Object
Returns the value of attribute border_width
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def border_width @border_width end |
#button ⇒ Object
Returns the value of attribute button
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def @button end |
#count ⇒ Object
Returns the value of attribute count
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def count @count end |
#detail ⇒ Object
Returns the value of attribute detail
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def detail @detail end |
#focus ⇒ Object
Returns the value of attribute focus
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def focus @focus end |
#height ⇒ Object
Returns the value of attribute height
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def height @height end |
#id ⇒ Object
Returns the value of attribute id
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def id @id end |
#keycode ⇒ Object
Returns the value of attribute keycode
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def keycode @keycode end |
#keysym ⇒ Object
Returns the value of attribute keysym
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def keysym @keysym end |
#keysym_number ⇒ Object
Returns the value of attribute keysym_number
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def keysym_number @keysym_number end |
#mode ⇒ Object
Returns the value of attribute mode
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def mode @mode end |
#mousewheel_delta ⇒ Object
Returns the value of attribute mousewheel_delta
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def mousewheel_delta @mousewheel_delta end |
#override_redirect ⇒ Object
Returns the value of attribute override_redirect
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def override_redirect @override_redirect end |
#place ⇒ Object
Returns the value of attribute place
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def place @place end |
#property ⇒ Object
Returns the value of attribute property
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def property @property end |
#root ⇒ Object
Returns the value of attribute root
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def root @root end |
#send_event ⇒ Object
Returns the value of attribute send_event
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def send_event @send_event end |
#sequence ⇒ Object
Returns the value of attribute sequence
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def sequence @sequence end |
#serial ⇒ Object
Returns the value of attribute serial
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def serial @serial end |
#state ⇒ Object
Returns the value of attribute state
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def state @state end |
#subwindow ⇒ Object
Returns the value of attribute subwindow
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def subwindow @subwindow end |
#time ⇒ Object
Returns the value of attribute time
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def time @time end |
#type ⇒ Object
Returns the value of attribute type
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def type @type end |
#unicode ⇒ Object
Returns the value of attribute unicode
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def unicode @unicode end |
#width ⇒ Object
Returns the value of attribute width
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def width @width end |
#window ⇒ Object
Returns the value of attribute window
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def window @window end |
#window_path ⇒ Object
Returns the value of attribute window_path
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def window_path @window_path end |
#x ⇒ Object
Returns the value of attribute x
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def x @x end |
#x_root ⇒ Object
Returns the value of attribute x_root
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def x_root @x_root end |
#y ⇒ Object
Returns the value of attribute y
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def y @y end |
#y_root ⇒ Object
Returns the value of attribute y_root
3 4 5 |
# File 'lib/ffi-tk/event/data.rb', line 3 def y_root @y_root end |