Pyrogenesis
trunk
|
#include "precompiled.h"
#include "cursor.h"
#include <cstdio>
#include <cstring>
#include <sstream>
#include "lib/external_libraries/libsdl.h"
#include "lib/ogl.h"
#include "lib/res/h_mgr.h"
#include "lib/sysdep/cursor.h"
#include "ogl_tex.h"
Classes | |
class | SDLCursor |
class | GLCursor |
struct | Cursor |
Macros | |
#define | ALLOW_SYS_CURSOR 0 |
Enumerations | |
enum | CursorKind { CK_Default, CK_SDL, CK_OpenGL } |
Functions | |
H_TYPE_DEFINE (Cursor) | |
static void | Cursor_init (Cursor *c, va_list args) |
static void | Cursor_dtor (Cursor *c) |
static Status | Cursor_reload (Cursor *c, const PIVFS &vfs, const VfsPath &name, Handle) |
static Status | Cursor_validate (const Cursor *c) |
static Status | Cursor_to_string (const Cursor *c, wchar_t *buf) |
static Handle | cursor_load (const PIVFS &vfs, const VfsPath &name, bool forceGL) |
void | cursor_shutdown () |
Forcibly frees all cursor handles. More... | |
static Status | cursor_free (Handle &h) |
Status | cursor_draw (const PIVFS &vfs, const wchar_t *name, int x, int y, bool forceGL) |
Draw the cursor on-screen. More... | |
#define ALLOW_SYS_CURSOR 0 |
enum CursorKind |
Draw the cursor on-screen.
vfs | |
name | Base name of cursor or zero to hide the cursor. |
x,y | Coordinates [pixels] (origin at lower left) (the origin is convenient for drawing via OpenGL, but requires the mouse Y coordinate to be subtracted from the client area height. Making the caller responsible for this avoids a dependency on the g_yres global variable.) |
forceGL | Require the OpenGL cursor implementation, not hardware cursor |
Uses a hardware mouse cursor where available, otherwise a portable OpenGL implementation.
|
static |
|
static |
void cursor_shutdown | ( | ) |
Forcibly frees all cursor handles.
Currently used just prior to SDL shutdown.
H_TYPE_DEFINE | ( | Cursor | ) |