18 return (state == 0) ||
165 for ( row=0; row<32; ++
row ) {
166 for ( col=0; col<32; ++col ) {
172 data[
i] = mask[
i] = 0;
174 switch (image[row][col]) {
207 if (cursor ==
NULL) {
239 if (cursor ==
NULL) {
266 SDLTest_AssertCheck(result == oldState,
"Validate result from SDL_ShowCursor(%s), expected: %i, got: %i",
267 (state ==
SDL_ENABLE) ?
"SDL_ENABLE" :
"SDL_DISABLE", oldState, result);
319 if (cursor ==
NULL) {
375 for (i=0; i<2; i++) {
379 SDLTest_AssertCheck(result == 0,
"Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result);
386 for (i=0; i<2; i++) {
391 SDLTest_AssertCheck(result == 0,
"Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result);
401 SDLTest_AssertCheck(result == 0,
"Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result);
412 #define MOUSE_TESTWINDOW_WIDTH 320 413 #define MOUSE_TESTWINDOW_HEIGHT 200 433 if (window !=
NULL) {
449 int numPositions = 6;
482 for (i=0; i<numPositions; i++) {
483 for (j=0; j<numPositions; j++) {
static const SDLTest_TestCaseReference mouseTest8
int mouse_warpMouseInWindow(void *arg)
Check call to SDL_WarpMouseInWindow.
GLint GLint GLint GLint GLint x
Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max)
void _destroyMouseSuiteTestWindow(SDL_Window *window)
void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription,...) SDL_PRINTF_VARARG_FUNC(1)
Explicitly pass without checking an assertion condition. Updates assertion counter.
GLfloat GLfloat GLfloat GLfloat h
A collection of pixels used in software blitting.
static SDL_Cursor * _initArrowCursor(const char *image[])
int mouse_getCursor(void *arg)
Check call to SDL_GetCursor.
SDLTest_TestSuiteReference mouseTestSuite
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static const SDLTest_TestCaseReference mouseTest1
int mouse_getMouseState(void *arg)
Check call to SDL_GetMouseState.
#define SDL_SetRelativeMouseMode
static const SDLTest_TestCaseReference mouseTest6
int mouse_createFreeColorCursor(void *arg)
Check call to SDL_CreateColorCursor and SDL_FreeCursor.
SDL_Window * _createMouseSuiteTestWindow()
static const SDLTest_TestCaseReference mouseTest5
GLint GLint GLsizei width
static const char * _mouseArrowData[]
#define MOUSE_TESTWINDOW_WIDTH
static const SDLTest_TestCaseReference mouseTest7
SDL_Surface * SDLTest_ImageFace(void)
Returns the Face test image as SDL_Surface.
int(* SDLTest_TestCaseFp)(void *arg)
static const SDLTest_TestCaseReference mouseTest3
#define SDL_GetRelativeMouseMode
GLenum GLuint GLint GLenum face
int _mouseStateCheck(Uint32 state)
static const SDLTest_TestCaseReference mouseTest10
int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription,...) SDL_PRINTF_VARARG_FUNC(2)
Assert for test cases that logs but does not break execution flow on failures. Updates assertion coun...
int mouse_createFreeCursor(void *arg)
Check call to SDL_CreateCursor and SDL_FreeCursor.
#define SDL_GetRelativeMouseState
int mouse_getMouseFocus(void *arg)
Check call to SDL_GetMouseFocus.
int mouse_getRelativeMouseState(void *arg)
Check call to SDL_GetRelativeMouseState.
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int int in j)
GLubyte GLubyte GLubyte GLubyte w
#define SDL_BUTTON_MIDDLE
GLint GLint GLint GLint GLint GLint y
#define SDL_CreateColorCursor
static const SDLTest_TestCaseReference mouseTest4
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
int mouse_setCursor(void *arg)
Check call to SDL_SetCursor.
#define SDL_GetMouseFocus
GLint GLint GLsizei GLsizei height
EGLSurface EGLNativeWindowType * window
int mouse_showCursor(void *arg)
Check call to SDL_ShowCursor.
The type used to identify a window.
static const SDLTest_TestCaseReference mouseTest9
#define SDL_WarpMouseInWindow
static const SDLTest_TestCaseReference mouseTest2
void _changeCursorVisibility(int state)
#define SDL_DestroyWindow
#define SDL_GetMouseState
int mouse_getSetRelativeMouseMode(void *arg)
Check call to SDL_GetRelativeMouseMode and SDL_SetRelativeMouseMode.
#define MOUSE_TESTWINDOW_HEIGHT
static const SDLTest_TestCaseReference * mouseTests[]