Module: Rabbit::Renderer::Display::KeyHandler

Included in:
InfoWindow, ClutterEmbed, DrawingAreaBase, Screen
Defined in:
lib/rabbit/renderer/display/key-handler.rb

Instance Method Summary collapse

Instance Method Details

#connect_key(keyval, modifier, flags, &block) ⇒ Object


14
15
16
# File 'lib/rabbit/renderer/display/key-handler.rb', line 14

def connect_key(keyval, modifier, flags, &block)
  @user_accel_group.connect(keyval, modifier, flags, &block)
end

#disconnect_key(keyval, modifier) ⇒ Object


18
19
20
# File 'lib/rabbit/renderer/display/key-handler.rb', line 18

def disconnect_key(keyval, modifier)
  @user_accel_group.disconnect_key(keyval, modifier)
end

#initialize(*args, &block) ⇒ Object


9
10
11
12
# File 'lib/rabbit/renderer/display/key-handler.rb', line 9

def initialize(*args, &block)
  super
  init_key_handler
end

#post_terminalObject


26
27
28
# File 'lib/rabbit/renderer/display/key-handler.rb', line 26

def post_terminal
  @window.add_accel_group(@accel_group)
end

#pre_terminalObject


22
23
24
# File 'lib/rabbit/renderer/display/key-handler.rb', line 22

def pre_terminal
  @window.remove_accel_group(@accel_group)
end