Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

softkbd.h

Go to the documentation of this file.
00001 /**************************************************************************\ 00002 * Module Name: softkbd.h 00003 * 00004 * Copyright (c) 1985 - 1999, Microsoft Corporation 00005 * 00006 * Declarations of soft keyboard related data structures and constants 00007 * 00008 * History: 00009 * 02-Dec-1995 wkwok Ported from Win95 00010 \**************************************************************************/ 00011 #ifndef _SOFTKBD_ 00012 #define _SOFTKBD_ 00013 00014 00015 #define UI_MARGIN 4 00016 00017 00018 // T1 part 00019 #define SKT1_XIN 3 00020 #define SKT1_YIN 3 00021 #define SKT1_XOUT 1 00022 #define SKT1_YOUT 1 00023 #define SKT1_TOTAL_ROW_NUM 5 00024 #define SKT1_TOTAL_COLUMN_NUM 15 00025 #define SKT1_ENTER_ROW_NUM 2 00026 #define SKT1_XOVERLAP 2 00027 00028 #define SKT1_CONTEXT 0 00029 00030 enum SKT1_BUTTON_TYPE { 00031 SKT1_LETTER_TYPE, 00032 SKT1_BACKSPACE_TYPE, 00033 SKT1_TAB_TYPE, 00034 SKT1_CAPS_TYPE, 00035 SKT1_ENTER_TYPE, 00036 SKT1_SHIFT_TYPE, 00037 SKT1_CTRL_TYPE, 00038 SKT1_ALT_TYPE, 00039 SKT1_ESC_TYPE, 00040 SKT1_SPACE_TYPE, 00041 }; 00042 00043 #define SKT1_TOTAL_TYPE (SKT1_SPACE_TYPE + 1) 00044 00045 #define SKT1_LETTER_WIDTH_TIMES 2 00046 #define SKT1_BACKSPACE_WIDTH_TIMES 2 00047 #define SKT1_TAB_WIDTH_TIMES 3 00048 #define SKT1_CAPS_WIDTH_TIMES 4 00049 #define SKT1_ENTER_WIDTH_TIMES 3 00050 #define SKT1_SHIFT_WIDTH_TIMES 5 00051 #define SKT1_CTRL_WIDTH_TIMES 3 00052 #define SKT1_ALT_WIDTH_TIMES 3 00053 #define SKT1_ESC_WIDTH_TIMES 3 00054 #define SKT1_SPACE_WIDTH_TIMES 12 00055 00056 #define SKT1_LETTER_KEY_NUM 47 00057 #define SKT1_BACKSPACE_INDEX (SKT1_LETTER_KEY_NUM) 00058 #define SKT1_BACKSPACE_KEY_NUM 1 00059 #define SKT1_TAB_INDEX (SKT1_BACKSPACE_INDEX + SKT1_BACKSPACE_KEY_NUM) 00060 #define SKT1_TAB_KEY_NUM 1 00061 #define SKT1_CAPS_INDEX (SKT1_TAB_INDEX + SKT1_TAB_KEY_NUM) 00062 #define SKT1_CAPS_KEY_NUM 1 00063 #define SKT1_ENTER_INDEX (SKT1_CAPS_INDEX + SKT1_CAPS_KEY_NUM) 00064 #define SKT1_ENTER_KEY_NUM 1 00065 #define SKT1_SHIFT_INDEX (SKT1_ENTER_INDEX + SKT1_ENTER_KEY_NUM) 00066 #define SKT1_SHIFT_KEY_NUM 2 00067 #define SKT1_CTRL_INDEX (SKT1_SHIFT_INDEX + SKT1_SHIFT_KEY_NUM) 00068 #define SKT1_CTRL_KEY_NUM 2 00069 #define SKT1_ALT_INDEX (SKT1_CTRL_INDEX + SKT1_CTRL_KEY_NUM) 00070 #define SKT1_ALT_KEY_NUM 2 00071 #define SKT1_ESC_INDEX (SKT1_ALT_INDEX + SKT1_ALT_KEY_NUM) 00072 #define SKT1_ESC_KEY_NUM 1 00073 #define SKT1_SPACE_INDEX (SKT1_ESC_INDEX + SKT1_ESC_KEY_NUM) 00074 #define SKT1_SPACE_KEY_NUM 1 00075 #define SKT1_TOTAL_INDEX (SKT1_SPACE_INDEX + SKT1_SPACE_KEY_NUM) 00076 #define SKT1_TOTAL_KEY_NUM (SKT1_TOTAL_INDEX + 1) 00077 00078 #define SKT1_ROW1_LETTER_NUM 14 00079 #define SKT1_ROW2_LETTER_NUM 12 00080 #define SKT1_ROW3_LETTER_NUM 11 00081 #define SKT1_ROW4_LETTER_NUM 10 00082 00083 #define SKT1_LABEL_BMP_X 8 00084 #define SKT1_LABEL_BMP_Y 8 00085 00086 #define SKT1_BACKSPACE_BMP_X 16 00087 #define SKT1_BACKSPACE_BMP_Y 9 00088 #define SKT1_TAB_BMP_X 16 00089 #define SKT1_TAB_BMP_Y 9 00090 #define SKT1_CAPS_BMP_X 22 00091 #define SKT1_CAPS_BMP_Y 9 00092 #define SKT1_ENTER_BMP_X 26 00093 #define SKT1_ENTER_BMP_Y 9 00094 #define SKT1_SHIFT_BMP_X 23 00095 #define SKT1_SHIFT_BMP_Y 9 00096 #define SKT1_CTRL_BMP_X 16 00097 #define SKT1_CTRL_BMP_Y 9 00098 #define SKT1_ESC_BMP_X 18 00099 #define SKT1_ESC_BMP_Y 9 00100 #define SKT1_ALT_BMP_X 16 00101 #define SKT1_ALT_BMP_Y 9 00102 00103 #if 0 00104 #define VK_OEM_SEMICLN 0xba // ; : 00105 #define VK_OEM_EQUAL 0xbb // = + 00106 #define VK_OEM_COMMA 0xbc // , < 00107 #define VK_OEM_MINUS 0xbd // - _ 00108 #define VK_OEM_PERIOD 0xbe // . > 00109 #define VK_OEM_SLASH 0xbf // / ? 00110 #define VK_OEM_3 0xc0 // ` ~ 00111 #define VK_OEM_LBRACKET 0xdb // [ { 00112 #define VK_OEM_BSLASH 0xdc // \ | 00113 #define VK_OEM_RBRACKET 0xdd // ] } 00114 #define VK_OEM_QUOTE 0xde // ' " 00115 #endif 00116 00117 #define SKT1_NOT_DRAG 0xFFFFFFFF 00118 00119 typedef struct _tagSKT1CTXT { 00120 int nButtonWidth[SKT1_TOTAL_TYPE]; 00121 int nButtonHeight[2]; 00122 POINT ptButtonPos[SKT1_TOTAL_KEY_NUM]; 00123 WORD wCodeTable[SKT1_LETTER_KEY_NUM]; 00124 HBITMAP hSKBitmap; 00125 UINT lfCharSet; 00126 UINT uKeyIndex; 00127 POINT ptSkCursor; 00128 POINT ptSkOffset; 00129 UINT uSubType; 00130 } SKT1CTXT, *PSKT1CTXT, FAR *LPSKT1CTXT, NEAR *NPSKT1CTXT; 00131 00132 void GetSKT1TextMetric(LPTEXTMETRIC); 00133 00134 LRESULT SKWndProcT1(HWND, UINT, WPARAM, LPARAM); 00135 00136 // T2 part 00137 00138 // C1 part 00139 00140 // button constants 00141 #define ROW_LETTER_C1 4 // number of rows of letter button 00142 #define COL_LETTER_C1 13 // number of column of letter button in first row 00143 #define COL2_LETTER_C1 COL_LETTER_C1 // number of column of letter button in second row 00144 #define COL3_LETTER_C1 (COL2_LETTER_C1 - 2) // number of column of letter button in third row 00145 #define COL4_LETTER_C1 (COL3_LETTER_C1 - 1) // number of column of letter button in forth row 00146 00147 #define W_LETTER_C1 20 // width of letter button face 00148 #define H_LETTER_C1 24 // height of letter button face 00149 #define BORDER_C1 2 // the width/height of button border 00150 #define W_LETTER_BTN_C1 (W_LETTER_C1 + 2 * BORDER_C1) 00151 #define H_LETTER_BTN_C1 (H_LETTER_C1 + 2 * BORDER_C1) 00152 00153 #define H_BOTTOM_C1 20 // the height of bottom button face 00154 #define H_BOTTOM_BTN_C1 (H_BOTTOM_C1 + 2 * BORDER_C1) 00155 00156 00157 // bitmap have the same size 00158 #define W_BACKSP_C1 32 // width of Backspace button face 00159 #define H_BACKSP_C1 H_LETTER_C1 // height of Backspace button face 00160 #define W_TAB_C1 32 // width of Tab button face 00161 #define H_TAB_C1 H_LETTER_C1 // height of Tab button face 00162 #define W_CAPS_C1 38 // width of Caps button face 00163 #define H_CAPS_C1 H_LETTER_C1 // height of Caps button face 00164 #define W_ENTER_C1 38 // width of Enter button face 00165 #define H_ENTER_C1 H_LETTER_C1 // height of Enter button face 00166 #define W_SHIFT_C1 56 // width of Shift button face 00167 #define H_SHIFT_C1 H_LETTER_C1 // height of Shift button face 00168 #define W_INS_C1 34 // width of Ins button face 00169 #define H_INS_C1 H_BOTTOM_C1 // height of Ins button face 00170 #define W_DEL_C1 34 // width of Del button face 00171 #define H_DEL_C1 H_BOTTOM_C1 // height of Del button face 00172 #define W_SPACE_C1 168 // width of Space button face 00173 #define H_SPACE_C1 H_BOTTOM_C1 // height of Space button face 00174 #define W_ESC_C1 34 // width of Esc button face 00175 #define H_ESC_C1 H_BOTTOM_C1 // height of Esc button face 00176 00177 #define X_ROW_LETTER_C1 0 00178 #define X_ROW2_LETTER_C1 (W_TAB_C1 + 2 * BORDER_C1) 00179 #define X_ROW3_LETTER_C1 (W_CAPS_C1 + 2 * BORDER_C1) 00180 #define X_ROW4_LETTER_C1 (W_SHIFT_C1 + 2 * BORDER_C1) 00181 #define X_DEL_C1 58 00182 #define X_ESC_C1 310 00183 00184 #define LETTER_NUM_C1 47 // number of letter buttons 00185 #define OTHER_NUM_C1 9 // number of other buttons 00186 #define BUTTON_NUM_C1 (LETTER_NUM_C1 + OTHER_NUM_C1) // number of buttons 00187 00188 #define WIDTH_SOFTKBD_C1 (COL_LETTER_C1 * W_LETTER_BTN_C1 \ 00189 + W_BACKSP_C1 + 2 * BORDER_C1) 00190 #define HEIGHT_SOFTKBD_C1 (ROW_LETTER_C1 * H_LETTER_BTN_C1 + H_BOTTOM_BTN_C1) 00191 00192 #define BACKSP_TYPE_C1 LETTER_NUM_C1 00193 #define TAB_TYPE_C1 (BACKSP_TYPE_C1 + 1) 00194 #define CAPS_TYPE_C1 (BACKSP_TYPE_C1 + 2) 00195 #define ENTER_TYPE_C1 (BACKSP_TYPE_C1 + 3) 00196 #define SHIFT_TYPE_C1 (BACKSP_TYPE_C1 + 4) 00197 #define INS_TYPE_C1 (BACKSP_TYPE_C1 + 5) 00198 #define DEL_TYPE_C1 (BACKSP_TYPE_C1 + 6) 00199 #define SPACE_TYPE_C1 (BACKSP_TYPE_C1 + 7) 00200 #define ESC_TYPE_C1 (BACKSP_TYPE_C1 + 8) 00201 00202 // font constants 00203 #define SIZEFONT_C1 12 // 12 x 12 pixels font 00204 #define SIZELABEL_C1 8 // 8 x 8 button label 00205 00206 #define X_LABEL_C1 2 // from the button org 00207 #define Y_LABEL_C1 2 00208 #define X_SHIFT_CHAR_C1 10 00209 #define Y_SHIFT_CHAR_C1 2 00210 #define X_NONSHIFT_CHAR_C1 2 00211 #define Y_NONSHIFT_CHAR_C1 14 00212 00213 00214 // SoftKbd context 00215 #define SKC1_CONTEXT 0 00216 00217 #define FLAG_SHIFT_C1 0x01 00218 #define FLAG_DRAG_C1 0x02 00219 #define FLAG_FOCUS_C1 0x04 00220 00221 typedef struct _tagSKC1CTXT { 00222 WORD wShiftCode[LETTER_NUM_C1]; 00223 WORD wNonShiftCode[LETTER_NUM_C1]; 00224 UINT uState; 00225 HBITMAP hSoftkbd; 00226 UINT uSubtype; 00227 int uKeyIndex; 00228 POINT ptSkCursor; 00229 POINT ptSkOffset; 00230 UINT lfCharSet; 00231 } SKC1CTXT, *PSKC1CTXT, FAR *LPSKC1CTXT, NEAR *NPSKC1CTXT; 00232 00233 LRESULT SKWndProcC1(HWND, UINT, WPARAM, LPARAM); 00234 VOID SKC1DrawDragBorder(HWND, LPPOINT, LPPOINT); 00235 00236 #endif // _SOFTKBD_

Generated on Sat May 15 19:41:50 2004 for test by doxygen 1.3.7