Subversion Repositories Kolibri OS

Rev

Rev 5598 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4497 leency 1
// cursor file should be 32x32 in default MS Windows .cur format
5598 pavelyakov 2
#ifndef INCLUDE_CURSOR_H
3
#define INCLUDE_CURSOR_H
5676 pavelyakov 4
#print "[include ]\n"
4497 leency 5
 
5598 pavelyakov 6
#ifndef INCLUDE_KOLIBRI_H
7
#include "../lib/kolibri.h"
8
#endif
9
 
4497 leency 10
struct CustomCursor
11
{
12
    dword CursorPointer;
13
    dword Load();
14
    dword Set();
15
    dword Restore();
16
    void Delete();
17
};
18
 
19
dword CustomCursor::Load(dword CursorFilePath)
20
{
21
    if (CursorPointer) return;
22
    EAX = 37;
23
    EBX = 4;
24
    ECX = CursorFilePath;
25
    EDX = 1;
26
    $int 0x40
27
    CursorPointer = EAX; // 0 - err, other - handle
28
}
29
 
30
dword CustomCursor::Set()
31
{
32
  EAX = 37;
33
  EBX = 5;
34
  ECX = CursorPointer;
35
  $int 0x40
36
}
37
 
38
dword CustomCursor::Restore()
39
{
40
  EAX = 37;
41
  EBX = 5;
42
  ECX = 0;
43
  $int 0x40
44
}
45
 
46
void CustomCursor::Delete()
47
{
48
    EAX = 37;
49
    EBX = 6;
50
    ECX = CursorPointer;
51
    $int 0x40
52
}
5598 pavelyakov 53
 
54
#endif