Subversion Repositories Kolibri OS

Rev

Rev 9811 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9811 Rev 9812
Line 6... Line 6...
6
#include 
6
#include 
7
#include 
7
#include 
8
#include 
8
#include 
Line 9... Line 9...
9
 
9
 
10
typedef unsigned color_t;
-
 
Line 11... Line 10...
11
int kolibri_boxlib_init(void);
10
typedef unsigned color_t;
12
 
11
 
13
/*  flags meaning */
12
/*  flags meaning */
14
#define ed_figure_only  0b1000000000000000 // одни символы
13
#define ed_figure_only  0b1000000000000000 // одни символы
Line 67... Line 66...
67
    uint32_t work_size;
66
    uint32_t work_size;
68
    uint32_t all_redraw; // need to be set =1 before each redraw
67
    uint32_t all_redraw; // need to be set =1 before each redraw
69
    uint32_t ar_offset;
68
    uint32_t ar_offset;
70
} __attribute__((__packed__)) scrollbar;
69
} __attribute__((__packed__)) scrollbar;
Line 71... Line 70...
71
 
70
 
72
extern void __stdcall (*scrollbar_h_draw)(scrollbar*);
71
DLLAPI void __stdcall scrollbar_h_draw(scrollbar*);
73
extern void __stdcall (*scrollbar_h_mouse)(scrollbar*);
72
DLLAPI void __stdcall scrollbar_h_mouse(scrollbar*);
74
extern void __stdcall (*scrollbar_v_draw)(scrollbar*);
73
DLLAPI void __stdcall scrollbar_v_draw(scrollbar*);
Line 75... Line 74...
75
extern void __stdcall (*scrollbar_v_mouse)(scrollbar*);
74
DLLAPI void __stdcall scrollbar_v_mouse(scrollbar*);
76
 
75
 
77
// CHECKBOX
76
// CHECKBOX
78
typedef struct {
77
typedef struct {
Line 87... Line 86...
87
 
86
 
88
    /* Users can use members above this */
87
    /* Users can use members above this */
89
    unsigned int size_of_str;
88
    unsigned int size_of_str;
Line 90... Line 89...
90
} check_box;
89
} check_box;
91
 
90
 
92
extern void __stdcall (*check_box_draw2)(check_box*);
91
DLLAPI void __stdcall check_box_draw2(check_box*);
Line 93... Line 92...
93
extern void __stdcall (*check_box_mouse2)(check_box*);
92
DLLAPI void __stdcall check_box_mouse2(check_box*);
94
extern void __stdcall (*init_checkbox2)(check_box*);
93
DLLAPI void __stdcall init_checkbox2(check_box*);
95
 
94
 
96
// DBUTTON
95
// DBUTTON
Line 109... Line 108...
109
    uint32_t offset_raw;     // width as ebp fn65
108
    uint32_t offset_raw;     // width as ebp fn65
110
    uint32_t select;         // internal state: 0 - passive, 2 - pressed, 1 - clicked
109
    uint32_t select;         // internal state: 0 - passive, 2 - pressed, 1 - clicked
111
    uint32_t click;          // clicked - 1, zero it after tested
110
    uint32_t click;          // clicked - 1, zero it after tested
112
} pict_button;
111
} pict_button;
Line 113... Line 112...
113
 
112
 
114
extern void __stdcall (*dynamic_button_draw)(pict_button*);
113
DLLAPI void __stdcall dynamic_button_draw(pict_button*);
Line 115... Line 114...
115
extern void __stdcall (*dynamic_button_mouse)(pict_button*);
114
DLLAPI void __stdcall dynamic_button_mouse(pict_button*);
Line 116... Line 115...
116
 
115
 
117
// EDITBOX
116
// EDITBOX
Line 142... Line 141...
142
    unsigned int height;
141
    unsigned int height;
143
    unsigned int char_width;
142
    unsigned int char_width;
144
} edit_box;
143
} edit_box;
145
#pragma pack(pop)
144
#pragma pack(pop)
Line 146... Line 145...
146
 
145
 
147
extern void __stdcall (*edit_box_draw)(edit_box*);
146
DLLAPI void __stdcall edit_box_draw(edit_box*);
148
extern void __stdcall (*edit_box_key)(edit_box*, unsigned int key_val);
147
DLLAPI void __stdcall edit_box_key(edit_box*, unsigned int key_val);
149
extern void __stdcall (*edit_box_mouse)(edit_box*);
148
DLLAPI void __stdcall edit_box_mouse(edit_box*);
Line 150... Line 149...
150
extern void __stdcall (*edit_box_set_text)(edit_box*, char*);
149
DLLAPI void __stdcall edit_box_set_text(edit_box*, char*);
Line 151... Line 150...
151
 
150
 
152
extern void __stdcall (*edit_box_key_safe)(edit_box* e, ksys_oskey_t ch);
151
DLLAPI void __stdcall edit_box_key_safe(edit_box* e, ksys_oskey_t ch);
153
 
152
 
154
// FRAME
153
// FRAME
Line 165... Line 164...
165
    uint32_t font_size_y;
164
    uint32_t font_size_y;
166
    color_t font_color;
165
    color_t font_color;
167
    color_t font_bg_color;
166
    color_t font_bg_color;
168
} frame;
167
} frame;
Line 169... Line 168...
169
 
168
 
Line 170... Line 169...
170
extern void __stdcall (*frame_draw)(frame*);
169
DLLAPI void __stdcall frame_draw(frame*);
171
 
170
 
172
// MENUBAR
171
// MENUBAR
173
typedef struct
172
typedef struct
Line 206... Line 205...
206
    uint32_t font_height;
205
    uint32_t font_height;
207
    uint32_t cursor_out;
206
    uint32_t cursor_out;
208
    uint32_t get_mouse_flag;
207
    uint32_t get_mouse_flag;
209
} menubar;
208
} menubar;
Line 210... Line 209...
210
 
209
 
211
extern void __stdcall (*menu_bar_draw)(menubar*);
210
DLLAPI void __stdcall menu_bar_draw(menubar*);
212
extern void __stdcall (*menu_bar_mouse)(menubar*);
211
DLLAPI void __stdcall menu_bar_mouse(menubar*);
Line 213... Line 212...
213
extern void __stdcall (*menu_bar_activate)(menubar*);
212
DLLAPI void __stdcall menu_bar_activate(menubar*);
214
 
213
 
215
// OPTIONBOX
214
// OPTIONBOX
216
typedef struct option_box_t {
215
typedef struct option_box_t {
Line 225... Line 224...
225
    char* text;
224
    char* text;
226
    uint32_t text_len;
225
    uint32_t text_len;
227
    uint32_t flags;
226
    uint32_t flags;
228
} __attribute__((__packed__)) option_box;
227
} __attribute__((__packed__)) option_box;
Line 229... Line 228...
229
 
228
 
230
extern void __stdcall (*option_box_draw)(option_box**);
229
DLLAPI void __stdcall option_box_draw(option_box**);
Line 231... Line 230...
231
extern void __stdcall (*option_box_mouse)(option_box**);
230
DLLAPI void __stdcall option_box_mouse(option_box**);
232
 
231
 
233
// PATHSHOW
232
// PATHSHOW
234
typedef struct {
233
typedef struct {
Line 243... Line 242...
243
    char* text_pointer;       // 4096 ?
242
    char* text_pointer;       // 4096 ?
244
    char* work_area_pointer;  // 4096 ?
243
    char* work_area_pointer;  // 4096 ?
245
    uint32_t temp_text_length;
244
    uint32_t temp_text_length;
246
} __attribute__((__packed__)) pathview;
245
} __attribute__((__packed__)) pathview;
Line 247... Line 246...
247
 
246
 
248
extern void __stdcall (*path_show_prepare)(pathview*);
247
DLLAPI void __stdcall path_show_prepare(pathview*);
Line 249... Line 248...
249
extern void __stdcall (*path_show_draw)(pathview*);
248
DLLAPI void __stdcall path_show_draw(pathview*);
250
 
249
 
251
// PROGRESSBAR
250
// PROGRESSBAR
252
typedef struct {
251
typedef struct {
Line 261... Line 260...
261
    unsigned int back_color;
260
    unsigned int back_color;
262
    unsigned int progress_color;
261
    unsigned int progress_color;
263
    unsigned int frame_color;
262
    unsigned int frame_color;
264
} progressbar;
263
} progressbar;
Line 265... Line 264...
265
 
264
 
266
extern void __stdcall (*progressbar_draw)(progressbar*);
265
DLLAPI void __stdcall progressbar_draw(progressbar*);
Line 267... Line 266...
267
extern void __stdcall (*progressbar_progress)(progressbar*);
266
DLLAPI void __stdcall progressbar_progress(progressbar*);