10 // TODO: F_Types ÄÏÌÖÅÎ ÓÏÄÅÒÖÁÔØ ÏÂÝÉÅ ÄÌÑ ×ÓÅÈ ÉÎÔÅÒÆÅÊÓÏ× ÔÉÐÙ, Á ÎÅ
15 extern const char *demangled_(const char *mngl);
16 // ËÏÏÒÄÉÎÁÔÙ ÍÏÇÕÔ ÂÙÔØ ÏÔÒÉÃÁÔÅÌØÎÙÍÉ - ÅÓÌÉ ×ÙÈÏÄÑÔ ÚÁ ÇÒÁÎÉÃÙ ÜËÒÁÎÁ
17 typedef int16_t coord_t;
18 typedef struct { coord_t x, y; } coords_t;
19 typedef u_int16_t dim_t;
20 typedef struct { dim_t w, h; } dims_t;
22 #define F_MAX_COORD_T SHRT_MAX
23 #define F_MAX_DIM_T USHRT_MAX
24 #define F_MAX_WIDGETS USHRT_MAX
26 #define F_HORIZONTAL 0
29 //! ËÏÎÓÔÁÎÔÁ ×ÒÅÍÅÎÉ ÏÖÉÄÁÎÉÑ × ÆÕÎËÃÉÉ F_App::wait()
30 const int start_only = 0,
33 enum log_level_t { DEBUG_LEVEL, CHAT_LEVEL, INFO_LEVEL, NOTICE_LEVEL,
34 WARN_LEVEL, ERROR_LEVEL, ALERT_LEVEL, CRITICAL_LEVEL, FATAL_LEVEL };
36 //! ×ÉÄÙ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÈ ÉÎÔÅÒÆÅÊÓÏ×
39 BATCH_UI, // stdout/stdin
41 CONSOLE_UI, // /dev/vcsa
47 typedef struct val_names_t {
52 #define F_TRACE_SIGNAL SIGURG
54 // idea got from mysql-ptrace
56 u_int32_t foo1; /* +0x00 */
59 u_int32_t foo4; /* usually 2 */
60 u_int32_t foo5; /* +0x10 */
61 u_int32_t xgs; /* always zero */
62 u_int32_t xfs; /* always zero */
63 u_int32_t xes; /* always es=ds=ss */
64 u_int32_t xds; /* +0x20 */
68 u_int32_t esp; /* +0x30 */
72 u_int32_t eax; /* +0x40 */
73 u_int32_t foo11; /* usually 0xe */
74 u_int32_t foo12; /* usually 0x6 */
75 u_int32_t eip; /* instruction pointer */
76 u_int32_t xcs; /* +0x50 */
77 u_int32_t foo21; /* usually 0x2 */
78 u_int32_t foo22; /* second stack pointer?! Probably. */
80 u_int32_t foo31; /* +0x60 */ /* usually 0x0 */
81 u_int32_t foo32; /* usually 0x2 */
82 u_int32_t fault_addr; /* Address which caused a fault */
83 u_int32_t foo41; /* usually 0x2 */
96 F_ALIGN_TOP_LEFT = F_ALIGN_TOP | F_ALIGN_LEFT,
97 F_ALIGN_TOP_RIGHT = F_ALIGN_TOP | F_ALIGN_RIGHT,
98 F_ALIGN_BOTTOM_LEFT = F_ALIGN_BOTTOM | F_ALIGN_LEFT,
99 F_ALIGN_BOTTOM_RIGHT = F_ALIGN_BOTTOM | F_ALIGN_RIGHT,
100 F_ALIGN_LEFT_TOP = F_ALIGN_TOP_LEFT,
101 F_ALIGN_RIGHT_TOP = F_ALIGN_TOP_RIGHT,
102 F_ALIGN_LEFT_BOTTOM = F_ALIGN_BOTTOM_LEFT,
103 F_ALIGN_RIGHT_BOTTOM = F_ALIGN_BOTTOM_RIGHT
107 enum F_Event_Device_t {
114 enum F_Event_Type_t {
119 // draw_buf sync window area
121 // draw_buf sync all display area
130 F_POINTER_SINGLE_CLICK, // ÜÔÏÔ event = input_press & input_release
131 F_POINTER_DOUBLE_CLICK,
132 F_POINTER_TRIPPLE_CLICK,
133 F_POINTER_AUTOREPEAT,
139 F_POINTER_WHEEL_INCR,
140 F_POINTER_WHEEL_DECR,
148 enum F_Pointer_Event_Code_t {
151 F_POINTER_LEFT_BUTTON,
152 F_POINTER_MIDDLE_BUTTON,
153 F_POINTER_RIGHT_BUTTON,
161 F_POINTER_WHEEL_V, // vertical wheel
162 F_POINTER_WHEEL_H // horizontal one
168 typedef struct F_Event_t {
170 timeval timestamp; // hm ...
171 int delay; // × 10ms ÔÉËÁÈ ÚÁÄÅÒÖËÁ
172 F_Widget *widget; // ËÕÄÙ ÐÏÓÙÌÁÔØ ÓÉÇÎÁÌ
173 // F_DISPLAY / F_POINTER / F_KEY
174 F_Event_Device_t dev;
175 // F_POINTER_PRESS / F_POINTER_RELELASE
178 // device specific state
181 // may be implement as 'F_Point pointer;' ?
184 unsigned int buttons;
186 F_Pointer_Event_Code_t ev_c;
190 unsigned int modifiers;
198 // key codes idea is gently borrowed from fltk, naturally with all comments
199 // need to move to specific ui file as will conflict with fltk for ex.
201 #define F_Printable(x) ((x < 0xf000) ? true : false)
203 #define F_Beep 0xf007
204 #define F_BackSpace 0xf008
206 #define F_Enter 0xf00d
207 #define F_Pause 0xf013
208 #define F_Scroll_Lock 0xf014
209 #define F_Escape 0xf01b
210 #define F_Home 0xf050
211 #define F_Left 0xf051
213 #define F_Right 0xf053
214 #define F_Down 0xf054
215 #define F_Page_Up 0xf055
216 #define F_Page_Down 0xf056
218 #define F_Center 0xf058 // Keypad 5
219 #define F_Print 0xf061
220 #define F_Insert 0xf063
221 #define F_Menu_key 0xf067 // the "menu/apps" key on XFree86
222 #define F_Help 0xf068 // the 'help' key on Mac keyboards
223 #define F_Num_Lock 0xf07f
224 #define F_F 0xf090 // F_F + key = functional keys
237 #define F_Shift_L 0xf0e1
238 #define F_Shift_R 0xf0e2
239 #define F_Control_L 0xf0e3
240 #define F_Control_R 0xf0e4
241 #define F_Caps_Lock 0xf0e5
242 #define F_Meta_L 0xf0e7 // the left MSWindows key on XFree86
243 #define F_Meta_R 0xf0e8 // the right MSWindows key on XFree86
244 #define F_Alt_L 0xf0e9
245 #define F_Alt_R 0xf0ea
246 #define F_Delete 0xf0eb
249 #define F_SHIFT 0x00010000
250 #define F_CAPS_LOCK 0x00020000
251 #define F_CTRL 0x00040000
252 #define F_ALT 0x00080000
253 #define F_NUM_LOCK 0x00100000 // most X servers do this?
254 #define F_META 0x00400000 // correct for XFree86
255 #define F_SCROLL_LOCK 0x00800000 // correct for XFree86
257 #define F_BUTTON1 0x01000000
258 #define F_BUTTON2 0x02000000
259 #define F_BUTTON3 0x04000000
260 #define F_BUTTONS 0x7f000000 // All possible buttons
261 #define F_BUTTON(n) (0x00800000<<(n))
263 // Damage ÏÐÒÅÄÅÌÑÅÔ ËÁËÉÅ ÞÁÓÔÉ ×ÉÄÖÅÔÁ ÎÕÖÎÏ ÏÂÎÏ×ÉÔØ ÎÁ ÜËÒÁÎÅ
265 typedef unsigned int F_Damage_t;
267 #define F_DAMAGE_NONE 0x00
269 #define F_DAMAGE_BORDER 0x01
270 // ÓÐÒÑÔÁÔØ/ÐÏËÁÚÁÔØ ×ÉÄÖÅÔ
271 #define F_DAMAGE_EXPOSE 0x02
272 // ÏÂÎÏ×ÉÔØ draw_buf ×ÙÛÅ ÐÏ ÉÅÒÁÒÈÉÉ
273 #define F_DAMAGE_FLUSH 0x04
274 // ÎÕÖÎÏ ÐÅÒÅÒÉÓÏ×ÁÔØ
275 #define F_DAMAGE_DRAW 0x08
277 #define F_DAMAGE_ALL 0xFF
279 typedef unsigned int F_Color_t;
281 // utf-8, where you ?
282 typedef unsigned char F_Char_t;
284 typedef struct F_Color {
288 const F_Color_t F_BLACK = 0,
301 F_BRIGHT_MAGENTA = 13,
302 F_BRIGHT_YELLOW = 14,
306 F_UNDERLINED = 0x20000000,
308 F_BLINK = 0x80000000;
310 #define F_TRANSPARENT F_GLASSY
312 #define F_DEFAULT_BG F_BLUE
313 #define F_DEFAULT_FG F_WHITE
321 enum F_Window_Type_t {
332 typedef unsigned char F_Border_t;
334 const F_Border_t F_NO_BORDER = 0,
339 enum F_Button_State_t {
348 F_WHEN_NOT_CHANGED = 2,
350 F_WHEN_RELEASE_ALWAYS = 6,
351 F_WHEN_ENTER_KEY = 8,
352 F_WHEN_ENTER_KEY_ALWAYS = 10,
353 F_WHEN_ENTER_KEY_CHANGED = 11