COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	Copyright (c) Palm Computing 1994 -- All Rights Reserved

PROJECT:	Zoomer
MODULE:		
FILE:		keyControl.def

AUTHOR:		Art Lamb, Jun  8, 1994

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	art	6/ 8/94		Initial revision

DESCRIPTION:
	Object definitions for KKeyboardControlClasseyboardControlClass
		
	$Id: keyControl.def,v 1.1 97/04/04 14:20:08 newdeal Exp $

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@

SetDef	__KEY_CONTROL

StartLibrary	key

KeyboardControlClass         class   GenControlClass

;
; Message(s) sent out:
; MSG_META_NOTIFY_WITH_DATA_BLOCK w/ GWNT_TEXT_REPLACE_WITH_HWR
; MSG_META_DELETE_RANGE_OF_CHARS
; 
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_OBJECT_HAS_FOCUS
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CONTEXT
; MANUFACTURER_ID_GEOWORKS.GWNT_INK
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS
;

;------------------------------------------------------------------------------
;       Methods
;------------------------------------------------------------------------------

MSG_KEYBOARD_CONTROL_SET_DISPLAY	message 
;
; Set the display mode (keyboard or  graffiti writing area).
;
; Pass:		cl - KeyboardControlDisplayMode
; Return:	nothing
; Destroyed:	ax, cx, dx, bp
;


; MSG_KEYBOARD_CONTROL_GET_DISPLAY		message 
;
; Get the current keybaord display (need not be visisble)
;
; Pass:		nothing
; Return: 	
; Destroyed:	ax, dx, bp
;


MSG_KEYBOARD_CONTROL_SHOW_HIDE_CONTROLS		message
;
; Show or hide the graffiti controls which consist of the
; cap-lock, num-lock, cursor-left, cursor-right, and the help
; ui objects. 
;
; Pass:		cx - non-zero to show graffiti controls
; Return: 	nothing
; Destroyed:	ax, cx, dx, bp


MSG_KEYBOARD_CONTROL_SET_LOCK_STATE		message
;
; Set the cap-lock and num-lock state of the HWR library.
; This message is sent by the "lock state" ui gadgets when they
; are toggled by the user.
;
; Pass:		cx - GraffitiShiftState
; Return: 	nothing
; Destroyed:	ax, dx, bp


MSG_KEYBOARD_CONTROL_SET_TEMPORARY_SHIFT_STATE		message
;
; Update the display of the punctuation shift, extended shift or case shift
; indicators.
;
; Pass:		cx - HWRTemporaryShiftState
; Return: 	nothing
; Destroyed:	ax, dx, bp


MSG_KEYBOARD_CONTROL_INITIATE_HELP		message
;
; Display help for the graffiti keyboard.
;
; Pass:		nothing
; Return: 	nothing
; Destroyed:	ax, cx, dx, bp

MSG_KEYBOARD_CONTROL_SEND_KEY			message
;
; Send keyboard character to focus app.
;
; Pass:		<same as MSG_META_KBD_CHAR>
; Return:	nothing
; Destroyed:	ax, cx, dx, bp

MSG_KEYBOARD_CONTROL_TOGGLE_COLLAPSED_MODE		message
;
; Toggle display of status functions in minimal space.
;
; Pass:		nothing
; Return:	nothing
; Destroyed:	ax, cx, dx, bp

;------------------------------------------------------------------------------
;       Constants and structures
;------------------------------------------------------------------------------
;
; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)
;
KBDFeatures	record
    KBDF_KEYBOARD:1
    KBDF_DISPLAY_CONTROLS:1
KBDFeatures	end

KBD_DEFAULT_FEATURES equ mask KBDF_KEYBOARD

;
; Display modes of the KeyboardControl objects.
;
KeyboardControlDisplayMode		etype	byte
	KCDM_WRITING_AREA		enum	KeyboardControlDisplayMode
	KCDM_WRITING_AREA_NO_CONTROLS	enum	KeyboardControlDisplayMode
	KCDM_KEYBOARD			enum	KeyboardControlDisplayMode

;
; State of the cap-lock and shift-lock indicators.  This structure must
; be keeped in sync with the HWRLockState structure.
;
GraffitiShiftState	record
	:13
	GSS_EQN_LOCK:1
	GSS_NUM_LOCK:1
	GSS_CAPS_LOCK:1
GraffitiShiftState	end


;------------------------------------------------------------------------------
;	Var data
;------------------------------------------------------------------------------
ATTR_KEYBOARD_CONTROL_GRAFFITI_BOUNDS	vardata	Rectangle
;
; The bounds of the controller when it was last display in graffiti input
; mode.  This infomation is keep so that the controller's position and size 
; can be restored when it is switch from keyboard mode back to graffiti 
; mode.  The var data is for internal uses only.

TEMP_KEYBOARD_CONTROL_DIALOG	vardata	optr
;
; Internal use only.


;------------------------------------------------------------------------------
;       Instance data
;------------------------------------------------------------------------------

KCI_mode	KeyboardControlDisplayMode	KCDM_WRITING_AREA


KeyboardControlClass          endc
EndLibrary	key
