Subversion Repositories Kolibri OS

Rev

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

Rev 6457 Rev 6524
Line 3... Line 3...
3
 
3
 
4
char sz_com_area_name[]    = "FFFFFFFF_open_dialog";
4
char sz_com_area_name[]    = "FFFFFFFF_open_dialog";
5
char sz_dir_default_path[] = "/rd/1";
5
char sz_dir_default_path[] = "/rd/1";
Line -... Line 6...
-
 
6
char sz_start_path[]       = "/rd/1/File managers/opendial";
-
 
7
 
-
 
8
enum open_dialog_mode {
-
 
9
    OPEN,
-
 
10
    SAVE,
-
 
11
    SELECT
-
 
12
};
-
 
13
 
-
 
14
typedef struct {
-
 
15
	unsigned int size;
-
 
16
	unsigned char end;
6
char sz_start_path[]       = "/rd/1/File managers/opendial";
17
}od_filter;
7
 
18
 
8
typedef struct {
19
typedef struct {
9
    unsigned int mode;
20
    unsigned int mode;
10
    unsigned int procinfo;
21
    char* procinfo;
11
    unsigned int com_area_name;
22
    char* com_area_name;
12
    unsigned int com_area;
23
    unsigned int com_area;
13
    unsigned int opendir_path;
24
    char* opendir_path;
14
    unsigned int dir_default_path;
25
    char* dir_default_path;
15
    unsigned int start_path;
26
    char* start_path;
16
    unsigned int draw_window;
27
    void (*draw_window)();
17
    unsigned int status;
28
    unsigned int status;
18
    unsigned int openfile_path;
29
    char* openfile_path;
19
    unsigned int filename_area;
30
    char* filename_area;
20
    unsigned int filter_area;
31
    od_filter* filter_area;
21
    unsigned short x_size;
32
    unsigned short x_size;
22
    unsigned short x_start;
33
    unsigned short x_start;
23
    unsigned short y_size;
34
    unsigned short y_size;
Line 24... Line -...
24
    unsigned short y_start;
-
 
25
}open_dialog;
-
 
26
 
-
 
27
typedef struct {
-
 
28
	unsigned int size;
-
 
29
	unsigned char end;
35
    unsigned short y_start;
Line 30... Line 36...
30
}od_filter;
36
}open_dialog;
31
 
37
 
32
void fake_on_redraw(void) {}
38
void fake_on_redraw(void) {}
33
 
39
 
34
struct open_dialog* kolibri_new_open_dialog(unsigned int mode, unsigned short tlx, unsigned short tly, unsigned short x_size, unsigned short y_size)
40
open_dialog* kolibri_new_open_dialog(unsigned int mode, unsigned short tlx, unsigned short tly, unsigned short x_size, unsigned short y_size)
35
{
41
{
Line 43... Line 49...
43
	new_od_filter -> size = 0;
49
	new_od_filter -> size = 0;
44
	new_od_filter -> end = 0;
50
	new_od_filter -> end = 0;
Line 45... Line 51...
45
	
51
 
46
	new_opendialog -> mode = mode;
52
	new_opendialog -> mode = mode;
47
	new_opendialog -> procinfo = proc_info;
53
	new_opendialog -> procinfo = proc_info;
48
	new_opendialog -> com_area_name = &sz_com_area_name;
54
	new_opendialog -> com_area_name = sz_com_area_name;
49
	new_opendialog -> com_area = 0;
55
	new_opendialog -> com_area = 0;
50
	new_opendialog -> opendir_path = plugin_path;
56
	new_opendialog -> opendir_path = plugin_path;
51
	new_opendialog -> dir_default_path = &sz_dir_default_path;
57
	new_opendialog -> dir_default_path = sz_dir_default_path;
52
	new_opendialog -> start_path = &sz_start_path;
58
	new_opendialog -> start_path = sz_start_path;
53
	new_opendialog -> draw_window = &fake_on_redraw;
59
	new_opendialog -> draw_window = &fake_on_redraw;
54
	new_opendialog -> status = 0;
60
	new_opendialog -> status = 0;
55
	new_opendialog -> openfile_path = openfile_path;
61
	new_opendialog -> openfile_path = openfile_path;
56
	new_opendialog -> filename_area = filename_area;
62
	new_opendialog -> filename_area = filename_area;
Line 60... Line 66...
60
	new_opendialog -> y_size = y_size;
66
	new_opendialog -> y_size = y_size;
61
	new_opendialog -> y_start = tly;
67
	new_opendialog -> y_start = tly;
62
	return new_opendialog;
68
	return new_opendialog;
63
}
69
}
Line -... Line 70...
-
 
70
 
64
 
71
extern void kolibri_proclib_init();
65
extern void (*OpenDialog_init)(open_dialog *) __attribute__((__stdcall__));
72
extern void (*OpenDialog_init)(open_dialog *) __attribute__((__stdcall__));
66
extern void (*OpenDialog_start)(open_dialog *) __attribute__((__stdcall__));
73
extern void (*OpenDialog_start)(open_dialog *) __attribute__((__stdcall__));