Subversion Repositories Kolibri OS

Rev

Rev 4497 | Rev 5676 | 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
4497 leency 4
 
5598 pavelyakov 5
#ifndef INCLUDE_KOLIBRI_H
6
#include "../lib/kolibri.h"
7
#endif
8
 
4497 leency 9
struct CustomCursor
10
{
11
    dword CursorPointer;
12
    dword Load();
13
    dword Set();
14
    dword Restore();
15
    void Delete();
16
};
17
 
18
dword CustomCursor::Load(dword CursorFilePath)
19
{
20
    if (CursorPointer) return;
21
    EAX = 37;
22
    EBX = 4;
23
    ECX = CursorFilePath;
24
    EDX = 1;
25
    $int 0x40
26
    CursorPointer = EAX; // 0 - err, other - handle
27
}
28
 
29
dword CustomCursor::Set()
30
{
31
  EAX = 37;
32
  EBX = 5;
33
  ECX = CursorPointer;
34
  $int 0x40
35
}
36
 
37
dword CustomCursor::Restore()
38
{
39
  EAX = 37;
40
  EBX = 5;
41
  ECX = 0;
42
  $int 0x40
43
}
44
 
45
void CustomCursor::Delete()
46
{
47
    EAX = 37;
48
    EBX = 6;
49
    ECX = CursorPointer;
50
    $int 0x40
51
}
5598 pavelyakov 52
 
53
#endif