mirror of
				https://github.com/bspeice/libcvautomation
				synced 2025-11-04 02:10:35 -05:00 
			
		
		
		
	Add functions to scroll the mouse up and down
This commit is contained in:
		@ -486,6 +486,34 @@ void xte_mouseJiggle ( Display *displayLocation )
 | 
			
		||||
	XFlush( displayLocation );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* 
 | 
			
		||||
 * ===  FUNCTION  ======================================================================
 | 
			
		||||
 *         Name:  xte_mouseScrollUp
 | 
			
		||||
 *  Description:  Scroll the mouse up
 | 
			
		||||
 * =====================================================================================
 | 
			
		||||
 */
 | 
			
		||||
void xte_mouseScrollUp ( Display *displayLocation )
 | 
			
		||||
{
 | 
			
		||||
	XTestFakeButtonEvent( displayLocation, 4, True, CurrentTime );
 | 
			
		||||
	XTestFakeButtonEvent( displayLocation, 4, False, CurrentTime );
 | 
			
		||||
 | 
			
		||||
	XFlush( displayLocation );
 | 
			
		||||
}		/* -----  end of function xte_mouseScrollUp  ----- */
 | 
			
		||||
 | 
			
		||||
/* 
 | 
			
		||||
 * ===  FUNCTION  ======================================================================
 | 
			
		||||
 *         Name:  xte_mouseScrollDown
 | 
			
		||||
 *  Description:  Scroll the mouse down
 | 
			
		||||
 * =====================================================================================
 | 
			
		||||
 */
 | 
			
		||||
void xte_mouseScrollDown ( Display *displayLocation )
 | 
			
		||||
{
 | 
			
		||||
	XTestFakeButtonEvent( displayLocation, 5, True, CurrentTime );
 | 
			
		||||
	XTestFakeButtonEvent( displayLocation, 5, False, CurrentTime );
 | 
			
		||||
 | 
			
		||||
	XFlush( displayLocation );
 | 
			
		||||
}		/* -----  end of function xte_mouseScrollDown  ----- */
 | 
			
		||||
 | 
			
		||||
/* 
 | 
			
		||||
 * ===  FUNCTION  ======================================================================
 | 
			
		||||
 *         Name:  xte_clickKey
 | 
			
		||||
@ -688,6 +716,14 @@ cvaPoint xte_commandString ( Display *displayLocation, char *commandString, int
 | 
			
		||||
	{
 | 
			
		||||
		xte_mouseJiggle( displayLocation );
 | 
			
		||||
	}
 | 
			
		||||
	else if (IS_CMD( s_commandString, "mousescrollu" ))
 | 
			
		||||
	{
 | 
			
		||||
		xte_mouseScrollUp( displayLocation );
 | 
			
		||||
	}
 | 
			
		||||
	else if (IS_CMD( s_commandString, "mousescrolld" ))
 | 
			
		||||
	{
 | 
			
		||||
		xte_mouseScrollDown( displayLocation );
 | 
			
		||||
	}
 | 
			
		||||
	else if (IS_CMD( s_commandString, "keyclick" ))
 | 
			
		||||
	{
 | 
			
		||||
		char *key;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user