Subversion Repositories Kolibri OS

Rev

Rev 9620 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9620 Rev 9766
Line 1... Line 1...
1
/* Written by turbocat2001 (Logaev Maxim) */
1
/* Written by turbocat2001 (Logaev Maxim) */
Line -... Line 2...
-
 
2
 
-
 
3
#include 
2
 
4
#include 
3
#include 
5
#include 
4
#include 
-
 
5
#include 
-
 
6
#include 
6
#include 
Line 7... Line 7...
7
#include 
7
#include 
8
 
8
 
Line 14... Line 14...
14
 
14
 
Line 15... Line 15...
15
Image *image_blend; // Create image struct
15
Image* image_blend; // Create image struct
Line 16... Line 16...
16
 
16
 
-
 
17
ksys_colors_table_t sys_color_table; // Create system colors table
17
ksys_colors_table_t sys_color_table;  // Create system colors table
18
 
18
 
19
void* load_img(char* fname, uint32_t* read_sz)
19
void* load_img(char* fname, uint32_t* read_sz){  // Image file upload function
20
{ // Image file upload function
20
    FILE *f = fopen(fname, "rb");
21
    FILE* f = fopen(fname, "rb");
21
    if (!f) {
22
    if (!f) {
Line 40... Line 41...
40
    }
41
    }
41
    fclose(f);
42
    fclose(f);
42
    return fdata;
43
    return fdata;
43
}
44
}
Line 44... Line 45...
44
 
45
 
-
 
46
void draw_gui()
45
void draw_gui(){
47
{
46
    _ksys_start_draw();
48
    _ksys_start_draw();
47
    _ksys_create_window(10, 40, (IMG_W+NEW_IMG_W)+50, IMG_H+50, "Libimg", sys_color_table.work_area, 0x34);
49
    _ksys_create_window(10, 40, (IMG_W + NEW_IMG_W) + 50, IMG_H + 50, "Libimg", sys_color_table.work_area, 0x34);
48
    img_draw(image_blend, 10, 10, IMG_W*2, IMG_H , 0, 0);  // Draw blended image to window
50
    img_draw(image_blend, 10, 10, IMG_W * 2, IMG_H, 0, 0); // Draw blended image to window
49
    _ksys_end_draw();
51
    _ksys_end_draw();
Line 50... Line 52...
50
}
52
}
-
 
53
 
51
 
54
int main()
52
int main(){
55
{
Line 53... Line 56...
53
    _ksys_get_system_colors(&sys_color_table); // Get system colors theme
56
    _ksys_get_system_colors(&sys_color_table); // Get system colors theme
54
    _ksys_set_event_mask(0xC0000027);
57
    _ksys_set_event_mask(0xC0000027);