Subversion Repositories Kolibri OS

Rev

Rev 6282 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6282 Rev 6336
1
typedef struct tag_object  kobj_t;
1
typedef struct tag_object  kobj_t;
2
typedef struct tag_display display_t;
2
typedef struct tag_display display_t;
3
 
3
 
4
struct tag_object
4
struct tag_object
5
{
5
{
6
    uint32_t   magic;
6
    uint32_t   magic;
7
    void      *destroy;
7
    void      *destroy;
8
    kobj_t    *fd;
8
    kobj_t    *fd;
9
    kobj_t    *bk;
9
    kobj_t    *bk;
10
    uint32_t   pid;
10
    uint32_t   pid;
11
};
11
};
12
 
12
 
13
typedef struct
13
typedef struct
14
{
14
{
15
    kobj_t     header;
15
    kobj_t     header;
16
 
16
 
17
    uint32_t  *data;
17
    uint32_t  *data;
18
    uint32_t   hot_x;
18
    uint32_t   hot_x;
19
    uint32_t   hot_y;
19
    uint32_t   hot_y;
20
 
20
 
21
    struct list_head   list;
21
    struct list_head   list;
22
    void      *cobj;
22
    void      *cobj;
23
}cursor_t;
23
}cursor_t;
24
 
24
 
25
#define KMS_CURSOR_WIDTH 64
25
#define KMS_CURSOR_WIDTH 64
26
#define KMS_CURSOR_HEIGHT 64
26
#define KMS_CURSOR_HEIGHT 64
27
 
27
 
28
struct kos_framebuffer
28
struct kos_framebuffer
29
{
29
{
30
    struct list_head list;
30
    struct list_head list;
31
    uint32_t    magic;
31
    uint32_t    magic;
32
    uint32_t    handle;
32
    uint32_t    handle;
33
    void        *destructor;
33
    void        *destructor;
34
 
34
 
35
    uint32_t    width;
35
    uint32_t    width;
36
    uint32_t    height;
36
    uint32_t    height;
37
    uint32_t    pitch;
37
    uint32_t    pitch;
38
    uint32_t    format;
38
    uint32_t    format;
39
    void        *private;
39
    void        *private;
40
    uint32_t    pde[8];
40
    uint32_t    pde[8];
41
};
41
};
-
 
42
 
-
 
43
int fake_framebuffer_create();
-
 
44
void set_fake_framebuffer();
-
 
45
int kolibri_framebuffer_init(void *param);
-
 
46
void kolibri_framebuffer_update(struct drm_device *dev, struct kos_framebuffer *kfb);
42
 
47
 
43
struct tag_display
48
struct tag_display
44
{
49
{
45
    u32   x;
50
    u32   x;
46
    u32   y;
51
    u32   y;
47
    u32   width;
52
    u32   width;
48
    u32   height;
53
    u32   height;
49
    u32   bpp;
54
    u32   bpp;
50
    u32   vrefresh;
55
    u32   vrefresh;
51
    struct kos_framebuffer *current_lfb;
56
    struct kos_framebuffer *current_lfb;
52
    u32   lfb_pitch;
57
    u32   lfb_pitch;
53
 
58
 
54
    struct rw_semaphore win_map_lock;
59
    struct rw_semaphore win_map_lock;
55
    void *win_map;
60
    void *win_map;
56
    u32   win_map_pitch;
61
    u32   win_map_pitch;
57
    u32   win_map_size;
62
    u32   win_map_size;
58
 
63
 
59
    u32   supported_modes;
64
    u32   supported_modes;
60
    struct drm_device    *ddev;
65
    struct drm_device    *ddev;
61
    struct drm_connector *connector;
66
    struct drm_connector *connector;
62
    struct drm_crtc      *crtc;
67
    struct drm_crtc      *crtc;
63
 
68
 
64
    struct list_head   cursors;
69
    struct list_head   cursors;
65
 
70
 
66
    cursor_t   *cursor;
71
    cursor_t   *cursor;
67
    int       (*init_cursor)(cursor_t*);
72
    int       (*init_cursor)(cursor_t*);
68
    cursor_t* (__stdcall *select_cursor)(cursor_t*);
73
    cursor_t* (__stdcall *select_cursor)(cursor_t*);
69
    void      (*show_cursor)(int show);
74
    void      (*show_cursor)(int show);
70
    void      (__stdcall *move_cursor)(cursor_t *cursor, int x, int y);
75
    void      (__stdcall *move_cursor)(cursor_t *cursor, int x, int y);
71
    void      (__stdcall *restore_cursor)(int x, int y);
76
    void      (__stdcall *restore_cursor)(int x, int y);
72
    void      (*disable_mouse)(void);
77
    void      (*disable_mouse)(void);
73
    u32  mask_seqno;
78
    u32  mask_seqno;
74
    u32  check_mouse;
79
    u32  check_mouse;
75
    u32  check_m_pixel;
80
    u32  check_m_pixel;
76
 
81
 
77
    u32  bytes_per_pixel;
82
    u32  bytes_per_pixel;
78
};
83
};
79
 
84
 
80
extern display_t *os_display;
85
extern display_t *os_display;