3 * Copyright (C) 2007, Harbour, All rights reserved.
11 #include <F_Version.H>
14 // TODO: F_Types ÄÏÌÖÅÎ ÓÏÄÅÒÖÁÔØ ÏÂÝÉÅ ÄÌÑ ×ÓÅÈ ÉÎÔÅÒÆÅÊÓÏ× ÔÉÐÙ, Á ÎÅ
19 extern const char *demangled_(const char *mngl);
20 // ËÏÏÒÄÉÎÁÔÙ ÍÏÇÕÔ ÂÙÔØ ÏÔÒÉÃÁÔÅÌØÎÙÍÉ - ÅÓÌÉ ×ÙÈÏÄÑÔ ÚÁ ÇÒÁÎÉÃÙ ÜËÒÁÎÁ
21 typedef int16_t coord_t;
22 typedef struct { coord_t x, y; } coords_t;
23 typedef u_int16_t dim_t;
24 typedef struct { dim_t w, h; } dims_t;
26 #define F_MAX_COORD_T SHRT_MAX
27 #define F_MAX_DIM_T USHRT_MAX
28 #define F_MAX_WIDGETS USHRT_MAX
30 #define F_HORIZONTAL 0
33 //! ËÏÎÓÔÁÎÔÁ ×ÒÅÍÅÎÉ ÏÖÉÄÁÎÉÑ × ÆÕÎËÃÉÉ F_App::wait()
34 const int start_only = 0,
37 enum log_level_t { DEBUG_LEVEL, CHAT_LEVEL, INFO_LEVEL, NOTICE_LEVEL,
38 WARN_LEVEL, ERROR_LEVEL, ALERT_LEVEL, CRITICAL_LEVEL, FATAL_LEVEL };
40 //! ×ÉÄÙ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÈ ÉÎÔÅÒÆÅÊÓÏ×
43 BATCH_UI, // stdout/stdin
45 CONSOLE_UI, // /dev/vcsa
51 typedef struct val_names_t {
56 #define F_TRACE_SIGNAL SIGURG
58 // idea got from mysql-ptrace
60 u_int32_t foo1; /* +0x00 */
63 u_int32_t foo4; /* usually 2 */
64 u_int32_t foo5; /* +0x10 */
65 u_int32_t xgs; /* always zero */
66 u_int32_t xfs; /* always zero */
67 u_int32_t xes; /* always es=ds=ss */
68 u_int32_t xds; /* +0x20 */
72 u_int32_t esp; /* +0x30 */
76 u_int32_t eax; /* +0x40 */
77 u_int32_t foo11; /* usually 0xe */
78 u_int32_t foo12; /* usually 0x6 */
79 u_int32_t eip; /* instruction pointer */
80 u_int32_t xcs; /* +0x50 */
81 u_int32_t foo21; /* usually 0x2 */
82 u_int32_t foo22; /* second stack pointer?! Probably. */
84 u_int32_t foo31; /* +0x60 */ /* usually 0x0 */
85 u_int32_t foo32; /* usually 0x2 */
86 u_int32_t fault_addr; /* Address which caused a fault */
87 u_int32_t foo41; /* usually 0x2 */
100 F_ALIGN_TOP_LEFT = F_ALIGN_TOP | F_ALIGN_LEFT,
101 F_ALIGN_TOP_RIGHT = F_ALIGN_TOP | F_ALIGN_RIGHT,
102 F_ALIGN_BOTTOM_LEFT = F_ALIGN_BOTTOM | F_ALIGN_LEFT,
103 F_ALIGN_BOTTOM_RIGHT = F_ALIGN_BOTTOM | F_ALIGN_RIGHT,
104 F_ALIGN_LEFT_TOP = F_ALIGN_TOP_LEFT,
105 F_ALIGN_RIGHT_TOP = F_ALIGN_TOP_RIGHT,
106 F_ALIGN_LEFT_BOTTOM = F_ALIGN_BOTTOM_LEFT,
107 F_ALIGN_RIGHT_BOTTOM = F_ALIGN_BOTTOM_RIGHT
111 enum F_Event_Device_t {
118 enum F_Event_Type_t {
123 // draw_buf sync window area
125 // draw_buf sync all display area
134 F_POINTER_SINGLE_CLICK, // ÜÔÏÔ event = input_press & input_release
135 F_POINTER_DOUBLE_CLICK,
136 F_POINTER_TRIPPLE_CLICK,
137 F_POINTER_AUTOREPEAT,
143 F_POINTER_WHEEL_INCR,
144 F_POINTER_WHEEL_DECR,
152 enum F_Pointer_Event_Code_t {
155 F_POINTER_LEFT_BUTTON,
156 F_POINTER_MIDDLE_BUTTON,
157 F_POINTER_RIGHT_BUTTON,
165 F_POINTER_WHEEL_V, // vertical wheel
166 F_POINTER_WHEEL_H // horizontal one
172 typedef struct F_Event_t {
174 timeval timestamp; // hm ...
175 int delay; // × 10ms ÔÉËÁÈ ÚÁÄÅÒÖËÁ
176 F_Widget *widget; // ËÕÄÙ ÐÏÓÙÌÁÔØ ÓÉÇÎÁÌ
177 // F_DISPLAY / F_POINTER / F_KEY
178 F_Event_Device_t dev;
179 // F_POINTER_PRESS / F_POINTER_RELELASE
182 // device specific state
185 // may be implement as 'F_Point pointer;' ?
188 unsigned int buttons;
190 F_Pointer_Event_Code_t ev_c;
194 unsigned int modifiers;
202 // key codes idea is gently borrowed from fltk, naturally with all comments
203 // need to move to specific ui file as will conflict with fltk for ex.
205 #define F_Printable(x) ((x < 0xf000) ? true : false)
207 #define F_Beep 0xf007
208 #define F_BackSpace 0xf008
210 #define F_Enter 0xf00d
211 #define F_Pause 0xf013
212 #define F_Scroll_Lock 0xf014
213 #define F_Escape 0xf01b
214 #define F_Home 0xf050
215 #define F_Left 0xf051
217 #define F_Right 0xf053
218 #define F_Down 0xf054
219 #define F_Page_Up 0xf055
220 #define F_Page_Down 0xf056
222 #define F_Center 0xf058 // Keypad 5
223 #define F_Print 0xf061
224 #define F_Insert 0xf063
225 #define F_Menu_key 0xf067 // the "menu/apps" key on XFree86
226 #define F_Help 0xf068 // the 'help' key on Mac keyboards
227 #define F_Num_Lock 0xf07f
228 #define F_F 0xf090 // F_F + key = functional keys
241 #define F_Shift_L 0xf0e1
242 #define F_Shift_R 0xf0e2
243 #define F_Control_L 0xf0e3
244 #define F_Control_R 0xf0e4
245 #define F_Caps_Lock 0xf0e5
246 #define F_Meta_L 0xf0e7 // the left MSWindows key on XFree86
247 #define F_Meta_R 0xf0e8 // the right MSWindows key on XFree86
248 #define F_Alt_L 0xf0e9
249 #define F_Alt_R 0xf0ea
250 #define F_Delete 0xf0eb
253 #define F_SHIFT 0x00010000
254 #define F_CAPS_LOCK 0x00020000
255 #define F_CTRL 0x00040000
256 #define F_ALT 0x00080000
257 #define F_NUM_LOCK 0x00100000 // most X servers do this?
258 #define F_META 0x00400000 // correct for XFree86
259 #define F_SCROLL_LOCK 0x00800000 // correct for XFree86
261 #define F_BUTTON1 0x01000000
262 #define F_BUTTON2 0x02000000
263 #define F_BUTTON3 0x04000000
264 #define F_BUTTONS 0x7f000000 // All possible buttons
265 #define F_BUTTON(n) (0x00800000<<(n))
267 // Damage ÏÐÒÅÄÅÌÑÅÔ ËÁËÉÅ ÞÁÓÔÉ ×ÉÄÖÅÔÁ ÎÕÖÎÏ ÏÂÎÏ×ÉÔØ ÎÁ ÜËÒÁÎÅ
269 typedef unsigned int F_Damage_t;
271 #define F_DAMAGE_NONE 0x00
273 #define F_DAMAGE_BORDER 0x01
274 // ÓÐÒÑÔÁÔØ/ÐÏËÁÚÁÔØ ×ÉÄÖÅÔ
275 #define F_DAMAGE_EXPOSE 0x02
276 // ÏÂÎÏ×ÉÔØ draw_buf ×ÙÛÅ ÐÏ ÉÅÒÁÒÈÉÉ
277 #define F_DAMAGE_FLUSH 0x04
278 // ÎÕÖÎÏ ÐÅÒÅÒÉÓÏ×ÁÔØ
279 #define F_DAMAGE_DRAW 0x08
281 #define F_DAMAGE_ALL 0xFF
283 typedef unsigned int F_Color_t;
285 // utf-8, where you ?
286 typedef unsigned char F_Char_t;
288 typedef struct F_Color {
292 const F_Color_t F_BLACK = 0,
305 F_BRIGHT_MAGENTA = 13,
306 F_BRIGHT_YELLOW = 14,
310 F_UNDERLINED = 0x20000000,
312 F_BLINK = 0x80000000;
314 #define F_TRANSPARENT F_GLASSY
316 #define F_DEFAULT_BG F_BLUE
317 #define F_DEFAULT_FG F_WHITE
325 enum F_Window_Type_t {
336 typedef unsigned char F_Border_t;
338 const F_Border_t F_NO_BORDER = 0,
343 enum F_Button_State_t {
352 F_WHEN_NOT_CHANGED = 2,
354 F_WHEN_RELEASE_ALWAYS = 6,
355 F_WHEN_ENTER_KEY = 8,
356 F_WHEN_ENTER_KEY_ALWAYS = 10,
357 F_WHEN_ENTER_KEY_CHANGED = 11