Rev 8441 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8441 | Rev 8453 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | #define __KOS_32_SYS_H__ |
2 | #define __KOS_32_SYS_H__ |
Line 3... | Line 3... | ||
3 | 3 | ||
4 | #include |
4 | #include |
5 | #include |
5 | #include |
- | 6 | #include |
|
Line 6... | Line 7... | ||
6 | #include |
7 | #include |
7 | 8 | ||
8 | #ifdef __cplusplus |
9 | #ifdef __cplusplus |
Line 123... | Line 124... | ||
123 | "d"((style << 24) | (workcolor & 0xFFFFFF)), |
124 | "d"((style << 24) | (workcolor & 0xFFFFFF)), |
124 | "D"(name), |
125 | "D"(name), |
125 | "S"(0) : "memory"); |
126 | "S"(0) : "memory"); |
126 | }; |
127 | }; |
Line -... | Line 128... | ||
- | 128 | ||
- | 129 | #define OLD -1 |
|
- | 130 | static inline |
|
- | 131 | void sys_change_window(int new_x, int new_y, int new_w, int new_h) |
|
- | 132 | { |
|
- | 133 | __asm__ __volatile__( |
|
- | 134 | "int $0x40" |
|
- | 135 | ::"a"(67), "b"(new_x), "c"(new_y), "d"(new_w),"S"(new_h) |
|
- | 136 | ); |
|
- | 137 | } |
|
127 | 138 | ||
128 | static inline |
139 | static inline |
129 | void define_button(uint32_t x_w, uint32_t y_h, uint32_t id, uint32_t color) |
140 | void define_button(uint32_t x_w, uint32_t y_h, uint32_t id, uint32_t color) |
130 | { |
141 | { |
131 | __asm__ __volatile__( |
142 | __asm__ __volatile__( |
Line 176... | Line 187... | ||
176 | "b"((x << 16) | y), |
187 | "b"((x << 16) | y), |
177 | "S"(len),"c"(color) |
188 | "S"(len),"c"(color) |
178 | :"memory"); |
189 | :"memory"); |
179 | } |
190 | } |
Line -... | Line 191... | ||
- | 191 | ||
- | 192 | /* |
|
- | 193 | void define_button_text(int x, int y, int w, int h, uint32_t id, uint32_t color, char* text) |
|
- | 194 | { |
|
- | 195 | define_button(x * 65536 + w, y * 65536 + h, id, color); |
|
- | 196 | ||
- | 197 | int tx = ((((-strlen(text))*8)+w)/2)+x; |
|
- | 198 | int ty = h/2-7+y; |
|
- | 199 | ||
- | 200 | draw_text_sys(text, tx, ty, strlen(text), 0x90000000); |
|
- | 201 | }; |
|
- | 202 | */ |
|
180 | 203 | ||
181 | static inline |
204 | static inline |
182 | uint32_t get_skin_height(void) |
205 | uint32_t get_skin_height(void) |
183 | { |
206 | { |
Line 263... | Line 286... | ||
263 | :"=a"(old) |
286 | :"=a"(old) |
264 | :"a"(37), "b"(5), "c"(cursor)); |
287 | :"a"(37), "b"(5), "c"(cursor)); |
265 | return old; |
288 | return old; |
266 | }; |
289 | }; |
Line -... | Line 290... | ||
- | 290 | ||
- | 291 | ||
- | 292 | #define EVM_REDRAW 1 |
|
- | 293 | #define EVM_KEY 2 |
|
- | 294 | #define EVM_BUTTON 4 |
|
- | 295 | #define EVM_EXIT 8 |
|
- | 296 | #define EVM_BACKGROUND 16 |
|
- | 297 | #define EVM_MOUSE 32 |
|
- | 298 | #define EVM_IPC 64 |
|
- | 299 | #define EVM_STACK 128 |
|
- | 300 | #define EVM_DEBUG 256 |
|
- | 301 | #define EVM_STACK2 512 |
|
- | 302 | #define EVM_MOUSE_FILTER 0x80000000 |
|
- | 303 | #define EVM_CURSOR_FILTER 0x40000000 |
|
267 | 304 | ||
268 | static inline uint32_t set_wanted_events_mask(uint32_t event_mask) |
305 | static inline uint32_t set_wanted_events_mask(uint32_t event_mask) |
269 | { |
306 | { |
270 | uint32_t old_event_mask; |
307 | uint32_t old_event_mask; |
271 | __asm__ __volatile__( |
308 | __asm__ __volatile__( |
Line 510... | Line 547... | ||
510 | :"=a"(retval) |
547 | :"=a"(retval) |
511 | :"a"(61), "b"(1)); |
548 | :"a"(61), "b"(1)); |
512 | return retval; |
549 | return retval; |
513 | } |
550 | } |
Line -... | Line 551... | ||
- | 551 | ||
- | 552 | static inline |
|
- | 553 | pos_t max_screen_size() |
|
- | 554 | { |
|
- | 555 | pos_t size; |
|
- | 556 | __asm__ __volatile__( |
|
- | 557 | "int $0x40" |
|
- | 558 | :"=a"(size) |
|
- | 559 | :"a"(14)); |
|
- | 560 | ||
- | 561 | ||
- | 562 | return size; |
|
- | 563 | }; |
|
514 | 564 | ||
515 | static inline void get_system_colors(struct kolibri_system_colors *color_table) |
565 | static inline void get_system_colors(struct kolibri_system_colors *color_table) |
516 | { |
566 | { |
517 | __asm__ volatile ("int $0x40" |
567 | __asm__ volatile ("int $0x40" |
518 | : |
568 | : |