indexing description: "[ Application visibility event or Active event ]" date: "$Date$" revision: "$Revision$" class EM_ACTIVE_EVENT inherit EM_EVENT redefine make end create make feature {NONE} -- Initialization make (a_pointer: POINTER) is -- Create an active event. do Precursor (a_pointer) create sdl_active_event_struct.make_shared (a_pointer) end feature -- Queries gain: INTEGER is -- Indicates whether the application has -- mouse or keyboard focus or if the application -- has been maximised after being minimised. -- Return 1 or 0 do Result := sdl_active_event_struct.gain ensure result_one_or_zero: Result = 0 or Result = 1 end state: INTEGER is -- Indicates what kind of focus has been gained or lost. do Result := sdl_active_event_struct.state ensure result_one_or_zero: Result = Em_appmousefocus or Result = Em_appinputfocus or Result = Em_appactive end feature {NONE} -- Implementation sdl_active_event_struct: SDL_ACTIVE_EVENT_STRUCT -- The struct invariant sdl_active_event_struct_not_void: sdl_active_event_struct /= Void end