Subversion Repositories Kolibri OS

Rev

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

Rev 4461 Rev 4499
Line 1... Line 1...
1
#ifndef __KOS_32_SYS_H__
1
#ifndef __KOS_32_SYS_H__
2
#define __KOS_32_SYS_H__
2
#define __KOS_32_SYS_H__
Line 3... Line -...
3
 
-
 
4
 
3
 
5
#include 
4
#include 
6
#include 
5
#include 
Line 7... Line 6...
7
#include 
6
#include 
8
 
7
 
9
//#ifdef CONFIG_DEBUF
8
//#ifdef CONFIG_DEBUF
10
//  #define DBG(format,...) printf(format,##__VA_ARGS__)
9
//  #define DBG(format,...) printf(format,##__VA_ARGS__)
11
//#else
10
//#else
Line -... Line 11...
-
 
11
//  #define DBG(format,...)
-
 
12
//#endif
12
//  #define DBG(format,...)
13
 
Line 13... Line 14...
13
//#endif
14
#define TYPE_3_BORDER_WIDTH 5
14
 
15
 
15
typedef  unsigned int color_t;
16
typedef  unsigned int color_t;
Line 59... Line 60...
59
 
60
 
Line 60... Line 61...
60
 
61
 
-
 
62
};
-
 
63
 
-
 
64
static inline
-
 
65
uint32_t get_skin_height(void)
-
 
66
{
-
 
67
    uint32_t height;
-
 
68
 
-
 
69
    __asm__ __volatile__(
-
 
70
    "int $0x40 \n\t"
-
 
71
    :"=a"(height)
-
 
72
    :"a"(48),"b"(4));
-
 
73
    return height;
61
};
74
}
62
 
75
 
63
static inline
76
static inline
64
void BeginDraw(void)
77
void BeginDraw(void)
65
{
78
{
Line 72... Line 85...
72
{
85
{
73
    __asm__ __volatile__(
86
    __asm__ __volatile__(
74
    "int $0x40" ::"a"(12),"b"(2));
87
    "int $0x40" ::"a"(12),"b"(2));
75
};
88
};
Line 76... Line 89...
76
 
89
 
77
static inline void DrawWindow(int x, int y, int w, int h, char *name,
90
static inline void DrawWindow(int x, int y, int w, int h, const char *name,
78
                       color_t workcolor, uint32_t style)
91
                       color_t workcolor, uint32_t style)
Line 79... Line 92...
79
{
92
{
80
 
93
 
81
    __asm__ __volatile__(
94
    __asm__ __volatile__(
82
    "int $0x40"
95
    "int $0x40"
83
    ::"a"(0),
96
    ::"a"(0),
84
      "b"((x << 16) | (w & 0xFFFF)),
97
      "b"((x << 16) | ((w-1) & 0xFFFF)),
85
      "c"((y << 16) | (h & 0xFFFF)),
98
      "c"((y << 16) | ((h-1) & 0xFFFF)),
86
      "d"((style << 24) | (workcolor & 0xFFFFFF)),
99
      "d"((style << 24) | (workcolor & 0xFFFFFF)),
Line 87... Line 100...
87
      "D"(name));
100
      "D"(name));
Line 157... Line 170...
157
    :"=a"(val)
170
    :"=a"(val)
158
    :"a"(11));
171
    :"a"(11));
159
    return val;
172
    return val;
160
};
173
};
Line -... Line 174...
-
 
174
 
-
 
175
static inline uint32_t get_os_event()
-
 
176
{
-
 
177
    uint32_t val;
-
 
178
    __asm__ __volatile__(
-
 
179
    "int $0x40"
-
 
180
    :"=a"(val)
-
 
181
    :"a"(10));
-
 
182
    return val;
-
 
183
};
161
 
184
 
162
static inline
185
static inline
163
uint32_t get_tick_count(void)
186
uint32_t get_tick_count(void)
164
{
187
{
165
    uint32_t val;
188
    uint32_t val;