note
	description: "A builder to create {GAME_WINDOW_RENDERED}."
	author: "Louis Marchand"
	date: "Sat, 04 Apr 2015 00:24:50 +0000"
	revision: "2.0"

class 
	GAME_WINDOW_RENDERED_BUILDER

create 
	default_create

feature {NONE} -- Initialization

	default_create
			-- Initialization of Current
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := 0
			title := ""
			enable_position_undefined
			set_dimension (800, 600)
		end
	
feature -- Access

	dimension: TUPLE [width: INTEGER_32; height: INTEGER_32]
			-- The horizontal and vertical dimension of
			-- the generate_window at creation
			-- Default: [800, 600]
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := [width, height]
		end

	disable_border
			-- Make the generate_window without decoration border
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_borderless)
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not has_border
		end

	disable_fake_fullscreen
			-- Make the generate_window windowed
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen_desktop.bit_not)
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_fake_fullscreen
		end

	disable_fullscreen
			-- Make the generate_window windowed
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen.bit_not)
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_fullscreen
		end

	disable_hidden
			-- Make the generate_window showed at creation
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_hidden.bit_not)
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_hidden
		end

	disable_input_grabbed
			-- Make the generate_window not grab all input
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_input_grabbed.bit_not)
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_input_grabbed
		end

	disable_maximized
			-- Make the generate_window not maximized at creation
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_maximized.bit_not)
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_maximized
		end

	disable_minimized
			-- Make the generate_window not minimized at creation
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_minimized.bit_not)
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_minimized
		end

	disable_must_renderer_be_hardware_accelerated
			-- The initial renderer of the generate_window does not
			-- have to be hardware accelerated
		do
			must_renderer_be_hardware_accelerated := False
		ensure
			is_unset: not must_renderer_be_hardware_accelerated
		end

	disable_must_renderer_be_software_rendering
			-- The initial renderer of the generate_window does not
			-- have to be a software renderer
		do
			must_renderer_be_software_rendering := False
		ensure
			is_unset: not must_renderer_be_software_rendering
		end

	disable_must_renderer_support_texture_target
			-- The initial renderer of the generate_window does not
			-- have to support texture as rendering target or trigger an error.
		do
			must_renderer_support_texture_target := False
		ensure
			is_unset: not must_renderer_support_texture_target
		end

	disable_must_renderer_synchronize_update
			-- The initial renderer of the generate_window does not
			-- have to support synchronization of the window update and the
			-- refresh rate.
		do
			must_renderer_synchronize_update := False
		ensure
			is_unset: not must_renderer_synchronize_update
		end

	disable_no_default_renderer
			-- The initial renderer of the generate_window does not
			-- have to support texture as rendering target or trigger an error.
		do
			no_default_renderer := False
		ensure
			is_unset: not no_default_renderer
		end

	disable_position_centered
			-- On creation, use position_x and position_y
			-- values respectively for the horizontal and
			-- vertical position of the generate_window
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_position_x_centered
			disable_position_y_centered
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_position_centered
		end

	disable_position_undefined
			-- On creation, use position_x and position_y
			-- values respectively for the horizontal and
			-- vertical position of the generate_window
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_position_x_undefined
			disable_position_y_undefined
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_position_undefined
		end

	disable_position_x_centered
			-- On creation, use position_x value for the
			-- horizontal position of the generate_window
			-- (from GAME_WINDOW_BUILDER)
		do
			is_position_x_centered := False
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_position_x_centered
		end

	disable_position_x_undefined
			-- On creation, use position_x value for the
			-- horizontal position of the generate_window
			-- (from GAME_WINDOW_BUILDER)
		do
			is_position_x_undefined := False
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_position_x_undefined
		end

	disable_position_y_centered
			-- On creation, use position_y value for the
			-- vertical position of the generate_window
			-- (from GAME_WINDOW_BUILDER)
		do
			is_position_y_centered := False
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_position_y_centered
		end

	disable_position_y_undefined
			-- On creation, use position_y value for the
			-- vertical position of the generate_window
			-- (from GAME_WINDOW_BUILDER)
		do
			is_position_y_undefined := False
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_position_y_undefined
		end

	disable_resizable
			-- Make the generate_window not resizable
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_resizable.bit_not)
		ensure -- from GAME_WINDOW_BUILDER
			is_disabled: not is_resizable
		end

	display: detachable GAME_DISPLAY assign set_display
			-- The GAME_DISPLAY (screen) that the
			-- generate_window will be drawed
			-- into at creation.
			-- Note: only useful if one of is_position_centered,
			-- is_position_x_centered, is_position_y_centered,
			-- is_position_undefined, is_position_x_undefined or
			-- is_position_y_undefined is set
			-- Default: Void
			-- (from GAME_WINDOW_BUILDER)

	enable_border
			-- Make the generate_window with decoration border
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_borderless.bit_not)
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: has_border
		end

	enable_fake_fullscreen
			-- Make the generate_window fullscreened
			-- (but without changing resolution)
			-- Note: is_fullscreen will be disable
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_fullscreen
			flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen_desktop)
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_fake_fullscreen
		end

	enable_fullscreen
			-- Make the generate_window fullscreened
			-- Note: is_fake_fullscreen will be disable
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_fake_fullscreen
			flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen)
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_fullscreen
			is_fake_fullscreen_disabled: not is_fake_fullscreen
		end

	enable_hidden
			-- Make the generate_window hidden at creation
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_hidden)
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_hidden
		end

	enable_input_grabbed
			-- Make the generate_window grab all input
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_input_grabbed)
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_input_grabbed
		end

	enable_maximized
			-- Make the generate_window maximized at creation
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_maximized)
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_maximized
		end

	enable_minimized
			-- Make the generate_window minimized at creation
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_minimized)
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_minimized
		end

	enable_must_renderer_be_hardware_accelerated
			-- The initial renderer of the generate_window will
			-- be hardware accelerated
			-- Note: Will unset renderer_driver
		do
			must_renderer_be_hardware_accelerated := True
			disable_no_default_renderer
			unset_renderer_driver
		ensure
			is_set: must_renderer_be_hardware_accelerated
			is_renderer_driver_void: not attached renderer_driver
			is_default_renderer_disabled: not no_default_renderer
		end

	enable_must_renderer_be_software_rendering
			-- The initial renderer of the generate_window will
			-- be a software renderer
			-- Note: Will unset renderer_driver
		do
			must_renderer_be_software_rendering := True
			disable_no_default_renderer
			unset_renderer_driver
		ensure
			is_set: must_renderer_be_software_rendering
			is_renderer_driver_void: not attached renderer_driver
			is_default_renderer_disabled: not no_default_renderer
		end

	enable_must_renderer_support_texture_target
			-- The initial renderer of the generate_window will
			-- support texture as rendering target or trigger an error.
			-- Note: Will unset renderer_driver
		do
			must_renderer_support_texture_target := True
			disable_no_default_renderer
			unset_renderer_driver
		ensure
			is_set: must_renderer_support_texture_target
			is_renderer_driver_void: not attached renderer_driver
			is_default_renderer_disabled: not no_default_renderer
		end

	enable_must_renderer_synchronize_update
			-- The initial renderer of the generate_window will
			-- support synchronization of the window update and the
			-- refresh rate.
			-- Note: Will unset renderer_driver
		do
			must_renderer_synchronize_update := True
			disable_no_default_renderer
			unset_renderer_driver
		ensure
			is_set: must_renderer_synchronize_update
			is_renderer_driver_void: not attached renderer_driver
			is_default_renderer_disabled: not no_default_renderer
		end

	enable_no_default_renderer
			-- The initial renderer of the generate_window will
			-- support texture as rendering target or trigger an error.
			-- Note: Will unset renderer_driver and will disable
			-- must_renderer_support_texture_target,
			-- must_renderer_synchronize_update,
			-- must_renderer_be_software_rendering and
			-- must_renderer_be_hardware_accelerated
		do
			no_default_renderer := True
			unset_renderer_driver
			disable_must_renderer_support_texture_target
			disable_must_renderer_synchronize_update
			disable_must_renderer_be_software_rendering
			disable_must_renderer_be_hardware_accelerated
		ensure
			is_set: no_default_renderer
			is_renderer_driver_void: not attached renderer_driver
			is_must_renderer_support_texture_target_disabled: not must_renderer_support_texture_target
			is_must_renderer_synchronize_update_disabled: not must_renderer_synchronize_update
			is_must_renderer_be_software_rendering_disabled: not must_renderer_be_software_rendering
			is_must_renderer_be_hardware_accelerated_disabled: not must_renderer_be_hardware_accelerated
		end

	enable_position_centered
			-- On creation, center the horizontal and vertical
			-- position of the generate_window
			-- (from GAME_WINDOW_BUILDER)
		do
			enable_position_x_centered
			enable_position_y_centered
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_position_centered
			is_undefine_not_set: not is_position_undefined
		end

	enable_position_undefined
			-- create generate_window so that the horizontal and
			-- vertical position does not matter
			-- Note: If display is not Void, the window will appear on it
			-- (from GAME_WINDOW_BUILDER)
		do
			enable_position_x_undefined
			enable_position_y_undefined
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_position_undefined
			is_centered_not_set: not is_position_centered
		end

	enable_position_x_centered
			-- On creation, center the horizontal position of the
			-- generate_window
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_position_x_undefined
			is_position_x_centered := True
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_position_x_centered
			is_undefine_not_set: not is_position_x_undefined
		end

	enable_position_x_undefined
			-- create generate_window so that the horizontal position
			-- does not matter
			-- Note: If display is not Void, the window will appear on it
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_position_x_centered
			is_position_x_undefined := True
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_position_x_undefined
			is_centered_not_set: not is_position_x_centered
		end

	enable_position_y_centered
			-- On creation, center the vertical position of the
			-- generate_window
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_position_y_undefined
			is_position_y_centered := True
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_position_y_centered
			is_undefine_not_set: not is_position_y_undefined
		end

	enable_position_y_undefined
			-- create generate_window so that the vertical position
			-- does not matter
			-- Note: If display is not Void, the window will appear on it
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_position_y_centered
			is_position_y_undefined := True
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_position_y_undefined
			is_centered_not_set: not is_position_y_centered
		end

	enable_resizable
			-- Make the generate_window resizable
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_resizable)
		ensure -- from GAME_WINDOW_BUILDER
			is_enabled: is_resizable
		end

	flags: NATURAL_32 assign set_flags
			-- The internal GAME_WINDOW create flags
			-- Note: Normally, you should not have to mess with this,
			-- Do it only if you know what you are doing.
			-- Default: 0
			-- (from GAME_WINDOW_BUILDER)

	Game_library: GAME_LIBRARY_CONTROLLER
			-- The main controller of the game library
			-- (from GAME_LIBRARY_SHARED)
		once ("PROCESS")
			if attached internal_game_library as la_game_library then
				Result := la_game_library
			else
				create Result
			end
		end

	generate_window: GAME_WINDOW_RENDERED
			-- The GAME_WINDOW_RENDERED that fit all
			-- attributes of Current
		require -- from GAME_WINDOW_BUILDER
			game_screen_video_enabled: Game_library.is_video_enable
		do
			if no_default_renderer then
				create Result.make (title, display, is_position_x_centered, is_position_y_centered, is_position_x_undefined, is_position_y_undefined, position_x, position_y, width, height, flags)
			elseif attached renderer_driver as la_driver then
				create Result.make_from_driver (title, display, is_position_x_centered, is_position_y_centered, is_position_x_undefined, is_position_y_undefined, position_x, position_y, width, height, flags, la_driver)
			else
				create Result.make_from_constraint (title, display, is_position_x_centered, is_position_y_centered, is_position_x_undefined, is_position_y_undefined, position_x, position_y, width, height, flags, must_renderer_support_texture_target, must_renderer_synchronize_update, must_renderer_be_software_rendering, must_renderer_be_hardware_accelerated)
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_created: Result.has_error or Result.exists
		end

	generating_type: TYPE [detachable GAME_WINDOW_RENDERED_BUILDER]
			-- Type of current object
			-- (type of which it is a direct instance)
			-- (from ANY)
		external
			"built_in"
		ensure -- from ANY
			generating_type_not_void: Result /= Void
		end

	generator: STRING_8
			-- Name of current object's generating class
			-- (base class of the type of which it is a direct instance)
			-- (from ANY)
		external
			"built_in"
		ensure -- from ANY
			generator_not_void: Result /= Void
			generator_not_empty: not Result.is_empty
		end

	has_border: BOOLEAN assign set_has_border
			-- Is the generate_window will have
			-- decoration border
			-- Default: True
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_borderless) = 0
		end

	height: INTEGER_32 assign set_height
			-- The horizontal dimension of the generate_window
			-- at creation
			-- Default: 600
			-- (from GAME_WINDOW_BUILDER)

	is_fake_fullscreen: BOOLEAN assign set_is_fake_fullscreen
			-- Is the generate_window will be fullscreened
			-- (but without changing resolution)
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen_desktop) = {GAME_SDL_EXTERNAL}.sdl_window_fullscreen_desktop
		end

	is_fullscreen: BOOLEAN assign set_is_fullscreen
			-- Is the generate_window will be fullscreened
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen) /= 0
		end

	is_hidden: BOOLEAN assign set_is_hidden
			-- Is the generate_window will be
			-- hidden at creation
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_hidden) /= 0
		end

	is_input_grabbed: BOOLEAN assign set_is_input_grabbed
			-- Is the generate_window will grab
			-- all input
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_input_grabbed) /= 0
		end

	is_maximized: BOOLEAN assign set_is_maximized
			-- Is the generate_window will be
			-- maximized at creation
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_maximized) /= 0
		end

	is_minimized: BOOLEAN assign set_is_minimized
			-- Is the generate_window will be
			-- minimized at creation
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_minimized) /= 0
		end

	is_position_centered: BOOLEAN assign set_is_position_centered
			-- Is the generate_window will be horizontally
			-- and vertically centered in the display
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := is_position_x_centered and is_position_y_centered
		end

	is_position_undefined: BOOLEAN assign set_is_position_undefined
			-- Is the horizontal and vertical position of generate_window
			-- does not matters
			-- Note: If display is not Void, the window will appear on it
			-- Default: True
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := is_position_x_undefined and is_position_y_undefined
		end

	is_position_x_centered: BOOLEAN assign set_is_position_x_centered
			-- Is the generate_window will be horizontally
			-- centered in the display
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)

	is_position_x_undefined: BOOLEAN assign set_is_position_x_undefined
			-- Is the horizontal position of generate_window
			-- does not matters
			-- Note: If display is not Void, the window will appear on it
			-- Default: True
			-- (from GAME_WINDOW_BUILDER)

	is_position_y_centered: BOOLEAN assign set_is_position_y_centered
			-- Is the generate_window will be vertically
			-- centered in the display
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)

	is_position_y_undefined: BOOLEAN assign set_is_position_y_undefined
			-- Is the vertical position of generate_window
			-- does not matters
			-- Note: If display is not Void, the window will appear on it
			-- Default: True
			-- (from GAME_WINDOW_BUILDER)

	is_resizable: BOOLEAN assign set_is_resizable
			-- Is the generate_window will be resizable
			-- Default: False
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_resizable) /= 0
		end

	must_renderer_be_hardware_accelerated: BOOLEAN assign set_must_renderer_support_texture_target
			-- The initial renderer of the generate_window
			-- must be hardware accelerated

	must_renderer_be_software_rendering: BOOLEAN assign set_must_renderer_support_texture_target
			-- The initial renderer of the generate_window
			-- must be a software renderer

	must_renderer_support_texture_target: BOOLEAN assign set_must_renderer_support_texture_target
			-- The initial renderer of the generate_window
			-- must support texture as rendering target.

	must_renderer_synchronize_update: BOOLEAN assign set_must_renderer_support_texture_target
			-- The initial renderer of the generate_window
			-- must support synchronization of the window update
			-- and the refresh rate.

	no_default_renderer: BOOLEAN assign set_no_default_renderer
			-- The generate_window won't have any GAME_RENDERER initialized
			-- at creation. If False, renderer_driver,
			-- must_renderer_support_texture_target,
			-- must_renderer_synchronize_update,
			-- must_renderer_be_software_rendering and
			-- must_renderer_be_hardware_accelerated will be
			-- ignored

	position: TUPLE [x: INTEGER_32; y: INTEGER_32]
			-- The position of the generate_window at
			-- creation
			-- Default: [0,0] (unused -> undefined by default)
			-- (from GAME_WINDOW_BUILDER)
		do
			Result := [position_x, position_y]
		end

	position_x: INTEGER_32 assign set_position_x
			-- The vertical position that the generate_window
			-- will be create at.
			-- Note: If position_x_centered is set, this value
			-- is not used.
			-- Default: 0 (unused -> undefined by default)
			-- (from GAME_WINDOW_BUILDER)

	position_y: INTEGER_32 assign set_position_y
			-- The horizontal position that the generate_window
			-- will be create at.
			-- Note: If position_y_centered is set, this value
			-- is not used.
			-- Default: 0 (unused -> undefined by default)
			-- (from GAME_WINDOW_BUILDER)

	renderer_driver: detachable GAME_RENDERER_DRIVER
			-- The initial renderer of the generate_window
			-- Note: if this is not Void, Current will ignore
			-- must_renderer_support_texture_target,
			-- must_renderer_synchronize_update and
			-- must_renderer_be_hardware_accelerated

	set_dimension (a_width, a_height: INTEGER_32)
			-- assign to dimension the value of a_width and a_height
			-- (from GAME_WINDOW_BUILDER)
		require -- from GAME_WINDOW_BUILDER
			width_valid: a_width > 0
			height_valid: a_height > 0
		do
			set_width (a_width)
			set_height (a_height)
		ensure -- from GAME_WINDOW_BUILDER
			is_set: dimension.width = a_width and dimension.height = a_height
		end

	set_display (a_display: detachable GAME_DISPLAY)
			-- assign to display the value of a_display
			-- (from GAME_WINDOW_BUILDER)
		do
			display := a_display
		ensure -- from GAME_WINDOW_BUILDER
			is_set: display ~ a_display
		end

	set_flags (a_flags: NATURAL_32)
			-- Assing to flags the value of a_flags
			-- Note: Normally, you should not have to mess with this,
			-- Do it only if you know what you are doing.
			-- (from GAME_WINDOW_BUILDER)
		do
			flags := a_flags
		ensure -- from GAME_WINDOW_BUILDER
			is_set: flags = a_flags
		end

	set_has_border (a_value: BOOLEAN)
			-- Assign to has_border the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_border
			else
				disable_border
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: has_border ~ a_value
		end

	set_height (a_height: INTEGER_32)
			-- Assign to height the value of a_height
			-- (from GAME_WINDOW_BUILDER)
		require -- from GAME_WINDOW_BUILDER
			height_valid: a_height > 0
		do
			height := a_height
		ensure -- from GAME_WINDOW_BUILDER
			is_set: height = a_height
		end

	set_is_fake_fullscreen (a_value: BOOLEAN)
			-- Assign to is_fake_fullscreen the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_fake_fullscreen
			else
				disable_fake_fullscreen
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_fake_fullscreen ~ a_value
		end

	set_is_fullscreen (a_value: BOOLEAN)
			-- Assign to is_fullscreen the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_fullscreen
			else
				disable_fullscreen
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_fullscreen ~ a_value
		end

	set_is_hidden (a_value: BOOLEAN)
			-- Assign to is_hidden the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_hidden
			else
				disable_hidden
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_hidden ~ a_value
		end

	set_is_input_grabbed (a_value: BOOLEAN)
			-- Assign to is_input_grabbed the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_input_grabbed
			else
				disable_input_grabbed
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_input_grabbed ~ a_value
		end

	set_is_maximized (a_value: BOOLEAN)
			-- Assign to is_maximized the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_maximized
			else
				disable_maximized
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_maximized ~ a_value
		end

	set_is_minimized (a_value: BOOLEAN)
			-- Assign to is_minimized the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_minimized
			else
				disable_minimized
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_minimized ~ a_value
		end

	set_is_position_centered (a_value: BOOLEAN)
			-- Assign to is_position_centered the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_position_centered
			else
				disable_position_centered
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_position_centered ~ a_value
		end

	set_is_position_undefined (a_value: BOOLEAN)
			-- Assign to is_position_undefined the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_position_undefined
			else
				disable_position_undefined
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_position_undefined ~ a_value
		end

	set_is_position_x_centered (a_value: BOOLEAN)
			-- Assign to is_position_x_centered the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_position_x_centered
			else
				disable_position_x_centered
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_position_x_centered ~ a_value
		end

	set_is_position_x_undefined (a_value: BOOLEAN)
			-- Assign to is_position_x_undefined the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_position_x_undefined
			else
				disable_position_x_undefined
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_position_x_undefined ~ a_value
		end

	set_is_position_y_centered (a_value: BOOLEAN)
			-- Assign to is_position_y_centered the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_position_y_centered
			else
				disable_position_y_centered
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_position_y_centered ~ a_value
		end

	set_is_position_y_undefined (a_value: BOOLEAN)
			-- Assign to is_position_y_undefined the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_position_y_undefined
			else
				disable_position_y_undefined
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_position_y_undefined ~ a_value
		end

	set_is_resizable (a_value: BOOLEAN)
			-- Assign to is_resizable the value of a_value
			-- (from GAME_WINDOW_BUILDER)
		do
			if a_value then
				enable_resizable
			else
				disable_resizable
			end
		ensure -- from GAME_WINDOW_BUILDER
			is_assign: is_resizable ~ a_value
		end

	set_must_renderer_be_hardware_accelerated (a_value: BOOLEAN)
			-- Assign to must_renderer_be_hardware_accelerated the value of a_value
		do
			if a_value then
				enable_must_renderer_be_hardware_accelerated
			else
				disable_must_renderer_be_hardware_accelerated
			end
		ensure
			is_assign: must_renderer_be_hardware_accelerated ~ a_value
		end

	set_must_renderer_be_software_rendering (a_value: BOOLEAN)
			-- Assign to must_renderer_be_software_rendering the value of a_value
		do
			if a_value then
				enable_must_renderer_be_software_rendering
			else
				disable_must_renderer_be_software_rendering
			end
		ensure
			is_assign: must_renderer_be_software_rendering ~ a_value
		end

	set_must_renderer_support_texture_target (a_value: BOOLEAN)
			-- Assign to must_renderer_support_texture_target the value of a_value
		do
			if a_value then
				enable_must_renderer_support_texture_target
			else
				disable_must_renderer_support_texture_target
			end
		ensure
			is_assign: must_renderer_support_texture_target ~ a_value
		end

	set_must_renderer_synchronize_update (a_value: BOOLEAN)
			-- Assign to must_renderer_synchronize_update the value of a_value
		do
			if a_value then
				enable_must_renderer_synchronize_update
			else
				disable_must_renderer_synchronize_update
			end
		ensure
			is_assign: must_renderer_synchronize_update ~ a_value
		end

	set_no_default_renderer (a_value: BOOLEAN)
			-- Assign to no_default_renderer the value of a_value
		do
			if a_value then
				enable_no_default_renderer
			else
				disable_no_default_renderer
			end
		ensure
			is_assign: no_default_renderer ~ a_value
		end

	set_position (a_x, a_y: INTEGER_32)
			-- Assign to position the values of a_x and a_y
			-- Note: disable is_position_x_centered,
			-- is_position_y_centered and is_position_centered
			-- (from GAME_WINDOW_BUILDER)
		do
			set_position_x (a_x)
			set_position_y (a_y)
		ensure -- from GAME_WINDOW_BUILDER
			is_set: position.x = a_x and position.y = a_y
			is_not_centered: not is_position_x_centered and not is_position_y_centered
			is_not_undefine: not is_position_x_undefined and not is_position_y_undefined
		end

	set_position_x (a_position_x: INTEGER_32)
			-- Assign to position_x the value of a_position_x
			-- note: disable is_position_x_centered and
			-- is_position_centered
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_position_x_centered
			disable_position_x_undefined
			position_x := a_position_x
		ensure -- from GAME_WINDOW_BUILDER
			is_set: position_x = a_position_x
			not_centered: not is_position_x_centered
			not_undefined: not is_position_x_undefined
		end

	set_position_y (a_position_y: INTEGER_32)
			-- Assign to position_y the value of a_position_y
			-- note: disable is_position_y_centered and
			-- is_position_centered
			-- (from GAME_WINDOW_BUILDER)
		do
			disable_position_y_centered
			disable_position_y_undefined
			position_y := a_position_y
		ensure -- from GAME_WINDOW_BUILDER
			is_set: position_y = a_position_y
			not_centered: not is_position_y_centered
			not_undefined: not is_position_y_undefined
		end

	set_renderer_driver (a_renderer_driver: detachable GAME_RENDERER_DRIVER)
			-- Assign to renderer_driver the value of a_renderer_driver
		do
			renderer_driver := a_renderer_driver
		ensure
			is_set: renderer_driver ~ a_renderer_driver
		end

	set_title (a_title: READABLE_STRING_GENERAL)
			-- Assign to title the value of a_title
			-- (from GAME_WINDOW_BUILDER)
		do
			title := a_title
		ensure -- from GAME_WINDOW_BUILDER
			is_set: title ~ a_title
		end

	set_width (a_width: INTEGER_32)
			-- Assign to width the value of a_width
			-- (from GAME_WINDOW_BUILDER)
		require -- from GAME_WINDOW_BUILDER
			width_valid: a_width > 0
		do
			width := a_width
		ensure -- from GAME_WINDOW_BUILDER
			is_set: width = a_width
		end

	title: READABLE_STRING_GENERAL assign set_title
			-- The caption used to represent the generate_window
			-- Default: Empty string
			-- (from GAME_WINDOW_BUILDER)

	unset_display
			-- Remove the previously set display
			-- (from GAME_WINDOW_BUILDER)
		do
			set_display (Void)
		ensure -- from GAME_WINDOW_BUILDER
			is_unset: not attached display
		end

	unset_renderer_driver
			-- Assign to renderer_driver the Void value
		do
			set_renderer_driver (Void)
		ensure
			is_unset: not attached renderer_driver
		end

	width: INTEGER_32 assign set_width
			-- The vertical dimension of the generate_window
			-- at creation
			-- Default: 800
			-- (from GAME_WINDOW_BUILDER)
	
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)
		do
			if a = Void then
				Result := b = Void
			else
				Result := b /= Void and then a.is_deep_equal (b)
			end
		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)
		end

	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)
		do
			if a = Void then
				Result := b = Void
			else
				Result := b /= Void and then a.is_equal (b)
			end
		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))
		end

	frozen is_deep_equal alias "≡≡≡" (other: GAME_WINDOW_RENDERED_BUILDER): BOOLEAN
			-- Are Current and other attached to isomorphic object structures?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		external
			"built_in"
		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)
		end

	is_equal (other: GAME_WINDOW_RENDERED_BUILDER): BOOLEAN
			-- Is other attached to an object considered
			-- equal to current object?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		external
			"built_in"
		ensure -- from ANY
			symmetric: Result implies other ~ Current
			consistent: standard_is_equal (other) implies Result
		end

	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)
		do
			if a = Void then
				Result := b = Void
			else
				Result := b /= Void and then a.standard_is_equal (b)
			end
		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))
		end

	frozen standard_is_equal alias "" (other: GAME_WINDOW_RENDERED_BUILDER): 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
		external
			"built_in"
		ensure -- from ANY
			same_type: Result implies same_type (other)
			symmetric: Result implies other.standard_is_equal (Current)
		end
	
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
		external
			"built_in"
		end

	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
		external
			"built_in"
		ensure -- from ANY
			definition: Result = (conforms_to (other) and other.conforms_to (Current))
		end
	
feature -- Duplication

	frozen clone (other: detachable ANY): like other
		obsolete "Use `twin' instead. [2017-05-31]"
			-- Void if other is void; otherwise new object
			-- equal to other
			--
			-- For non-void other, clone calls copy;
			-- to change copying/cloning semantics, redefine copy.
			-- (from ANY)
		do
			if other /= Void then
				Result := other.twin
			end
		ensure -- from ANY
			instance_free: class
			equal: Result ~ other
		end

	copy (other: GAME_WINDOW_RENDERED_BUILDER)
			-- 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)
		external
			"built_in"
		ensure -- from ANY
			is_equal: Current ~ other
		end

	frozen deep_clone (other: detachable ANY): like other
		obsolete "Use `deep_twin' instead. [2017-05-31]"
			-- Void if other is void: otherwise, new object structure
			-- recursively duplicated from the one attached to other
			-- (from ANY)
		do
			if other /= Void then
				Result := other.deep_twin
			end
		ensure -- from ANY
			instance_free: class
			deep_equal: deep_equal (other, Result)
		end

	frozen deep_copy (other: GAME_WINDOW_RENDERED_BUILDER)
			-- Effect equivalent to that of:
			--		copy (other . deep_twin)
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		do
			copy (other.deep_twin)
		ensure -- from ANY
			deep_equal: deep_equal (Current, other)
		end

	frozen deep_twin: GAME_WINDOW_RENDERED_BUILDER
			-- New object structure recursively duplicated from Current.
			-- (from ANY)
		external
			"built_in"
		ensure -- from ANY
			deep_twin_not_void: Result /= Void
			deep_equal: deep_equal (Current, Result)
		end

	frozen standard_clone (other: detachable ANY): like other
		obsolete "Use `standard_twin' instead. [2017-05-31]"
			-- Void if other is void; otherwise new object
			-- field-by-field identical to other.
			-- Always uses default copying semantics.
			-- (from ANY)
		do
			if other /= Void then
				Result := other.standard_twin
			end
		ensure -- from ANY
			instance_free: class
			equal: standard_equal (Result, other)
		end

	frozen standard_copy (other: GAME_WINDOW_RENDERED_BUILDER)
			-- 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)
		external
			"built_in"
		ensure -- from ANY
			is_standard_equal: standard_is_equal (other)
		end

	frozen standard_twin: GAME_WINDOW_RENDERED_BUILDER
			-- New object field-by-field identical to other.
			-- Always uses default copying semantics.
			-- (from ANY)
		external
			"built_in"
		ensure -- from ANY
			standard_twin_not_void: Result /= Void
			equal: standard_equal (Result, Current)
		end

	frozen twin: GAME_WINDOW_RENDERED_BUILDER
			-- New object equal to Current
			-- twin calls copy; to change copying/twinning semantics, redefine copy.
			-- (from ANY)
		external
			"built_in"
		ensure -- from ANY
			twin_not_void: Result /= Void
			is_equal: Result ~ Current
		end
	
feature -- Basic operations

	frozen as_attached: attached GAME_WINDOW_RENDERED_BUILDER
		obsolete "Remove calls to this feature. [2017-05-31]"
			-- Attached version of Current.
			-- (Can be used during transitional period to convert
			-- non-void-safe classes to void-safe ones.)
			-- (from ANY)
		do
			Result := Current
		end

	frozen default: detachable GAME_WINDOW_RENDERED_BUILDER
			-- Default value of object's type
			-- (from ANY)
		do
		end

	frozen default_pointer: POINTER
			-- Default value of type POINTER
			-- (Avoid the need to write p.default for
			-- some p of type POINTER.)
			-- (from ANY)
		do
		ensure -- from ANY
			instance_free: class
		end

	default_rescue
			-- Process exception for routines with no Rescue clause.
			-- (Default: do nothing.)
			-- (from ANY)
		do
		end

	frozen do_nothing
			-- Execute a null action.
			-- (from ANY)
		do
		ensure -- from ANY
			instance_free: class
		end
	
feature {NONE} -- Implementation

	internal_game_library: detachable GAME_LIBRARY_CONTROLLER
			-- Assign to this attribute prior to use Game_library to inject a specific GAME_LIBRARY_CONTROLLER singleton.
			-- (from GAME_LIBRARY_SHARED)
	
feature -- Output

	Io: STD_FILES
			-- Handle to standard file setup
			-- (from ANY)
		once
			create Result;
			Result.set_output_default
		ensure -- from ANY
			instance_free: class
			io_not_void: Result /= Void
		end

	out: STRING_8
			-- New string containing terse printable representation
			-- of current object
			-- (from ANY)
		do
			Result := tagged_out
		ensure -- from ANY
			out_not_void: Result /= Void
		end

	print (o: detachable ANY)
			-- Write terse external representation of o
			-- on standard output.
			-- (from ANY)
		local
			s: READABLE_STRING_8
		do
			if attached o then
				s := o.out
				if attached {READABLE_STRING_32} s as s32 then
					Io.put_string_32 (s32)
				elseif attached {READABLE_STRING_8} s as s8 then
					Io.put_string (s8)
				else
					Io.put_string_32 (s.as_string_32)
				end
			end
		ensure -- from ANY
			instance_free: class
		end

	frozen tagged_out: STRING_8
			-- New string containing terse printable representation
			-- of current object
			-- (from ANY)
		external
			"built_in"
		ensure -- from ANY
			tagged_out_not_void: Result /= Void
		end
	
feature -- Platform

	Operating_environment: OPERATING_ENVIRONMENT
			-- Objects available from the operating system
			-- (from ANY)
		once
			create Result
		ensure -- from ANY
			instance_free: class
			operating_environment_not_void: Result /= Void
		end
	
feature {NONE} -- Retrieval

	frozen internal_correct_mismatch
			-- Called from runtime to perform a proper dynamic dispatch on correct_mismatch
			-- from MISMATCH_CORRECTOR.
			-- (from ANY)
		local
			l_msg: STRING_32
			l_exc: EXCEPTIONS
		do
			if attached {MISMATCH_CORRECTOR} Current as l_corrector then
				l_corrector.correct_mismatch
			else
				create l_msg.make_from_string ("Mismatch: ".as_string_32)
				create l_exc;
				l_msg.append (generating_type.name_32);
				l_exc.raise_retrieval_exception (l_msg)
			end
		end
	
invariant
		-- from GAME_WINDOW_BUILDER
	position_is_valid: position.x = position_x and position.y = position_y
	position_centered_valid: is_position_centered implies (is_position_x_centered and is_position_y_centered)
	position_undefine_valid: is_position_undefined implies (is_position_x_undefined and is_position_y_undefined)
	position_centered_undefined_valid: is_position_centered implies not is_position_undefined
	position_x_centered_undefined_valid: is_position_x_centered implies not is_position_x_undefined
	position_y_centered_undefined_valid: is_position_y_centered implies not is_position_y_undefined
	dimension_is_valid: dimension.width = width and dimension.height = height

		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class GAME_WINDOW_RENDERED_BUILDER

Generated by ISE EiffelStudio