indexing
	description: "Process creation startup information."
	status: "See notice at end of class."
	date: "$Date$"
	revision: "$Revision$"

class interface
	WEL_STARTUP_INFO

create 

	make
			-- Allocate item
			-- (from WEL_STRUCTURE)
		ensure -- from WEL_STRUCTURE
			not_shared: not shared

feature -- Access

	background_blue: INTEGER
			-- Add blue to background
			-- (from WEL_FILL_ATTRIBUTES_CONSTANTS)

	background_green: INTEGER
			-- Add green to background
			-- (from WEL_FILL_ATTRIBUTES_CONSTANTS)

	background_intensity: INTEGER
			-- Increase console background intensity
			-- (from WEL_FILL_ATTRIBUTES_CONSTANTS)

	background_red: INTEGER
			-- Add red to background
			-- (from WEL_FILL_ATTRIBUTES_CONSTANTS)

	fill_attributes: INTEGER
			-- Color used for background and text of a console application
			-- See class WEL_FILL_ATTRIBUTE_CONSTANTS for possible value.
		require
			flag_has_startf_use_fill_attributes: flag_set (flags, startf_use_fill_attributes)

	flags: INTEGER
			-- Valid fields
			-- See WEL_STARTUP_FLAGS for possible values.

	foreground_blue: INTEGER
			-- Add blue to foreground
			-- (from WEL_FILL_ATTRIBUTES_CONSTANTS)

	foreground_green: INTEGER
			-- Add green to foreground
			-- (from WEL_FILL_ATTRIBUTES_CONSTANTS)

	foreground_intensity: INTEGER
			-- Increase console foreground intensity
			-- (from WEL_FILL_ATTRIBUTES_CONSTANTS)

	foreground_red: INTEGER
			-- Add red to foreground
			-- (from WEL_FILL_ATTRIBUTES_CONSTANTS)

	height: INTEGER
			-- Height of new window if any
		require
			flag_has_startf_use_size: flag_set (flags, startf_use_size)

	is_valid_fill_attributes (an_integer: INTEGER): BOOLEAN
			-- Is an_integer a valid fill atrtibutes?
			-- (from WEL_FILL_ATTRIBUTES_CONSTANTS)

	is_valid_startup_flag (a_flag: INTEGER): BOOLEAN
			-- Is a_flag a valid startup flag?
			-- (from WEL_STARTUP_CONSTANTS)

	is_valid_startup_flags (a_flags: INTEGER): BOOLEAN
			-- Is a_flags a valid startup flags combination?
			-- (from WEL_STARTUP_CONSTANTS)

	item: POINTER
			-- Generic Windows handle or structure pointer.
			-- Can be a HWND, HICON, RECT *, WNDCLASS *, etc...
			-- (from WEL_ANY)

	show_command: INTEGER
			-- Default show command used for a GUI application
		require
			flag_has_startf_use_show_window: flag_set (flags, startf_use_show_window)

	startf_force_off_feedback: INTEGER
			-- Feedback cursor forced off
			-- (from WEL_STARTUP_CONSTANTS)

	startf_force_on_feedback: INTEGER
			-- Cursor set to feedback until window intialization is done
			-- (from WEL_STARTUP_CONSTANTS)

	startf_use_count_chars: INTEGER
			-- Attributes x_character_count and y_character_count from WEL_STARTUP_INFO are meaningful
			-- (from WEL_STARTUP_CONSTANTS)

	startf_use_fill_attributes: INTEGER
			-- Attribute fill_attributes from WEL_STARTUP_INFO is meaningful
			-- (from WEL_STARTUP_CONSTANTS)

	startf_use_position: INTEGER
			-- Attributes x_offset and y_offset from WEL_STARTUP_INFO are meaningful
			-- (from WEL_STARTUP_CONSTANTS)

	startf_use_show_window: INTEGER
			-- Attribute show_command from WEL_STARTUP_INFO is meaningful
			-- (from WEL_STARTUP_CONSTANTS)

	startf_use_size: INTEGER
			-- Attributes width and height from WEL_STARTUP_INFO are meaningful
			-- (from WEL_STARTUP_CONSTANTS)

	startf_use_std_handles: INTEGER
			-- Attributes std_input, std_output and std_error from WEL_STARTUP_INFO are meaningful
			-- (from WEL_STARTUP_CONSTANTS)

	std_error: INTEGER
			-- Standard error output process handle
		require
			flag_has_startf_use_std_handles: flag_set (flags, startf_use_std_handles)

	std_input: INTEGER
			-- Standard input process handle
		require
			flag_has_startf_use_std_handles: flag_set (flags, startf_use_std_handles)

	std_output: INTEGER
			-- Standard output process handle
		require
			flag_has_startf_use_std_handles: flag_set (flags, startf_use_std_handles)

	title: STRING
			-- Console application title

	width: INTEGER
			-- Width of new window if any
		require
			flag_has_startf_use_size: flag_set (flags, startf_use_size)

	x_character_count: INTEGER
			-- Console application screen buffer in character columns
		require
			flag_has_startf_use_count_chars: flag_set (flags, startf_use_count_chars)

	x_offset: INTEGER
			-- X offset, in pixels, of upper left corner of window
			-- if a new window is created.
		require
			flag_has_startf_use_position: flag_set (flags, startf_use_position)

	y_character_count: INTEGER
			-- Console application screen buffer in character lines
		require
			flag_has_startf_use_count_chars: flag_set (flags, startf_use_count_chars)

	y_offset: INTEGER
			-- Y offset, in pixels, of upper left corner of window
			-- if a new window is created.
		require
			flag_has_startf_use_position: flag_set (flags, startf_use_position)
	
feature -- Status report

	exists: BOOLEAN
			-- Does the item exist?
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			Result = (item /= default_pointer)

	flag_set (flags, mask: INTEGER): BOOLEAN
			-- Is mask set in flags?
			-- (from WEL_BIT_OPERATIONS)

	shared: BOOLEAN
			-- Is item shared by another object?
			-- If False (by default), item will
			-- be destroyed by destroy_item.
			-- If True, item will not be destroyed.
			-- (from WEL_ANY)
	
feature -- Status setting

	set_shared
			-- Set shared to True.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			shared: shared

	set_unshared
			-- Set shared to False.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			unshared: not shared
	
feature -- Element change

	set_item (an_item: POINTER)
			-- Set item with an_item
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			item_set: item = an_item
	
feature -- Removal

	dispose
			-- Destroy the inner structure of Current.
			--
			-- This function should be called by the GC when the
			-- object is collected or by the user if Current is
			-- no more usefull.
			-- (from WEL_ANY)
	
feature -- Conversion

	to_integer: INTEGER
			-- Converts item to an integer.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			Result = cwel_pointer_to_integer (item)
	
feature -- Basic operations

	clear_flag (flags, mask: INTEGER): INTEGER
			-- Clear the mask in flags
			-- (from WEL_BIT_OPERATIONS)
		ensure -- from WEL_BIT_OPERATIONS
			flag_unset: not flag_set (Result, mask)

	initialize
			-- Fill Current with zeros.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			exists: exists

	initialize_with_character (a_character: CHARACTER)
			-- Fill current with a_character.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			exists: exists

	memory_copy (source_pointer: POINTER; length: INTEGER)
			-- Copy length bytes from source_pointer to item.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			length_small_enough: length <= structure_size
			length_large_enough: length > 0
			exists: exists

	set_flag (flags, mask: INTEGER): INTEGER
			-- Set the mask in flags
			-- (from WEL_BIT_OPERATIONS)
		ensure -- from WEL_BIT_OPERATIONS
			flag_set: flag_set (Result, mask)
	
feature -- Element Change

	add_flag (a_flag: INTEGER)
			-- Add a_flag to flags.
			-- See class WEL_STARTUP_FLAGS for possible a_flag value.
		require
			valid_flag: is_valid_startup_flag (a_flag)
		ensure
			flags_set: flag_set (flags, a_flag)

	set_fill_attributes (a_fill_attributes: like fill_attributes)
			-- Set fill_attributes with a_fill_attributes.
			-- See class WEL_FILL_ATTRIBUTES_CONSTANTS for possible a_fill_attributes value.
		require
			valid_fill_attributes: is_valid_fill_attributes (a_fill_attributes)
		ensure
			fill_attributes_set: fill_attributes = a_fill_attributes

	set_flags (a_flags: INTEGER)
			-- Set flags with a_flags
		require
			valid_flags: is_valid_startup_flags (a_flags)
		ensure
			flags_set: flags = a_flags

	set_height (a_height: like height)
			-- Set height with a_height.
		require
			valid_height: a_height > 0
		ensure
			height_set: height = a_height

	set_show_command (a_command: like show_command)
			-- Set show_command with a_command.
		ensure
			show_command_set: show_command = a_command

	set_std_error (an_error_output: INTEGER)
			-- Set std_error with an_error_output.
		ensure
			error_output_set: std_error = an_error_output

	set_std_input (an_input: INTEGER)
			-- Set std_input with an_input.
		ensure
			std_input_set: std_input = an_input

	set_std_output (an_output: INTEGER)
			-- Set std_output with an_output.
		ensure
			std_output_set: std_output = an_output

	set_title (a_title: like title)
			-- Set title with a_title.
		require
			non_void_title: a_title /= void
		ensure
			title_set: title.is_equal (a_title)

	set_width (a_width: like width)
			-- Set width with a_width.
		require
			valid_width: a_width > 0
		ensure
			width_set: width = a_width

	set_x_character_count (a_character_count: like x_character_count)
			-- Set character_count with a_character_count.
		require
			valid_count: a_character_count > 0
		ensure
			character_count_set: x_character_count = a_character_count

	set_x_offset (an_offset: like x_offset)
			-- Set x_offset with an_offset.
		ensure
			offset_set: x_offset = an_offset

	set_y_character_count (a_character_count: like y_character_count)
			-- Set character_count with a_character_count.
		require
			valid_count: a_character_count > 0
		ensure
			character_count_set: y_character_count = a_character_count

	set_y_offset (an_offset: like y_offset)
			-- Set y_offset with an_offset.
		ensure
			offset_set: y_offset = an_offset
	
invariant

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

end -- class WEL_STARTUP_INFO