Sha256: fba691f9bf74d581818674f9e0ffe3079d000964e138835e22a537ab5dd9dedc
Contents?: true
Size: 1.32 KB
Versions: 34
Compression:
Stored size: 1.32 KB
Contents
module Rabbit module Renderer module Display module HookHandler def initialize(*args, &block) super init_hook_handler end def call_hook_procs(procs, *args) procs.any? {|proc| proc.call(*args)} end def add_motion_notify_hook(hook=Proc.new) @motion_notify_hook_procs << hook end def clear_motion_notify_hook @motion_notify_hook_procs.clear end def add_scroll_hook(hook=Proc.new) @scroll_hook_procs << hook end def clear_scroll_hook @scroll_hook_procs.clear end def add_button_press_hook(hook=Proc.new) @button_press_hook_procs << hook end def clear_button_press_hook @button_press_hook_procs.clear end def add_button_release_hook(hook=Proc.new) @button_release_hook_procs << hook end def clear_button_release_hook @button_release_hook_procs.clear end def clear_hooks init_hook_handler end private def init_hook_handler @motion_notify_hook_procs = [] @scroll_hook_procs = [] @button_press_hook_procs = [] @button_release_hook_procs = [] end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems