Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

em.event

Class EM_JOYSTICK_BUTTON_EVENT


Direct ancestors

EM_EVENT

Creation

Features

Invariants

indexing

description

Joystick button event

date

$Date: 2005/10/23 09:07:03 $

revision

$Revision: 1.4 $

class

EM_JOYSTICK_BUTTON_EVENT

inherit

EM_EVENT

create

make (a_pointer: POINTER)

-- Create a joystick button event.

-- (From EM_EVENT)

require
a_pointer_not_null: a_pointer /= Default_pointer

feature -- Status report

caught: BOOLEAN

-- Has Current event already been caught?
-- This means that somebody handled the event
-- and it should not be published any further.

-- (From EM_EVENT)

feature -- Status setting

set_caught (a_bool: BOOLEAN)

-- Set caught to a_bool.
-- One should call set_caught with True
-- when Current should not be published any further.

-- (From EM_EVENT)

ensure
caught_set: caught = a_bool

feature -- Queries

is_button: INTEGER

-- From which button did this event come?

is_device: INTEGER

-- From which joystick device did this event come?

is_key_down: BOOLEAN

-- Is it a key down event?

is_key_up: BOOLEAN

-- Is it a key up event?

type: INTEGER

-- Event type value
-- (em_key_down_event or em_key_up_event)

-- (From EM_EVENT)

feature -- Output

out: STRING

-- Textual representation

-- (From ANY)

invariant

sdl_joystick_button_event_struct_not_void: sdl_joystick_button_event_struct /= Void

-- From EM_EVENT
sdl_event_not_void: sdl_event /= Void

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end