Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
8101 superturbo 1
#include 
2
#include 
3
#include 
4
#include 
5
#include 
6
 
7
int main()
8
{
9
    unsigned int event;
10
    int ln_str = countUTF8Z("Example", -1);
11
    void *buffi = malloc(768*256*3 * sizeof(char));
12
    *((int*)buffi) = 768;
13
    *((int*)buffi+1) = 256;
14
    memset((char*)buffi+8, (char)-1, 768*256*3);
15
    drawText(buffi, 0, 0, "Example", ln_str, 0xFF000000, 0x30C18);
16
    drawText(buffi, 0, 32, "Example", ln_str, 0xFF000000, 0x1030C18);
17
    drawText(buffi, 0, 64, "Example", ln_str, 0xFF000000, 0x2030C18);
18
    drawText(buffi, 0, 96, "Example", ln_str, 0xFF000000, 0x4030C18);
19
    drawText(buffi, 0, 128, "Example", ln_str, 0xFF000000, 0x8030C18);
20
    drawText(buffi, 0, 160, "Example", ln_str, 0xFF000000, 0x0F031428);
21
    for (;;){
22
            event = get_os_event();
23
            switch (event)
24
            {
25
                case 1:
26
                    begin_draw();
27
                    sys_create_window(50, 50, 800, 300, "rasterworks example" ,0x34f0f0f0, 0x14);
28
                    draw_bitmap(buffi, 5, 25, 768, 256);
29
                    end_draw();
30
                break;
31
 
32
                case 2:
33
                    get_key();
34
                break;
35
 
36
                case 3:
37
                    if (1==get_os_button())
38
                    {
39
                        exit(0);
40
                    }
41
                break;
42
            };
43
        }
44
        exit(0);
45
}