src/video/x11/SDL_x11mouse.c
changeset 1575 3ba88cb7eb1b
parent 1402 d910939febfa
child 1657 5b0805ceb50f
     1.1 --- a/src/video/x11/SDL_x11mouse.c	Wed Mar 22 04:51:44 2006 +0000
     1.2 +++ b/src/video/x11/SDL_x11mouse.c	Wed Mar 22 05:00:59 2006 +0000
     1.3 @@ -41,8 +41,8 @@
     1.4  {
     1.5  	if ( SDL_Display != NULL ) {
     1.6  		SDL_Lock_EventThread();
     1.7 -		pXFreeCursor(SDL_Display, cursor->x_cursor);
     1.8 -		pXSync(SDL_Display, False);
     1.9 +		XFreeCursor(SDL_Display, cursor->x_cursor);
    1.10 +		XSync(SDL_Display, False);
    1.11  		SDL_Unlock_EventThread();
    1.12  	}
    1.13  	SDL_free(cursor);
    1.14 @@ -96,48 +96,48 @@
    1.15  	SDL_Lock_EventThread();
    1.16  
    1.17  	/* Create the data image */
    1.18 -	data_image = pXCreateImage(SDL_Display, 
    1.19 +	data_image = XCreateImage(SDL_Display, 
    1.20  			DefaultVisual(SDL_Display, SDL_Screen),
    1.21  					1, XYBitmap, 0, x_data, w, h, 8, w/8);
    1.22  	data_image->byte_order = MSBFirst;
    1.23  	data_image->bitmap_bit_order = MSBFirst;
    1.24 -	data_pixmap = pXCreatePixmap(SDL_Display, SDL_Root, w, h, 1);
    1.25 +	data_pixmap = XCreatePixmap(SDL_Display, SDL_Root, w, h, 1);
    1.26  
    1.27  	/* Create the data mask */
    1.28 -	mask_image = pXCreateImage(SDL_Display, 
    1.29 +	mask_image = XCreateImage(SDL_Display, 
    1.30  			DefaultVisual(SDL_Display, SDL_Screen),
    1.31  					1, XYBitmap, 0, x_mask, w, h, 8, w/8);
    1.32  	mask_image->byte_order = MSBFirst;
    1.33  	mask_image->bitmap_bit_order = MSBFirst;
    1.34 -	mask_pixmap = pXCreatePixmap(SDL_Display, SDL_Root, w, h, 1);
    1.35 +	mask_pixmap = XCreatePixmap(SDL_Display, SDL_Root, w, h, 1);
    1.36  
    1.37  	/* Create the graphics context */
    1.38  	GCvalues.function = GXcopy;
    1.39  	GCvalues.foreground = ~0;
    1.40  	GCvalues.background =  0;
    1.41  	GCvalues.plane_mask = AllPlanes;
    1.42 -	GCcursor = pXCreateGC(SDL_Display, data_pixmap,
    1.43 +	GCcursor = XCreateGC(SDL_Display, data_pixmap,
    1.44  			(GCFunction|GCForeground|GCBackground|GCPlaneMask),
    1.45  								&GCvalues);
    1.46  
    1.47  	/* Blit the images to the pixmaps */
    1.48 -	pXPutImage(SDL_Display, data_pixmap, GCcursor, data_image,
    1.49 +	XPutImage(SDL_Display, data_pixmap, GCcursor, data_image,
    1.50  							0, 0, 0, 0, w, h);
    1.51 -	pXPutImage(SDL_Display, mask_pixmap, GCcursor, mask_image,
    1.52 +	XPutImage(SDL_Display, mask_pixmap, GCcursor, mask_image,
    1.53  							0, 0, 0, 0, w, h);
    1.54 -	pXFreeGC(SDL_Display, GCcursor);
    1.55 +	XFreeGC(SDL_Display, GCcursor);
    1.56  	/* These free the x_data and x_mask memory pointers */
    1.57 -	pXDestroyImage(data_image);
    1.58 -	pXDestroyImage(mask_image);
    1.59 +	XDestroyImage(data_image);
    1.60 +	XDestroyImage(mask_image);
    1.61  
    1.62  	/* Create the cursor */
    1.63 -	cursor->x_cursor = pXCreatePixmapCursor(SDL_Display, data_pixmap,
    1.64 +	cursor->x_cursor = XCreatePixmapCursor(SDL_Display, data_pixmap,
    1.65  				mask_pixmap, &black, &white, hot_x, hot_y);
    1.66 -	pXFreePixmap(SDL_Display, data_pixmap);
    1.67 -	pXFreePixmap(SDL_Display, mask_pixmap);
    1.68 +	XFreePixmap(SDL_Display, data_pixmap);
    1.69 +	XFreePixmap(SDL_Display, mask_pixmap);
    1.70  
    1.71  	/* Release the event thread */
    1.72 -	pXSync(SDL_Display, False);
    1.73 +	XSync(SDL_Display, False);
    1.74  	SDL_Unlock_EventThread();
    1.75  
    1.76  	return(cursor);
    1.77 @@ -155,13 +155,13 @@
    1.78  		SDL_Lock_EventThread();
    1.79  		if ( cursor == NULL ) {
    1.80  			if ( SDL_BlankCursor != NULL ) {
    1.81 -				pXDefineCursor(SDL_Display, SDL_Window,
    1.82 +				XDefineCursor(SDL_Display, SDL_Window,
    1.83  					SDL_BlankCursor->x_cursor);
    1.84  			}
    1.85  		} else {
    1.86 -			pXDefineCursor(SDL_Display, SDL_Window, cursor->x_cursor);
    1.87 +			XDefineCursor(SDL_Display, SDL_Window, cursor->x_cursor);
    1.88  		}
    1.89 -		pXSync(SDL_Display, False);
    1.90 +		XSync(SDL_Display, False);
    1.91  		SDL_Unlock_EventThread();
    1.92  	}
    1.93  	return(1);
    1.94 @@ -178,8 +178,8 @@
    1.95  		SDL_PrivateMouseMotion(0, 0, x, y);
    1.96  	} else {
    1.97  		SDL_Lock_EventThread();
    1.98 -		pXWarpPointer(SDL_Display, None, SDL_Window, 0, 0, 0, 0, x, y);
    1.99 -		pXSync(SDL_Display, False);
   1.100 +		XWarpPointer(SDL_Display, None, SDL_Window, 0, 0, 0, 0, x, y);
   1.101 +		XSync(SDL_Display, False);
   1.102  		SDL_Unlock_EventThread();
   1.103  	}
   1.104  }
   1.105 @@ -217,7 +217,7 @@
   1.106  		}
   1.107  	}
   1.108  	if ( mouse_param_buf ) {
   1.109 -		pXChangePointerControl(SDL_Display, True, True,
   1.110 +		XChangePointerControl(SDL_Display, True, True,
   1.111  			accel_value[0], accel_value[1], accel_value[2]);
   1.112  		SDL_free(mouse_param_buf);
   1.113  	}
   1.114 @@ -250,7 +250,7 @@
   1.115  
   1.116  				SDL_GetMouseState(&mouse_last.x, &mouse_last.y);
   1.117  				/* Use as raw mouse mickeys as possible */
   1.118 -				pXGetPointerControl(SDL_Display,
   1.119 +				XGetPointerControl(SDL_Display,
   1.120  						&mouse_accel.numerator, 
   1.121  						&mouse_accel.denominator,
   1.122  						&mouse_accel.threshold);
   1.123 @@ -266,7 +266,7 @@
   1.124  			if ( using_dga & DGA_MOUSE ) {
   1.125  				X11_DisableDGAMouse(this);
   1.126  			} else {
   1.127 -				pXChangePointerControl(SDL_Display, True, True,
   1.128 +				XChangePointerControl(SDL_Display, True, True,
   1.129  						mouse_accel.numerator, 
   1.130  						mouse_accel.denominator,
   1.131  						mouse_accel.threshold);