This class handles event.Event2 is under module SDL.
To use this class, you should run 'ruby extconf.rb' with '--enable-event2'
Object
Event2.poll
Polls for currently pending events, and returns the instance represents that event.Returns nil if there is no pending event. The class of that instance is following.
Event2::Active Event2::KeyDown Event2::KeyUp Event2::MouseMotion Event2::MouseButtonDown Event2::MouseButtonUp Event2::JoyAxis Event2::JoyBall Event2::JoyHat Event2::JoyButtonUp Event2::JoyButtonDown Event2::Quit Event2::SysWM Event2::VideoResize
All of these classes are subclass of Event2.
Event2.wait
Waits indefinitely for the next available event,returning the instance represents that event.
Event2.push(event)
Not documented yet.
Event2.new
Not documented yet.
Event2.poll and Event2.wait return the instance of the subclasses of Event2. These classes and methods are following. See SDL's manual to know how to use this methods.
Event2::Active#gain
Event2::Active#state
Event2::KeyDown#press
Event2::KeyDown#sym
Event2::KeyDown#mod
Event2::KeyUp#press
Event2::KeyUp#sym
Event2::KeyUp#mod
Event2::MouseMotion#state
Event2::MouseMotion#x
Event2::MouseMotion#y
Event2::MouseMotion#xrel
Event2::MouseMotion#yrel
Event2::MouseButtonDown#button
Event2::MouseButtonDown#press
Event2::MouseButtonDown#x
Event2::MouseButtonDown#y
Event2::MouseButtonUp#button
Event2::MouseButtonUp#press
Event2::MouseButtonUp#x
Event2::MouseButtonUp#y
Event2::JoyAxis#which
Event2::JoyAxis#axis
Event2::JoyAxis#value
Event2::JoyBall#which
Event2::JoyBall#ball
Event2::JoyBall#xrel
Event2::JoyBall#yrel
Event2::JoyHat#which
Event2::JoyHat#hat
Event2::JoyHat#value
Event2::JoyButtonUp#which
Event2::JoyButtonUp#button
Event2::JoyButtonUp#press
Event2::JoyButtonDown#which
Event2::JoyButtonDown#button
Event2::JoyButtonDown#press
Event2::VideoResize#w
Event2::VideoResize#h