test/testautomation_mouse.c
changeset 11275 6dd70238edb7
parent 7191 75360622e65f
equal deleted inserted replaced
11274:daea00fb0938 11275:6dd70238edb7
   445 int
   445 int
   446 mouse_warpMouseInWindow(void *arg)
   446 mouse_warpMouseInWindow(void *arg)
   447 {
   447 {
   448     const int w = MOUSE_TESTWINDOW_WIDTH, h = MOUSE_TESTWINDOW_HEIGHT;
   448     const int w = MOUSE_TESTWINDOW_WIDTH, h = MOUSE_TESTWINDOW_HEIGHT;
   449     int numPositions = 6;
   449     int numPositions = 6;
   450     int xPositions[] = {-1, 0, 1, w-1, w, w+1 };
   450     int xPositions[6];
   451     int yPositions[] = {-1, 0, 1, h-1, h, h+1 };
   451     int yPositions[6];
   452     int x, y, i, j;
   452     int x, y, i, j;
   453     SDL_Window *window;
   453     SDL_Window *window;
   454 
   454 
       
   455     xPositions[0] = -1;
       
   456     xPositions[1] = 0;
       
   457     xPositions[2] = 1;
       
   458     xPositions[3] = w-1;
       
   459     xPositions[4] = w;
       
   460     xPositions[5] = w+1;
       
   461     yPositions[0] = -1;
       
   462     yPositions[1] = 0;
       
   463     yPositions[2] = 1;
       
   464     yPositions[3] = h-1;
       
   465     yPositions[4] = h;
       
   466     yPositions[5] = h+1;
   455     /* Create test window */
   467     /* Create test window */
   456     window = _createMouseSuiteTestWindow();
   468     window = _createMouseSuiteTestWindow();
   457     if (window == NULL) return TEST_ABORTED;
   469     if (window == NULL) return TEST_ABORTED;
   458 
   470 
   459     /* Mouse to random position inside window */
   471     /* Mouse to random position inside window */