Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6392 punk_joker 1
#ifndef KOLIBRI_COLORIALOG_H
2
#define KOLIBRI_COLORIALOG_H
3
 
4
char cd_com_area_name[]    = "FFFFFFFF_color_dialog";
5
char cd_start_path[]       = "/rd/1/colrdial";
6
 
7
struct color_dialog {
8
    unsigned int type;
9
    unsigned int procinfo;
10
    unsigned int com_area_name;
11
    unsigned int com_area;
12
    unsigned int start_path;
13
    unsigned int draw_window;
14
    unsigned int status;
15
    unsigned short x_size;
16
    unsigned short x_start;
17
    unsigned short y_size;
18
    unsigned short y_start;
19
    unsigned int color_type;
20
    unsigned int color;
21
};
22
 
23
void cd_fake_on_redraw(void) {}
24
 
25
struct open_dialog* kolibri_new_color_dialog(unsigned int type, unsigned short tlx, unsigned short tly, unsigned short x_size, unsigned short y_size)
26
{
27
    struct color_dialog *new_colordialog = (struct color_dialog *)malloc(sizeof(struct color_dialog));
28
    char *proc_info = (char *)calloc(1024, sizeof(char));
29
 
30
	new_colordialog -> type = type;
31
	new_colordialog -> procinfo = proc_info;
32
	new_colordialog -> com_area_name = &cd_com_area_name;
33
	new_colordialog -> com_area = 0;
34
	new_colordialog -> start_path = &cd_start_path;
35
	new_colordialog -> draw_window = &cd_fake_on_redraw;
36
	new_colordialog -> status = 0;
37
	new_colordialog -> x_size = x_size;
38
	new_colordialog -> x_start = tlx;
39
	new_colordialog -> y_size = y_size;
40
	new_colordialog -> y_start = tly;
41
	new_colordialog -> color_type = 0;
42
	new_colordialog -> color = 0;
43
	return new_colordialog;
44
}
45
 
46
extern void (*ColorDialog_init)(struct open_dialog *) __attribute__((__stdcall__));
47
extern void (*ColorDialog_start)(struct open_dialog *) __attribute__((__stdcall__));
48
#endif /* KOLIBRI_COLORDIALOG_H */