note description: "A GAME_WINDOW that can be used directly with OpenGL." author: "Louis Marchand" date: "Tue, 29 Dec 2015 19:06:42 +0000" revision: "1.0" class interface GAME_WINDOW_GL create make (a_title: READABLE_STRING_GENERAL; a_display: detachable GAME_DISPLAY; a_is_x_centered, a_is_y_centered, a_is_x_undefined, a_is_y_undefined: BOOLEAN; a_x, a_y, a_width, a_height: INTEGER_32; a_flags: NATURAL_32) -- Initialization of a a_widthxa_height Current at position -- (a_x,a_y) using a_title as window caption, and -- using a_flags as internal attributes flags. If a_is_x_centered -- or a_is_y_centered are set, the position will be centered on -- a_display. If a_is_x_undefined or a_is_y_undefined are -- set, the position does not matter, but will be place on a_display -- If a_display is Void, the first found display will be used. require -- from GAME_WINDOW game_screen_video_enabled: Game_library.is_video_enable centered_or_undefine_x: a_is_x_centered implies not a_is_x_undefined centered_or_undefine_y: a_is_y_centered implies not a_is_y_undefined width_valid: a_width > 0 height_valid: a_height > 0 ensure -- from GAME_WINDOW make_window_is_open: not has_error implies exists feature -- Access brightness: REAL_32 assign set_brightness -- The Gamma correction where 0.0 is completely dark and 1.0 is normal. -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists ensure -- from GAME_WINDOW window_brightness_not_changed: brightness = old brightness center_horizontally -- Change x so that Current became centered in the screen -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists center_horizontally_on_display (a_display: GAME_DISPLAY) -- Change x so that Current became centered in the screen a_display -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists center_horizontally_on_display_index (a_index: INTEGER_32) -- Change x so that Current became centered in the screen number a_index -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists index_valid: a_index >= 0 and a_index < Game_library.displays_count center_on_display (a_display: GAME_DISPLAY) -- Change position so that Current became centered in the screen a_display -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists center_on_display_index (a_index: INTEGER_32) -- Change position so that Current became centered in the screen number a_index -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists index_valid: a_index >= 0 and a_index < Game_library.displays_count center_position -- Change position so that Current became centered on the screen -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists center_vertically -- Change y so that Current became centered in the screen -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists center_vertically_on_display (a_display: GAME_DISPLAY) -- Change y so that Current became centered in the screen a_display -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists center_vertically_on_display_index (a_index: INTEGER_32) -- Change y so that Current became centered in the screen number a_index -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists index_valid: a_index >= 0 and a_index < Game_library.displays_count clear_events -- Remove all events. -- (from GAME_WINDOW_EVENTS) ensure -- from GAME_EVENTS running_unchanged: is_events_running = old is_events_running clipboard_text: READABLE_STRING_GENERAL assign set_clipboard_text -- The text contained by the system clipboard -- (from GAME_WINDOW) require -- from GAME_WINDOW has_text: has_clipboard_text close -- Close Current (you cannot open it again). -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists close_request_actions: ACTION_SEQUENCE [NATURAL_32] -- When the Window manager request that Current be closed. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable display: GAME_DISPLAY -- display containing the center of the window. -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists display_index: INTEGER_32 -- Index of the display containing the center of the window. -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists ensure -- from GAME_WINDOW window_display_index_valid: not has_error implies Result >= 0 display_mode: GAME_DISPLAY_MODE assign set_display_mode -- The display mode of Current in fullscreen mode -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists events_controller: GAME_EVENTS_CONTROLLER -- The main event manager -- (from GAME_WINDOW) exists: BOOLEAN -- Is Current has been closed -- (from GAME_WINDOW) expose_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current is exposed and should be redraw. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable Game_library: GAME_LIBRARY_CONTROLLER -- The main controller of the game library -- (from GAME_LIBRARY_SHARED) gamma_correction: TUPLE [red: ARRAYED_LIST [NATURAL_16]; green: ARRAYED_LIST [NATURAL_16]; blue: ARRAYED_LIST [NATURAL_16]] -- The gamma encoding of Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists generating_type: TYPE [detachable GAME_WINDOW_GL] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty gl_accumulation_alpha_size: INTEGER_32 -- Minimum number of bits for the alpha channel of the accumulation buffer. -- Defaults to 0 require gl_context_valid gl_accumulation_blue_size: INTEGER_32 -- Minimum number of bits for the blue channel of the accumulation buffer. -- Defaults to 0 require gl_context_valid gl_accumulation_green_size: INTEGER_32 -- Minimum number of bits for the green channel of the accumulation buffer. -- Defaults to 0 require gl_context_valid gl_accumulation_red_size: INTEGER_32 -- Minimum number of bits for the red channel of the accumulation buffer. -- Defaults to 0 require gl_context_valid gl_alpha_size: INTEGER_32 -- Minimum number of bits for the alpha channel of the color buffer. -- Defaults to 0 require gl_context_valid gl_blue_size: INTEGER_32 -- Minimum number of bits for the blue channel of the color buffer. -- Defaults to 2 require gl_context_valid gl_buffer_size: INTEGER_32 -- Minimum number of bits for the frame buffer. -- Defaults to 0 require gl_context_valid gl_context_valid: BOOLEAN -- The contex of Current is correctly created gl_depth_size: INTEGER_32 -- Minimum number of bits for the depth buffer. -- Defaults to 16 require gl_context_valid gl_drawable_size: TUPLE [width: INTEGER_32; height: INTEGER_32] -- Return the drawable area dimension of Current. -- Ti differ of size when we're rendering to a high-DPI drawable -- Note: use that with glViewport require gl_context_valid gl_green_size: INTEGER_32 -- Minimum number of bits for the green channel of the color buffer. -- Defaults to 3 require gl_context_valid gl_multi_sample_count: INTEGER_32 -- If multisample anti-aliasing is enabled (see: is_gl_multi_sample_enabled), -- return the number of samples used around the current pixel -- Default: 0 require gl_context_valid is_gl_multi_sample_enabled gl_red_size: INTEGER_32 -- Minimum number of bits for the red channel of the color buffer. -- Defaults to 3 require gl_context_valid gl_stencil_size: INTEGER_32 -- Minimum number of bits for the stencil buffer. -- Defaults to 0 require gl_context_valid gl_version: TUPLE [major: INTEGER_32; minor: INTEGER_32] -- The version of OpenGL that Current use. -- Default depend on the OpenGL library in the system require gl_context_valid grab_input -- Force every input in Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists ensure -- from GAME_WINDOW is_grabbed: is_input_grabbed has_border: BOOLEAN -- Is Current has border decoration -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists has_clipboard_text: BOOLEAN -- True if the system clipboard has some text -- (from GAME_WINDOW) has_error: BOOLEAN -- Is the library has generate an error -- (from GAME_ERROR_MANAGER) has_input_focus: BOOLEAN -- Is Current having the focus for keyboard input -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists has_mouse_focus: BOOLEAN -- Is Current having the focus of the mouse -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists has_text_input: BOOLEAN -- Is Current in text input mode (see: start_text_input) -- (from GAME_WINDOW) height: INTEGER_32 assign set_height -- The vertical length of Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists hide -- Remove the visibility of Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists hide_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current is hide. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable id: NATURAL_32 -- The internal identifier of the Window (For logging purpose) -- (from GAME_WINDOW) require -- from GAME_WINDOW_EVENTS True require else -- from GAME_WINDOW window_not_closed: exists is_fake_fullscreen: BOOLEAN assign set_is_fake_fullscreen -- Is Current in fullscreen mode -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists is_foreign: BOOLEAN -- Is Current not created by the present library -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists is_fullscreen: BOOLEAN assign set_is_fullscreen -- Is Current in fullscreen mode -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists is_gl_compatibility_profile_enabled: BOOLEAN -- True to enable the compatibility context profile. -- In this profile, deprecated conext funtionnalities will be enabled; -- Default: Depend on the system require gl_context_valid is_gl_context_sharing_enabled: BOOLEAN -- True to enable OpenGL Context Sharing -- Default: False require gl_context_valid is_gl_core_profile_enabled: BOOLEAN -- True to enable the core context profile. -- In this profile, deprecated conext funtionnalities will be disabled; -- Default: Depend on the system require gl_context_valid is_gl_debug_enabled: BOOLEAN -- Put the GL into a "debug" mode. May cause performance lost -- Ignored on system that does not support it. -- Default: False require gl_context_valid is_gl_double_buffer_enabled: BOOLEAN -- True if Current is double buffered. False if not. -- Default: True require gl_context_valid is_gl_es_profile_enabled: BOOLEAN -- True to enable the GLES context profile. -- In this profile, only the GLES subset of the context functionnalities will be enabled -- Default: Depend on the system require gl_context_valid is_gl_forward_compatibility_enabled: BOOLEAN -- If True, no deprecated context functionality will be supported -- Can cause a performance gain -- Only available for OpenGL 3.0 and newer -- Ignored on system that does not support it. -- Default: False require gl_context_valid is_gl_hardware_rendering_enable: BOOLEAN -- Current uses hardware rendering. -- Default: True require gl_context_valid is_gl_multi_sample_enabled: BOOLEAN -- True if Current used multisample anti-aliasing. False if not -- Default: False require gl_context_valid is_gl_reset_isolation_enabled: BOOLEAN -- True to enable more rebust driver or hardware failure reset management. -- Ignored on system that does not support it. -- Default: False require gl_context_valid is_gl_robust_access_enabled: BOOLEAN -- If True, Internal OpenGL context will use more robust API. -- Ignored on system that does not support it. -- Can cause a performance lost -- Default: False require gl_context_valid is_gl_software_rendering_enable: BOOLEAN -- Current uses software rendering. -- Default: False require gl_context_valid is_gl_srgb_request_enabled: BOOLEAN -- True to request sRGB rendering -- Default: False require gl_context_valid is_gl_stereo_enabled: BOOLEAN -- True if Current used quad buffer stereo rendering. False if not. -- Default: False require gl_context_valid is_hidden: BOOLEAN assign set_is_hidden -- Is Current in invisible -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists is_input_grabbed: BOOLEAN assign set_is_input_grabbed -- Is Current grabbing all input -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists is_maximized: BOOLEAN assign set_is_maximized -- Is Current in maximized mode (to fill the screen) -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists is_minimized: BOOLEAN assign set_is_minimized -- Is Current in iconized representation -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists is_opengl_compatible: BOOLEAN -- Is Current can be used in an OpenGL context -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists is_resizable: BOOLEAN -- Can Current be resized by the user -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists is_events_running: BOOLEAN assign set_is_running -- Is Current active -- (from GAME_EVENTS) is_visible: BOOLEAN -- Is Current in can be seen in the screen (not hidden) -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists key_pressed_actions: ACTION_SEQUENCE [NATURAL_32, GAME_KEY_EVENT] -- When a key (represented by key_state) has been pressed. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS key_released_events_enabled: events_controller.is_key_pressed_event_enable key_released_actions: ACTION_SEQUENCE [NATURAL_32, GAME_KEY_EVENT] -- When a key (represented by key_state) has been released. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS key_released_events_enabled: events_controller.is_key_released_event_enable keyboard_focus_gain_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current has gain keyboard focus. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable keyboard_focus_lost_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current has lost keyboard focus. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable last_error: READABLE_STRING_GENERAL -- The last error generate by the library -- (from GAME_SDL_ANY) maximize -- Change the dimension of Current to fill the screen -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists maximize_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current has been maximized. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable maximum_size: TUPLE [width: INTEGER_32; height: INTEGER_32] -- The maximum dimension that Current can take -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists minimize -- Put Current in an iconic representation -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists minimize_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current has been minimized. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable minimum_size: TUPLE [width: INTEGER_32; height: INTEGER_32] -- The minimum dimension that Current can take -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists mouse_button_pressed_actions: ACTION_SEQUENCE [NATURAL_32, GAME_MOUSE_BUTTON_PRESS_EVENT, NATURAL_8] -- When a mouse represented by mouse_state has been pressed for the nb_clicks times -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS mouse_button_pressed_events_enabled: events_controller.is_mouse_button_pressed_event_enable mouse_button_released_actions: ACTION_SEQUENCE [NATURAL_32, GAME_MOUSE_BUTTON_RELEASE_EVENT, NATURAL_8] -- When a mouse represented by mouse_state has been released for the nb_clicks times -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS mouse_button_released_events_enabled: events_controller.is_mouse_button_released_event_enable mouse_enter_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current has gained mouse focus. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable mouse_leave_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current has lost mouse focus. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable mouse_motion_actions: ACTION_SEQUENCE [NATURAL_32, GAME_MOUSE_MOTION_EVENT, INTEGER_32, INTEGER_32] -- When a mouse represented by mouse_state has been moved in Current. -- The difference between the old position and the new (delta_x,delta_y) -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS mouse_motion_events_enabled: events_controller.is_mouse_motion_event_enable mouse_wheel_move_actions: ACTION_SEQUENCE [NATURAL_32, GAME_MOUSE_EVENT, INTEGER_32, INTEGER_32] -- When the wheel of a mouse represented by mouse_state has been moved. -- The difference between the old wheel position and the new one is (delta_x,delta_y) -- When delta_x is positive, the wheel has been move up, and when negative, it has been moved down -- When delta_y is positive, the wheel has been move right, and when negative, it has been moved left -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS mouse_wheel_move_events_enabled: events_controller.is_mouse_wheel_event_enable move_actions: ACTION_SEQUENCE [NATURAL_32, INTEGER_32, INTEGER_32] -- When Current has been moved to (x,y). -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable move_mouse_to_position (a_x, a_y: INTEGER_32) -- Place the mouse at position (a_x,a_y) into Current -- (from GAME_WINDOW) require -- from GAME_WINDOW windows_not_closed: exists pixel_format: GAME_PIXEL_FORMAT_READABLE -- The internal format of the pixel representation in memory. -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists position: TUPLE [x: INTEGER_32; y: INTEGER_32] -- The coordinate (x,y) of the position of Current in the screen. -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists put_border -- Put border decoration to Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists raise -- Put Current to the front -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists release_input -- Release the input previously forced into Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists ensure -- from GAME_WINDOW is_not_grabbed: not is_input_grabbed remove_border -- Remove border decoration to Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists resize_actions: ACTION_SEQUENCE [NATURAL_32, INTEGER_32, INTEGER_32] -- When Current has been resized by the user (external to the game library) -- to widthxheight. Always precceded by a size_change_actions events. -- Note: This event is not trigger by the GAME_WINDOW.set_size or GAME_WINDOW.set_full_screen -- Routines -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable restore -- Get the original dimension of Current (previously change with maximize or minimize) -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists restore_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current has been restored to normal size and position. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable run_events -- Put Current active. -- (from GAME_WINDOW_EVENTS) require -- from GAME_EVENTS run_not_already_running: not is_events_running ensure -- from GAME_EVENTS is_running: is_events_running set_brightness (a_brightness: REAL_32) -- Set the brightness (gamma correction) to a_brightness for Current where 0.0 is completely dark and 1.0 is normal. -- Set has_error when an error occured. -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists window_set_brightness_valid: a_brightness >= 0.0 and a_brightness <= 1.to_real ensure -- from GAME_WINDOW window_set_brightness_changed: brightness = a_brightness set_clipboard_text (a_text: READABLE_STRING_GENERAL) -- Put a_text into the system clipboard -- (from GAME_WINDOW) set_display_mode (a_display_mode: GAME_DISPLAY_MODE) -- Assign display_mode with the value of a_display_mode -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists set_fake_fullscreen -- Activate the "fake" fullscreen mode (setting a not bordered maximized window) -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists set_fullscreen -- Activate the "true" fullscreen mode (changing resolution if necessary) -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists set_gamma_correction (a_red, a_green, a_blue: ARRAYED_LIST [NATURAL_16]) -- Assign the gamma_correction values using a_red, a_green, a_blue. -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists red_arrays_count_valid: a_red.count = 256 green_arrays_count_valid: a_green.count = 256 blue_arrays_count_valid: a_blue.count = 256 ensure -- from GAME_WINDOW is_assign: attached gamma_correction as la_gamma_correction and then (la_gamma_correction.red ~ a_red and la_gamma_correction.green ~ a_green and la_gamma_correction.blue ~ a_blue) set_height (a_height: INTEGER_32) -- Assign height with the value of a_height -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists ensure -- from GAME_WINDOW is_assign: height = a_height width_not_changed: width = old width set_icon (a_surface: GAME_SURFACE) -- Place the icon represented by a_surface as Current icon (in the decoration) -- (from GAME_WINDOW) require -- from GAME_WINDOW windows_not_closed: exists surface_exists: a_surface.is_open set_is_fake_fullscreen (a_value: BOOLEAN) -- Assign to is_fake_fullscreen the value of a_value -- (from GAME_WINDOW) ensure -- from GAME_WINDOW is_assign: is_fake_fullscreen ~ a_value set_is_fullscreen (a_value: BOOLEAN) -- Assign to is_fullscreen the value of a_value -- (from GAME_WINDOW) ensure -- from GAME_WINDOW is_assign: is_fullscreen ~ a_value set_is_hidden (a_value: BOOLEAN) -- Assign to is_hidden the value of a_value -- (from GAME_WINDOW) ensure -- from GAME_WINDOW is_assign: is_hidden ~ a_value set_is_input_grabbed (a_value: BOOLEAN) -- Assign to is_input_grabbed the value of a_value -- (from GAME_WINDOW) ensure -- from GAME_WINDOW is_assign: is_input_grabbed ~ a_value set_is_maximized (a_value: BOOLEAN) -- Assign to is_maximized the value of a_value -- (from GAME_WINDOW) ensure -- from GAME_WINDOW is_assign: is_maximized ~ a_value set_is_minimized (a_value: BOOLEAN) -- Assign to is_minimized the value of a_value -- (from GAME_WINDOW) ensure -- from GAME_WINDOW is_assign: is_minimized ~ a_value set_is_running (a_value: BOOLEAN) -- Assign to is_running the value of a_value -- (from GAME_EVENTS) ensure -- from GAME_EVENTS is_assign: is_events_running ~ a_value set_maximum_size (a_width, a_height: INTEGER_32) -- Assign the values of maximum_size with the values a_width, a_height -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists set_minimum_size (a_width, a_height: INTEGER_32) -- Assign the values of minimum_size with the values a_width, a_height -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists set_position (a_x, a_y: INTEGER_32) -- Assign position with the values a_x and a_y -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists set_size (a_width, a_height: INTEGER_32) -- Assign the values of size with the values a_width, a_height -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists ensure -- from GAME_WINDOW is_assign: attached size as la_size and then (la_size.width ~ a_width and la_size.height ~ a_height) set_title (a_title: READABLE_STRING_GENERAL) -- Assign title using the value of a_title -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists set_width (a_width: INTEGER_32) -- Assign width with the value of a_width -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists ensure -- from GAME_WINDOW is_assign: width = a_width height_not_changed: height = old height set_windowed -- Desactivate any fullscreen mode -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists set_x (a_x: INTEGER_32) -- assign x with the value of a_x -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists ensure -- from GAME_WINDOW is_assign: x = a_x set_y (a_y: INTEGER_32) -- assign y with the value of a_y -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists ensure -- from GAME_WINDOW is_assign: y = a_y show -- Active the visibility of Current (previously removed by hide) -- (from GAME_WINDOW) show_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current is show. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable size: TUPLE [width: INTEGER_32; height: INTEGER_32] -- The present dimension of Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists size_change_actions: ACTION_SEQUENCE [NATURAL_32] -- When Current has been resized. -- Note: Trigger when a user resize the window (external to the game library) or when a -- call to the GAME_WINDOW.set_size or GAME_WINDOW.set_full_screen routines has -- been use. -- (from GAME_WINDOW_EVENTS) require -- from GAME_WINDOW_EVENTS window_events_enabled: events_controller.is_window_event_enable start_text_input -- Begin to read text in Current -- (from GAME_WINDOW) start_text_input_in_rectangle (a_x, a_y, a_width, a_height: INTEGER_32) -- Begin to read text in Current displaying updated in the -- rectangle starting at position (a_x, a_y) of dimention a_width X a_height. -- Note: The library will not automatically draw the text in the rectangle. -- The coordinate and dimention will be use to show the OS candidate list (if there is one). -- See: http://wiki.libsdl.org/Tutorials/TextInput#CandidateList -- (from GAME_WINDOW) stop_events -- Put Current innactive. -- (from GAME_WINDOW_EVENTS) require -- from GAME_EVENTS stop_is_running: is_events_running ensure -- from GAME_EVENTS is_stopped: not is_events_running stop_text_input -- Finish the reading of text in Current -- (from GAME_WINDOW) text_editing_actions: ACTION_SEQUENCE [NATURAL_32, STRING_32, INTEGER_32, INTEGER_32] -- When a text has been edited in Current. -- (from GAME_WINDOW_EVENTS) text_input_actions: ACTION_SEQUENCE [NATURAL_32, STRING_32] -- When a new text has been entered in Current. -- (from GAME_WINDOW_EVENTS) title: READABLE_STRING_GENERAL assign set_title -- The text to write in the title bar of Current (part of the decoration) -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists update -- Print the visual buffer modification to the screen require -- from GAME_WINDOW window_not_closed: exists require else gl_context_valid width: INTEGER_32 assign set_width -- The horizontal length of Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists window_manager: GAME_WINDOW_MANAGER -- The window manager managing Current. -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists x: INTEGER_32 assign set_x -- The horizontal coordinate of the position of Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists y: INTEGER_32 assign set_y -- The vertical coordinate of the position of Current -- (from GAME_WINDOW) require -- from GAME_WINDOW window_not_closed: exists feature -- Comparison frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal alias "≡≡≡" (other: GAME_WINDOW_GL): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: GAME_WINDOW_GL): BOOLEAN -- Is other attached to an object considered -- equal to current object? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result frozen standard_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal alias "≜" (other: GAME_WINDOW_GL): BOOLEAN -- Is other attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of other (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of other? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) feature -- Duplication copy (other: GAME_WINDOW_GL) -- Update current object using fields of object attached -- to other, so as to yield equal objects. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen deep_copy (other: GAME_WINDOW_GL) -- Effect equivalent to that of: -- copy (other . deep_twin) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: GAME_WINDOW_GL -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: GAME_WINDOW_GL) -- Copy every field of other onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: GAME_WINDOW_GL -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) frozen twin: GAME_WINDOW_GL -- New object equal to Current -- twin calls copy; to change copying/twinning semantics, redefine copy. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations frozen default: detachable GAME_WINDOW_GL -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.default for -- some p of type POINTER.) -- (from ANY) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class feature -- Implementation dispose -- Close require -- from DISPOSABLE True feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: detachable ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) end -- class GAME_WINDOW_GL
Generated by ISE EiffelStudio