indexing
	description: "Basic Windows routines."
	status: "See notice at end of class."
	date: "$Date$"
	revision: "$Revision$"

class interface
	WEL_WINDOWS_ROUTINES

feature -- Status report

	foreground_window: WEL_WINDOW
			-- Foreground window (window with focus)

	is_window (hwnd: POINTER): BOOLEAN
			-- Does hwnd point to a valid Window?

	key_down (virtual_key: INTEGER): BOOLEAN
			--Is 'virtual' key pressed

	key_locked (virtual_key: INTEGER): BOOLEAN
			--Is 'virtual' key locked

	key_to_string (key_data: INTEGER): STRING
			-- Give the string associated with the key given by
			-- virtual_key.

	system_directory: STRING
			-- Path of the Windows system directory
		ensure
			result_not_void: Result /= void

	tick_count: INTEGER
			-- Number of milliseconds that have
			-- elapsed since Windows was started.
		ensure
			positive_result: Result >= 0

	window_of_item (hwnd: POINTER): WEL_WINDOW
			-- Retrieve Eiffel object associated with hwnd pointer.
		require
			hwnd_not_null: hwnd /= default_pointer
			is_window_pointer: is_window (hwnd)
		ensure
			is_wel_window: Result /= void implies (create {INTERNAL}).type_conforms_to ((create {INTERNAL}).dynamic_type (Result), (create {INTERNAL}).dynamic_type_from_string ("WEL_WINDOW"))

	windows_directory: STRING
			-- Path of the Windows directory
		ensure
			result_not_void: Result /= void
	
feature -- Basic operations

	hide_cursor
			-- Hide the cursor.

	message_beep_asterisk
			-- Play the system asterisk waveform sound.

	message_beep_exclamation
			-- Play the system exclamation waveform sound.

	message_beep_hand
			-- Play the system hand waveform sound.

	message_beep_ok
			-- Play the system ok waveform sound.

	message_beep_question
			-- Play the system question waveform sound.

	output_debug_string (s: STRING)
			-- Send a string s to the system debugger.
		require
			s_not_void: s /= void

	resource_string_id (an_id: INTEGER): STRING
			-- String identified by an_id in the resource file.
		ensure
			result_not_void: Result /= void

	set_cursor_position_absolute (x, y: INTEGER)
			-- Set the cursor position to x, y.

	show_cursor
			-- Show the cursor.
	
invariant

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

end -- class WEL_WINDOWS_ROUTINES