XenevaOS
Loading...
Searching...
No Matches
cursor.h
Go to the documentation of this file.
1
30#ifndef __CURSOR_H__
31#define __CURSOR_H__
32
33#include <stdint.h>
34#include <chitralekha.h>
35
36#define CURSOR_TYPE_POINTER 1
37#define CURSOR_TYPE_LOADING 2
38#define CURSOR_TYPE_TEXT 3
39#define CURSOR_TYPE_MOVE 4
40#define CURSOR_TYPE_RESIZE_UPDOWN 5
41#define CURSOR_TYPE_RESIZE_RIGHTLEFT 6
42
43
44
45typedef struct _cursor_ {
48 int width;
49 int height;
50 int bpp;
51 int cursorFD;
52 int xpos;
53 int ypos;
54 int oldXPos;
55 int oldYPos;
58 size_t cursorFileSize;
60
61
62/*
63* CursorOpen -- open a cursor from file
64* @param path -- path of the cursor
65* @param type -- cursor type
66*/
67extern Cursor* CursorOpen(char* path, uint8_t type);
68
69/* CursorRead -- read the cursor file
70* @param cur -- Pointer to cursor file
71*/
72extern void CursorRead(Cursor* cur);
73
74/*
75* CursorDraw -- draw the cursor to canvas
76* @param canv -- Pointer to canvas
77* @param cur - Pointer to cursor
78* @param x -- X position
79* @param y -- Y position
80*/
81extern void CursorDraw(ChCanvas* canv, Cursor* cur, unsigned int x, unsigned int y);
82
83#endif
Cursor * CursorOpen(char *path, uint8_t type)
Definition cursor.cpp:46
struct _cursor_ Cursor
void CursorDraw(ChCanvas *canv, Cursor *cur, unsigned int x, unsigned int y)
Definition cursor.cpp:115
void CursorRead(Cursor *cur)
Definition cursor.cpp:64
char * path
Definition main.cpp:62
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
Definition chitralekha.h:43
Definition cursor.h:45
int ypos
Definition cursor.h:53
int oldXPos
Definition cursor.h:54
int oldYPos
Definition cursor.h:55
uint32_t * cursorBack
Definition cursor.h:57
int cursorFD
Definition cursor.h:51
int width
Definition cursor.h:48
size_t cursorFileSize
Definition cursor.h:58
int bpp
Definition cursor.h:50
uint8_t * fileBuffer
Definition cursor.h:56
int xpos
Definition cursor.h:52
uint8_t type
Definition cursor.h:46
uint8_t * imageData
Definition cursor.h:47
int height
Definition cursor.h:49