Pyrogenesis  trunk
Functions
wcursor.cpp File Reference
#include "precompiled.h"
#include "lib/sysdep/cursor.h"
#include "lib/sysdep/gfx.h"
#include "lib/sysdep/os/win/win.h"
#include "lib/sysdep/os/win/wutil.h"
Include dependency graph for wcursor.cpp:

Functions

static sys_cursor cursor_from_HICON (HICON hIcon)
 
static sys_cursor cursor_from_HCURSOR (HCURSOR hCursor)
 
static HICON HICON_from_cursor (sys_cursor cursor)
 
static HCURSOR HCURSOR_from_cursor (sys_cursor cursor)
 
static Status sys_cursor_create_common (int w, int h, void *bgra_img, void *mask_img, int hx, int hy, sys_cursor *cursor)
 
Status sys_cursor_create (int w, int h, void *bgra_img, int hx, int hy, sys_cursor *cursor)
 Create a cursor from the given color image. More...
 
Status sys_cursor_create_empty (sys_cursor *cursor)
 Create a transparent cursor (used to hide the system cursor). More...
 
Status sys_cursor_set (sys_cursor cursor)
 override the current system cursor. More...
 
Status sys_cursor_free (sys_cursor cursor)
 destroy the indicated cursor and frees its resources. More...
 
Status sys_cursor_reset ()
 reset any cached cursor data. More...
 

Function Documentation

static sys_cursor cursor_from_HCURSOR ( HCURSOR  hCursor)
static
static sys_cursor cursor_from_HICON ( HICON  hIcon)
static
static HCURSOR HCURSOR_from_cursor ( sys_cursor  cursor)
static
static HICON HICON_from_cursor ( sys_cursor  cursor)
static
Status sys_cursor_create ( int  w,
int  h,
void *  bgra_img,
int  hx,
int  hy,
sys_cursor cursor 
)

Create a cursor from the given color image.

Parameters
w,hImage dimensions [pixels]. the maximum value is implementation-defined; 32x32 is typical and safe.
bgra_imgcursor image (BGRA format, bottom-up). It is copied and can be freed after this call returns.
hx,hy'hotspot', i.e. offset from the upper-left corner to the position where mouse clicks are registered.
cursorIs 0 if the return code indicates failure, otherwise a valid cursor that must be sys_cursor_free-ed when no longer needed.
static Status sys_cursor_create_common ( int  w,
int  h,
void *  bgra_img,
void *  mask_img,
int  hx,
int  hy,
sys_cursor cursor 
)
static
Status sys_cursor_create_empty ( sys_cursor cursor)

Create a transparent cursor (used to hide the system cursor).

Parameters
cursoris 0 if the return code indicates failure, otherwise a valid cursor that must be sys_cursor_free-ed when no longer needed.
Status sys_cursor_free ( sys_cursor  cursor)

destroy the indicated cursor and frees its resources.

Parameters
cursorif currently in use, the default cursor is restored first.
Status sys_cursor_reset ( )

reset any cached cursor data.

on some systems, this is needed when resetting the SDL video subsystem.

Status sys_cursor_set ( sys_cursor  cursor)

override the current system cursor.

Parameters
cursorcan be 0 to restore the default.