bzr branch
http://gegoxaren.bato24.eu/bzr/%2Bjunk/c_sdl_joypad
1
by Gustav Hartvigsson
Initial code. |
1 |
#ifndef __H_MOUSE_POINTER__
|
2 |
#define __H_MOUSE_POINTER__
|
|
3 |
||
4 |
#include <SDL2/SDL.h> |
|
5 |
#include <stdbool.h> |
|
6 |
||
7 |
typedef struct _MousePointer MousePointer; |
|
8 |
||
9 |
struct _MousePointer { |
|
10 |
SDL_Point possision; /* True posision */ |
|
11 |
bool pressed; |
|
12 |
SDL_Color box_colour; |
|
13 |
SDL_Rect * draw_rect; |
|
14 |
SDL_Rect * bounding_box; |
|
15 |
SDL_Texture * image; |
|
16 |
};
|
|
17 |
||
18 |
MousePointer * mouse_pointer_new (int b_box_h, int b_box_w); |
|
19 |
void mouse_pointer_move (MousePointer * self, int delta_x, int delta_y); |
|
20 |
void mouse_pointer_move_to (MousePointer * self, int x, int y); |
|
21 |
void mouse_pointer_draw (MousePointer * self, SDL_Renderer * renderer); |
|
22 |
void mouse_pointer_free (MousePointer * self); |
|
23 |
void mouse_pointer_force_pos (MousePointer * self); |
|
24 |
||
25 |
#endif
|