note description: "Joystick manager. Not tested. It is most probable that it does not work correctly" author: "Louis Marchand" date: "May 24, 2012" revision: "1.0.0.0" class interface GAME_JOYSTICK create {GAME_LIBRARY_CONTROLLER} make feature -- Access index: INTEGER_32 -- Internal unique identifier of Current is_removed: BOOLEAN -- Current has been removed name: STRING_8 -- Return the Joystick Name. require not_removed: not is_removed open -- Open Current (Allocate internal structure). require open_joystick_not_open: not is_open ensure is_open_or_error: not has_error implies is_open close -- Close Current (Free internal structure). require close_is_open: is_open is_open: BOOLEAN -- True if the joystick has been opened. axes_count: INTEGER_32 -- Get the number of axes on the joystick. require get_axes_number_opened: is_open not_removed: not is_removed axis_value (a_axis_id: INTEGER_32): INTEGER_16 -- Get the value of the axis identified by a_axis_id. -- Note that a_axis_id index start at 0 require get_axis_value_opened: is_open not_removed: not is_removed get_axis_value_axis_id_valid: a_axis_id < axes_count balls_count: INTEGER_32 -- Return the number of balls on the joystick. require get_balls_number_opened: is_open not_removed: not is_removed ball_change (a_ball_id: INTEGER_32): TUPLE [x_relative: INTEGER_32; y_relative: INTEGER_32] -- Return the state of the ball identified by a_ball_id (relative to the last read). -- Note that a_ball_id index start at 0 require get_ball_value_opened: is_open get_ball_value_ball_id_valid: a_ball_id < axes_count not_removed: not is_removed buttons_count: INTEGER_32 -- Return the number of buttons on the joystick. require get_buttons_number_opened: is_open not_removed: not is_removed is_button_pressed (a_button_id: INTEGER_32): BOOLEAN -- True if the button identified by a_button_id is pressed, False otherwise -- Note that a_button_id index start at 0 require is_buttons_pressed_opened: is_open is_button_pressed_button_id_valid: a_button_id < buttons_count not_removed: not is_removed hats_count: INTEGER_32 -- Return the number of hats on the joystick. require get_hats_number_opened: is_open not_removed: not is_removed hat_state (a_hat_id: INTEGER_32): GAME_JOYSTICK_HAT_STATE -- The state of the hat identified by a_hat_id -- Note that a_hat_id index start at 0 require get_hat_state_opened: is_open not_removed: not is_removed get_hat_state_hat_id_valid: a_hat_id < hats_count guid: READABLE_STRING_GENERAL -- A unique hardware identifier of Current require not_removed: not is_removed instance_id: INTEGER_32 -- Identifier of Current used in event handeling require is_buttons_pressed_opened: is_open not_removed: not is_removed is_haptic_capable: BOOLEAN -- Is Current has haptic features require is_buttons_pressed_opened: is_open not_removed: not is_removed is_haptic_enable: Game_library.is_haptic_enable haptic_controller: GAME_HAPTIC_JOYSTICK -- Used to manage the haptic (force feedback) of Current require is_buttons_pressed_opened: is_open not_removed: not is_removed is_haptic_capable: is_haptic_capable is_haptic_enable: Game_library.is_haptic_enable events_controller: GAME_EVENTS_CONTROLLER -- Used main event manager feature -- Implementation dispose -- <Pecursor> end -- class GAME_JOYSTICK
Generated by ISE EiffelStudio