indexing description: "[ Mouse motion event ]" date: "$Date$" revision: "$Revision$" class EM_MOUSEMOTION_EVENT inherit EM_MOUSE_EVENT redefine make end create make feature {NONE} -- Initialization make (a_pointer: POINTER) is -- Create a mouse motion event from `a_pointer' pointing to an SDL mouse motion event struct. do create sdl_mousemotion_event_struct.make_shared (a_pointer) Precursor (a_pointer) end feature -- Access screen_x: INTEGER is -- X-coordinate of pointer position on screen where the mouse event has occured do Result := sdl_mousemotion_event_struct.x end screen_y: INTEGER is -- Y-Coordinate of pointer position on screen where the mouse event has occured do Result := sdl_mousemotion_event_struct.y end x_motion: INTEGER is -- Relative motion in x-direction on screen do Result := sdl_mousemotion_event_struct.xrel end y_motion: INTEGER is -- Relative motion in y-direction on screen do Result := sdl_mousemotion_event_struct.yrel end motion: EM_VECTOR_2D is -- Relative motion on screen that caused the event do create Result.make (x_motion, y_motion) ensure result_not_void: Result /= Void end feature -- Status report button_state: INTEGER is -- Mouse button state specifying which mouse buttons are currently pressed -- (see mouse_button_xxx_flag features for possible flags) do Result := sdl_mousemotion_event_struct.state end feature {NONE} -- Implementation sdl_mousemotion_event_struct: SDL_MOUSE_MOTION_EVENT_STRUCT -- The struct invariant sdl_mousemotion_event_struct_not_void: sdl_mousemotion_event_struct /= Void end