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

em.event

Class EM_JOYSTICK_AXIS_EVENT


Direct ancestors

EM_EVENT

Creation

Features

Invariants

indexing

description

Joystick axis event

date

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

revision

$Revision: 1.3 $

class

EM_JOYSTICK_AXIS_EVENT

inherit

EM_EVENT

create

make (a_pointer: POINTER)

-- Create an joystick axis 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_axis: INTEGER

-- From which axis did this event come?

is_device: INTEGER

-- From which joystick device did this event come?

type: INTEGER

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

-- (From EM_EVENT)

value: INTEGER

-- return the current value of the respective axis
-- in this event
-- The value range is between -32768 and 32767 (16bit INTEGER)

feature -- Output

out: STRING

-- Textual representation

-- (From ANY)

invariant

sdl_joystick_axis_event_struct_not_void: sdl_joystick_axis_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