/+junk/c_sdl_joypad_ducktape

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/c_sdl_joypad_ducktape
21 by Gustav Hatvigsson
* added Modeline to (almost) all files.
1
/* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil
2
 * vi: set shiftwidth=2 tabstop=2 expandtab:
3
 * :indentSize=2:tabSize=2:noTabs=true:
4
 */
5
1 by Gustav Hartvigsson
Initial code.
6
#ifndef __H_MOUSE_POINTER__
7
#define __H_MOUSE_POINTER__
8
26 by Gustav Hartvigsson
* Fixed the DynamicArray
9
/** @file
7 by Gustav Hartvigsson
* Added licensing information to the files.
10
 *
8 by Gustav Hartvigsson
* added and changed little in the files Lincening information.
11
 * Author Gustav Hartvigsson <gustav.hartvigsson _at_ gmail.com> 2014
7 by Gustav Hartvigsson
* Added licensing information to the files.
12
 */
13
1 by Gustav Hartvigsson
Initial code.
14
#include <SDL2/SDL.h>
15
#include <stdbool.h>
26 by Gustav Hartvigsson
* Fixed the DynamicArray
16
/******************************************************************************/
17
18
/**
19
 * An object that represents a mounse pointer.
20
 *
21
 * 
22
 */
23
typedef struct MousePointer MousePointer;
24
25
struct MousePointer {
1 by Gustav Hartvigsson
Initial code.
26
  SDL_Point possision; /* True posision */
27
  bool pressed;
26 by Gustav Hartvigsson
* Fixed the DynamicArray
28
  SDL_Color * box_color;
1 by Gustav Hartvigsson
Initial code.
29
  SDL_Rect * draw_rect;
30
  SDL_Rect * bounding_box;
31
  SDL_Texture * image;
32
};
33
26 by Gustav Hartvigsson
* Fixed the DynamicArray
34
/**
35
 * create a new mouse pointer.
36
 * 
37
 * 
38
 * 
39
 * @param b_box_h the height of the bounding box of the pointer.
40
 * @param b_box_w the width of the bounding box of the pointer.
41
 * @param color the color of the bouningbox of the pointer, @c NULL allowed.
42
 */
43
MousePointer * mouse_pointer_new (int  b_box_h, int b_box_w, SDL_Color * color);
44
1 by Gustav Hartvigsson
Initial code.
45
void mouse_pointer_move (MousePointer * self, int delta_x, int delta_y);
26 by Gustav Hartvigsson
* Fixed the DynamicArray
46
1 by Gustav Hartvigsson
Initial code.
47
void mouse_pointer_move_to (MousePointer * self, int x, int y);
26 by Gustav Hartvigsson
* Fixed the DynamicArray
48
1 by Gustav Hartvigsson
Initial code.
49
void mouse_pointer_draw (MousePointer * self, SDL_Renderer * renderer);
26 by Gustav Hartvigsson
* Fixed the DynamicArray
50
1 by Gustav Hartvigsson
Initial code.
51
void mouse_pointer_free (MousePointer * self);
26 by Gustav Hartvigsson
* Fixed the DynamicArray
52
1 by Gustav Hartvigsson
Initial code.
53
void mouse_pointer_force_pos (MousePointer * self);
54
55
#endif