Subversion Repositories Kolibri OS

Rev

Rev 6457 | Rev 6479 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6457 Rev 6470
Line 1... Line 1...
1
#ifndef KOLIBRI_EDITBOX_H
1
#ifndef KOLIBRI_EDITBOX_H
2
#define KOLIBRI_EDITBOX_H
2
#define KOLIBRI_EDITBOX_H
Line 3... Line 3...
3
 
3
 
Line -... Line 4...
-
 
4
#include "kolibri_colors.h"
-
 
5
 
-
 
6
/*  flags meaning
-
 
7
ed_figure_only= 1000000000000000b   ;îäíè ñèìâîëû
-
 
8
ed_always_focus= 100000000000000b
-
 
9
ed_focus=                     10b   ;ôîêóñ ïðèëîæåíèÿ
-
 
10
ed_pass=                       1b   ;ïîëå ñ ïàðîëåì
-
 
11
ed_shift_on=                1000b   ;åñëè íå óñòàíîâëåí -çíà÷èò âïåðâûå íàæàò shift,åñëè áûë óñòàíîâëåí, çíà÷èò ìû óæå ÷òî - òî äåëàëè óäåðæèâàÿ shift
-
 
12
ed_shift_on_off=1111111111110111b
-
 
13
ed_shift=                    100b   ;âêëþ÷àåòñÿ ïðè íàæàòèè íà shift ò.å. åñëè íàæèìàþ
-
 
14
ed_shift_off=   1111111111111011b
-
 
15
ed_shift_bac=              10000b   ;áèò äëÿ î÷èñòêè âûäåëåíîãî shift ò.å. ïðè óñòàíîâêå ãîâîðèò ÷òî åñòü âûäåëåíèå
-
 
16
ed_shift_bac_cl=1111111111101111b   ;î÷èñòêà ïðè óäàëåíèè âûäåëåíèÿ
-
 
17
ed_shift_cl=    1111111111100011b
-
 
18
ed_shift_mcl=   1111111111111011b
-
 
19
ed_left_fl=               100000b
-
 
20
ed_right_fl=    1111111111011111b
-
 
21
ed_offset_fl=            1000000b
-
 
22
ed_offset_cl=   1111111110111111b
-
 
23
ed_insert=              10000000b
-
 
24
ed_insert_cl=   1111111101111111b
-
 
25
ed_mouse_on =          100000000b
-
 
26
ed_mous_adn_b=         100011000b
-
 
27
ed_mouse_on_off=1111111011111111b
4
#include "kolibri_colors.h"
28
*/
5
 
29
 
6
typedef struct {
30
typedef struct {
7
  unsigned int width; 
31
  unsigned int width;
8
    unsigned int left;
32
    unsigned int left;
9
    unsigned int top; 
33
    unsigned int top;
10
    unsigned int color; 
34
    unsigned int color;
11
    unsigned int shift_color; 
35
    unsigned int shift_color;   // selected text color
12
    unsigned int focus_border_color; 
36
    unsigned int focus_border_color;
13
    unsigned int blur_border_color;
37
    unsigned int blur_border_color;
14
    unsigned int text_color;
38
    unsigned int text_color;
15
    unsigned int max;
39
    unsigned int max;
16
    char *text;
40
    char *text;
Line -... Line 41...
-
 
41
    unsigned int mouse_variable; // mus be int* pointer to saved mouse pos ??
-
 
42
    unsigned int flags;
17
    unsigned int mouse_variable;
43
 
18
    unsigned int flags;
-
 
19
 
-
 
20
/* The following struct members are not used by the users of API */
44
    unsigned int size;  // used symbols in buffer without trailing zero
21
    unsigned int size;
45
    unsigned int pos;  // cursor position
22
    unsigned int pos;
46
/* The following struct members are not used by the users of API */
23
    unsigned int offset;
47
    unsigned int offset;
24
    unsigned int cl_curs_x;
48
    unsigned int cl_curs_x;
Line 83... Line 107...
83
/* because inline assembly in GCC is a PITA and interferes with the EAX (AH) register */
107
/* because inline assembly in GCC is a PITA and interferes with the EAX (AH) register */
84
/* which edit_box_key requires */
108
/* which edit_box_key requires */
85
extern void editbox_key(edit_box *) __attribute__((__stdcall__));
109
extern void editbox_key(edit_box *) __attribute__((__stdcall__));
Line 86... Line 110...
86
 
110
 
-
 
111
extern void (*edit_box_mouse)(edit_box *) __attribute__((__stdcall__));
87
extern void (*edit_box_mouse)(edit_box *) __attribute__((__stdcall__));
112
extern void (*edit_box_set_text)(edit_box *, char *) __attribute__((__stdcall__));
88
extern volatile unsigned press_key;
113
extern volatile unsigned press_key;