PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/Core/Mouse.xs

http://github.com/PerlGameDev/SDL
Unknown | 45 lines | 35 code | 10 blank | 0 comment | 0 complexity | 5eb531dbab16d8ff8a554bd2cc320481 MD5 | raw file
 1#include "EXTERN.h"
 2#include "perl.h"
 3#include "XSUB.h"
 4#include "ppport.h"
 5
 6#ifndef aTHX_
 7#define aTHX_
 8#endif
 9
10#include <SDL.h>
11
12MODULE = SDL::Mouse 	PACKAGE = SDL::Mouse    PREFIX = mouse_
13
14void
15mouse_warp_mouse ( x, y )
16	Uint16 x
17	Uint16 y
18	CODE:
19		SDL_WarpMouse(x,y);
20
21void
22mouse_set_cursor ( cursor )
23	SDL_Cursor *cursor
24	CODE:
25		SDL_SetCursor(cursor);
26
27SDL_Cursor *
28mouse_get_cursor ()
29	PREINIT:
30	char* CLASS = "SDL::Cursor";
31	CODE:
32	RETVAL = SDL_GetCursor();
33	OUTPUT:
34		RETVAL
35
36int
37mouse_show_cursor ( toggle )
38	int toggle
39	CODE:
40		RETVAL = SDL_ShowCursor(toggle);
41	OUTPUT: 
42		RETVAL
43
44
45