Rev 9558 | Rev 9766 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9558 | Rev 9620 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | // writed by maxcodehack and superturbocat2001 |
1 | // writed by maxcodehack and superturbocat2001 |
2 | // adaptation of clayer for ktcc |
2 | // adaptation of clayer for ktcc |
3 | #ifndef KOLIBRI_BOXLIB_H |
3 | #ifndef KOLIBRI_BOXLIB_H |
4 | #define KOLIBRI_BOXLIB_H |
4 | #define KOLIBRI_BOXLIB_H |
Line -... | Line 5... | ||
- | 5 | ||
- | 6 | #include |
|
5 | 7 | #include |
|
Line -... | Line 8... | ||
- | 8 | #include |
|
6 | typedef unsigned color_t; |
9 | |
Line 7... | Line 10... | ||
7 | 10 | typedef unsigned color_t; |
|
8 | extern int kolibri_boxlib_init(void); |
11 | int kolibri_boxlib_init(void); |
9 | 12 | ||
10 | /* flags meaning */ |
13 | /* flags meaning */ |
Line 64... | Line 67... | ||
64 | uint32_t work_size; |
67 | uint32_t work_size; |
65 | uint32_t all_redraw; // need to be set =1 before each redraw |
68 | uint32_t all_redraw; // need to be set =1 before each redraw |
66 | uint32_t ar_offset; |
69 | uint32_t ar_offset; |
67 | } __attribute__ ((__packed__)) scrollbar; |
70 | } __attribute__ ((__packed__)) scrollbar; |
Line 68... | Line 71... | ||
68 | 71 | ||
69 | extern void (*scrollbar_h_draw __attribute__((__stdcall__)))(scrollbar*); |
72 | extern void __stdcall (*scrollbar_h_draw)(scrollbar*); |
70 | extern void (*scrollbar_h_mouse __attribute__((__stdcall__)))(scrollbar*); |
73 | extern void __stdcall (*scrollbar_h_mouse)(scrollbar*); |
71 | extern void (*scrollbar_v_draw __attribute__((__stdcall__)))(scrollbar*); |
74 | extern void __stdcall (*scrollbar_v_draw)(scrollbar*); |
Line 72... | Line 75... | ||
72 | extern void (*scrollbar_v_mouse __attribute__((__stdcall__)))(scrollbar*); |
75 | extern void __stdcall (*scrollbar_v_mouse)(scrollbar*); |
73 | 76 | ||
74 | // CHECKBOX |
77 | // CHECKBOX |
75 | typedef struct { |
78 | typedef struct { |
Line 84... | Line 87... | ||
84 | 87 | ||
85 | /* Users can use members above this */ |
88 | /* Users can use members above this */ |
86 | unsigned int size_of_str; |
89 | unsigned int size_of_str; |
Line 87... | Line 90... | ||
87 | }check_box; |
90 | }check_box; |
88 | 91 | ||
89 | extern void (*check_box_draw2 __attribute__((__stdcall__)))(check_box *); |
92 | extern void __stdcall (*check_box_draw2)(check_box *); |
Line 90... | Line 93... | ||
90 | extern void (*check_box_mouse2 __attribute__((__stdcall__)))(check_box *); |
93 | extern void __stdcall (*check_box_mouse2)(check_box *); |
91 | extern void (*init_checkbox2 __attribute__((__stdcall__)))(check_box *); |
94 | extern void __stdcall (*init_checkbox2)(check_box *); |
92 | 95 | ||
93 | // DBUTTON |
96 | // DBUTTON |
Line 106... | Line 109... | ||
106 | uint32_t offset_raw; // width as ebp fn65 |
109 | uint32_t offset_raw; // width as ebp fn65 |
107 | uint32_t select; // internal state: 0 - passive, 2 - pressed, 1 - clicked |
110 | uint32_t select; // internal state: 0 - passive, 2 - pressed, 1 - clicked |
108 | uint32_t click; // clicked - 1, zero it after tested |
111 | uint32_t click; // clicked - 1, zero it after tested |
109 | } pict_button; |
112 | } pict_button; |
Line 110... | Line 113... | ||
110 | 113 | ||
111 | extern void (*dynamic_button_draw __attribute__((__stdcall__)))(pict_button *); |
114 | extern void __stdcall (*dynamic_button_draw)(pict_button *); |
Line 112... | Line 115... | ||
112 | extern void (*dynamic_button_mouse __attribute__((__stdcall__)))(pict_button *); |
115 | extern void __stdcall (*dynamic_button_mouse)(pict_button *); |
Line 113... | Line 116... | ||
113 | 116 | ||
114 | // EDITBOX |
117 | // EDITBOX |
Line 139... | Line 142... | ||
139 | unsigned int height; |
142 | unsigned int height; |
140 | unsigned int char_width; |
143 | unsigned int char_width; |
141 | }edit_box; |
144 | }edit_box; |
142 | #pragma pack(pop) |
145 | #pragma pack(pop) |
Line 143... | Line 146... | ||
143 | 146 | ||
144 | extern void (*edit_box_draw __attribute__((__stdcall__)))(edit_box *); |
147 | extern void __stdcall (*edit_box_draw)(edit_box *); |
145 | extern void edit_box_key (edit_box *, unsigned int key_val)__attribute__((__stdcall__)); |
148 | extern void __stdcall (*edit_box_key)(edit_box *, unsigned int key_val); |
146 | extern void (*edit_box_mouse __attribute__((__stdcall__)))(edit_box *); |
149 | extern void __stdcall (*edit_box_mouse)(edit_box *); |
- | 150 | extern void __stdcall (*edit_box_set_text)(edit_box *, char *); |
|
- | 151 | ||
Line 147... | Line 152... | ||
147 | extern void (*edit_box_set_text __attribute__((__stdcall__)))(edit_box *, char *); |
152 | extern void __stdcall (*edit_box_key_safe)(edit_box *e, ksys_oskey_t ch); |
148 | 153 | ||
149 | // FRAME |
154 | // FRAME |
150 | typedef struct { |
155 | typedef struct { |
Line 160... | Line 165... | ||
160 | uint32_t font_size_y; |
165 | uint32_t font_size_y; |
161 | color_t font_color; |
166 | color_t font_color; |
162 | color_t font_bg_color; |
167 | color_t font_bg_color; |
163 | }frame; |
168 | }frame; |
Line 164... | Line 169... | ||
164 | 169 | ||
Line 165... | Line 170... | ||
165 | extern void (*frame_draw)(frame *); |
170 | extern void __stdcall (*frame_draw)(frame *); |
166 | 171 | ||
167 | // MENUBAR |
172 | // MENUBAR |
168 | typedef struct |
173 | typedef struct |
Line 201... | Line 206... | ||
201 | uint32_t font_height; |
206 | uint32_t font_height; |
202 | uint32_t cursor_out; |
207 | uint32_t cursor_out; |
203 | uint32_t get_mouse_flag; |
208 | uint32_t get_mouse_flag; |
204 | } menubar; |
209 | } menubar; |
Line 205... | Line 210... | ||
205 | 210 | ||
206 | extern void (*menu_bar_draw)(menubar *); |
211 | extern void __stdcall (*menu_bar_draw)(menubar *); |
207 | extern void (*menu_bar_mouse)(menubar *); |
212 | extern void __stdcall (*menu_bar_mouse)(menubar *); |
Line 208... | Line 213... | ||
208 | extern void (*menu_bar_activate)(menubar *); |
213 | extern void __stdcall (*menu_bar_activate)(menubar *); |
209 | 214 | ||
210 | // OPTIONBOX |
215 | // OPTIONBOX |
211 | typedef struct option_box_t { |
216 | typedef struct option_box_t { |
Line 220... | Line 225... | ||
220 | char *text; |
225 | char *text; |
221 | uint32_t text_len; |
226 | uint32_t text_len; |
222 | uint32_t flags; |
227 | uint32_t flags; |
223 | } __attribute__ ((__packed__)) option_box; |
228 | } __attribute__ ((__packed__)) option_box; |
Line 224... | Line 229... | ||
224 | 229 | ||
225 | extern void (*option_box_draw __attribute__((__stdcall__)))(option_box **); |
230 | extern void __stdcall (*option_box_draw)(option_box **); |
Line 226... | Line 231... | ||
226 | extern void (*option_box_mouse __attribute__((__stdcall__)))(option_box **); |
231 | extern void __stdcall (*option_box_mouse)(option_box **); |
227 | 232 | ||
228 | // PATHSHOW |
233 | // PATHSHOW |
229 | typedef struct { |
234 | typedef struct { |
Line 238... | Line 243... | ||
238 | char* text_pointer; // 4096 ? |
243 | char* text_pointer; // 4096 ? |
239 | char* work_area_pointer; // 4096 ? |
244 | char* work_area_pointer; // 4096 ? |
240 | uint32_t temp_text_length; |
245 | uint32_t temp_text_length; |
241 | } __attribute__ ((__packed__)) pathview; |
246 | } __attribute__ ((__packed__)) pathview; |
Line 242... | Line 247... | ||
242 | 247 | ||
243 | extern void (*path_show_prepare __attribute__((__stdcall__)))(pathview *); |
248 | extern void __stdcall (*path_show_prepare)(pathview *); |
Line 244... | Line 249... | ||
244 | extern void (*path_show_draw __attribute__((__stdcall__)))(pathview *); |
249 | extern void __stdcall (*path_show_draw)(pathview *); |
245 | 250 | ||
246 | // PROGRESSBAR |
251 | // PROGRESSBAR |
247 | typedef struct { |
252 | typedef struct { |
Line 256... | Line 261... | ||
256 | unsigned int back_color; |
261 | unsigned int back_color; |
257 | unsigned int progress_color; |
262 | unsigned int progress_color; |
258 | unsigned int frame_color; |
263 | unsigned int frame_color; |
259 | } progressbar; |
264 | } progressbar; |
Line 260... | Line 265... | ||
260 | 265 | ||
261 | extern void (*progressbar_draw __attribute__((__stdcall__)))(progressbar *); |
266 | extern void __stdcall (*progressbar_draw)(progressbar *); |
262 | extern void (*progressbar_progress __attribute__((__stdcall__)))(progressbar *); |
- | |
Line 263... | Line 267... | ||
263 | 267 | extern void __stdcall (*progressbar_progress)(progressbar *); |