Subversion Repositories Kolibri OS

Rev

Rev 704 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
550 serge 1
 
2
extern "C"
3
{
4
#endif
5
6
 
7
 
8
#define FONT1          0x10000000
9
10
 
11
#define BT_NOFRAME     0x20000000
12
#define BT_HIDE        0x40000000
13
#define BT_DEL         0x80000000
14
15
 
16
#define EV_KEY         2
17
#define EV_BUTTON      3
18
19
 
20
#define REL_WINDOW     1
21
22
 
23
#define FILE_EOF       6
24
25
 
704 serge 26
550 serge 27
 
28
typedef unsigned short int WORD;
29
30
 
31
{  DWORD pci_cmd;
32
   DWORD irq;
33
   DWORD glob_cntrl;
34
   DWORD glob_sta;
35
   DWORD codec_io_base;
36
   DWORD ctrl_io_base;
37
   DWORD codec_mem_base;
38
   DWORD ctrl_mem_base;
39
   DWORD codec_id;
40
} CTRL_INFO;
41
42
 
43
{   DWORD       cmd;
44
    DWORD       offset;
45
    DWORD       r1;
46
    DWORD       count;
47
    DWORD       buff;
48
    char        r2;
49
    char       *name;
50
} FILEIO;
51
52
 
53
{   DWORD    attr;
54
    DWORD    flags;
55
    DWORD    cr_time;
56
    DWORD    cr_date;
57
    DWORD    acc_time;
58
    DWORD    acc_date;
59
    DWORD    mod_time;
60
    DWORD    mod_date;
61
    DWORD    size;
62
    DWORD    size_high;
63
} FILEINFO;
64
65
 
66
67
 
68
69
 
70
71
 
72
void debug_out_str(char* str);
73
74
 
75
int _stdcall read_file (const char *name,char*buff,DWORD offset, DWORD count,DWORD *reads);
76
int _stdcall write_file(const char *name,char*buff,int offset,int count,int *writes);
77
78
 
79
int _stdcall get_key(int *key);
80
int _stdcall remap_key(int key);
81
82
 
83
84
 
704 serge 85
86
 
550 serge 87
int wait_for_event_infinite();
88
void BeginDraw(void);
89
void EndDraw(void);
90
91
 
92
void _stdcall DrawWindow(int x,int y, int sx, int sy,int workcolor,int style,
93
                               int captioncolor,int windowtype,int bordercolor);
94
void _stdcall debug_out(int ch);
95
void _stdcall make_button(int x, int y, int xsize, int ysize, int id, int color);
96
void _stdcall draw_bar(int x, int y, int xsize, int ysize, int color);
97
void _stdcall write_text(int x,int y,int color,char* text,int len);
98
99
 
704 serge 100
101
 
711 serge 102
{   unsigned    attr;
103
    unsigned    flags;
104
    unsigned    cr_time;
105
    unsigned    cr_date;
106
    unsigned    acc_time;
107
    unsigned    acc_date;
108
    unsigned    mod_time;
109
    unsigned    mod_date;
110
    unsigned    size;
111
    unsigned    size_high;
112
} FILEINFO;
113
114
 
115
 
704 serge 116
void *user_alloc(unsigned size);
711 serge 117
unsigned user_free(void *);
118
704 serge 119
 
711 serge 120
int get_fileinfo(const char *name,FILEINFO* pinfo);
121
int read_file (const char *name,void *buff, unsigned offset, unsigned count,unsigned *reads);
122
int write_file(const char *name,const void *buff,unsigned offset,unsigned count,unsigned *writes);
123
124
 
704 serge 125
            "mov EAX, 68" \
126
            "mov EBX, 11" \
127
            "int 0x40"    \
128
            value [EAX] \
129
            modify [ EBX ];
130
131
 
132
            "mov EAX, 68" \
133
            "mov EBX, 12" \
134
            "int 0x40"    \
135
            parm [ ECX ] value [EAX] \
136
            modify [ EBX ];
137
138
 
139
            "mov EAX, 68" \
140
            "mov EBX, 13" \
141
            "int 0x40"    \
142
            parm [ ECX ] value [EAX] \
143
            modify [ EBX ];
144
145
 
711 serge 146
            "push 0"           \
147
            "push 0"           \
148
            "mov [esp+1], eax" \
149
            "push 0"           \
150
            "push 0"           \
151
            "push 0"           \
152
            "push 0"           \
153
            "push 2"           \
154
            "mov ebx, esp"     \
155
            "mov eax, 70"      \
156
            "int 0x40"         \
157
            "add esp, 28"      \
158
            parm [EAX] value [EAX] \
159
            modify [ EBX ];
160
161
 
162
            "push 0"           \
163
            "push 0"           \
164
            "mov [esp+1], eax" \
165
            "push ebx"         \
166
            "push 0"           \
167
            "push 0"           \
168
            "push 0"           \
169
            "push 5"           \
170
            "mov ebx, esp"     \
171
            "mov eax, 70"      \
172
            "int 0x40"         \
173
            "add esp, 28"      \
174
            parm [EAX] [ebx] value [EAX] \
175
            modify [ EBX ];
176
177
 
178
            "push 0"           \
179
            "push 0"           \
180
            "mov [esp+1], eax" \
181
            "push ebx"         \
182
            "push edx"         \
183
            "push 0"           \
184
            "push ecx"         \
185
            "push 0"           \
186
            "mov ebx, esp"     \
187
            "mov eax, 70"      \
188
            "int 0x40"         \
189
            "test esi, esi"    \
190
            "jz skip"          \
191
            "mov [esi], ebx"   \
192
     "skip:"                   \
193
            "add esp, 28"      \
194
            parm [EAX] [EBX] [ECX] [EDX] [ESI] value [EAX] \
195
            modify [ EBX ];
196
197
 
198
            "push 0"           \
199
            "push 0"           \
200
            "mov [esp+1], eax" \
201
            "push ebx"         \
202
            "push edx"         \
203
            "push 0"           \
204
            "push ecx"         \
205
            "push 3"           \
206
            "mov ebx, esp"     \
207
            "mov eax, 70"      \
208
            "int 0x40"         \
209
            "test esi, esi"    \
210
            "jz skip"          \
211
            "mov [esi], ebx"   \
212
     "skip:"                   \
213
            "add esp, 28"      \
214
            parm [EAX] [EBX] [ECX] [EDX] [ESI] value [EAX] \
215
            modify [ EBX ];
216
217
 
550 serge 218
extern "C"
219
}
220
#endif
221