table of contents
other versions
SDL_GetPenStatus(3) | SDL3 FUNCTIONS | SDL_GetPenStatus(3) |
NAME¶
SDL_GetPenStatus - Retrieves the pen's current status.
HEADER FILE¶
Defined in SDL3/SDL_pen.h
SYNOPSIS¶
#include "SDL3/SDL.h"
Uint32 SDL_GetPenStatus(SDL_PenID instance_id, float *x, float *y, float *axes, size_t num_axes);
DESCRIPTION¶
If the pen is detached (cf. SDL_PenConnected ), this operation may return default values.
FUNCTION PARAMETERS¶
- instance_id
- the pen to query.
- x
- out-mode parameter for pen x coordinate. May be NULL.
- y
- out-mode parameter for pen y coordinate. May be NULL.
- axes
- out-mode parameter for axis information. May be null. The axes are in the same order as SDL_PenAxis .
- num_axes
- maximum number of axes to write to "axes".
RETURN VALUE¶
Returns a bit mask with the current pen button states (
SDL_BUTTON_LMASK
etc.), possibly
SDL_PEN_DOWN_MASK , and exactly one of
SDL_PEN_INK_MASK
or
SDL_PEN_ERASER_MASK
, or 0 on error (see
SDL_GetError ()).
AVAILABILITY¶
This function is available since SDL 3.0.0.
SDL 3.1.2 | Simple Directmedia Layer |