Rev 9620 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8818 | turbocat | 1 | #include |
2 | #include |
||
9766 | turbocat | 3 | #include |
8818 | turbocat | 4 | |
5 | int main() |
||
6 | { |
||
9766 | turbocat | 7 | open_dialog* dlg_open = kolibri_new_open_dialog(OPEN, 10, 10, 420, 320); // create opendialog struct |
8 | OpenDialog_init(dlg_open); // Initializing an open dialog box. |
||
9 | OpenDialog_start(dlg_open); // Show open dialog box |
||
10 | |||
11 | color_dialog* color_select = kolibri_new_color_dialog(SELECT, 10, 10, 420, 320); // create colordialog struct |
||
12 | ColorDialog_init(color_select); // Initializing an color dialog box. |
||
13 | ColorDialog_start(color_select); // Show color dialog |
||
14 | |||
15 | if (dlg_open->status == SUCCESS) { |
||
16 | printf("File selected '%s'\n", dlg_open->openfile_path); |
||
17 | } else { |
||
8818 | turbocat | 18 | puts("No file selected!"); |
19 | } |
||
9766 | turbocat | 20 | |
21 | if (color_select->status == SUCCESS) { |
||
22 | printf("Color selected: #%06X\n", color_select->color); |
||
8818 | turbocat | 23 | rgb_t color_rgb = (rgb_t)color_select->color; |
9766 | turbocat | 24 | printf("Red:%d Green:%d Blue:%d", color_rgb.red, color_rgb.green, color_rgb.blue); |
25 | } else { |
||
8818 | turbocat | 26 | puts("No color selected!"); |
27 | } |
||
28 | free(dlg_open); |
||
29 | free(color_select); |
||
30 | return 0; |
||
31 | } |