Stripped out tabs and end-of-line whitespace
Differences are in whitespace only git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@475 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
c203af6503
commit
a291d1e0d3
@ -128,7 +128,7 @@ void FGAPIENTRY glutTimerFunc( unsigned int timeOut, void (* callback)( int ),
|
|||||||
static void fghVisibility( int status )
|
static void fghVisibility( int status )
|
||||||
{
|
{
|
||||||
int glut_status = GLUT_VISIBLE;
|
int glut_status = GLUT_VISIBLE;
|
||||||
|
|
||||||
freeglut_assert_ready;
|
freeglut_assert_ready;
|
||||||
freeglut_return_if_fail( fgStructure.Window );
|
freeglut_return_if_fail( fgStructure.Window );
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ int fgGetCursorError( Cursor cursor )
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
char buf[ 256 ];
|
char buf[ 256 ];
|
||||||
|
|
||||||
switch( cursor )
|
switch( cursor )
|
||||||
{
|
{
|
||||||
case BadAlloc:
|
case BadAlloc:
|
||||||
@ -110,7 +110,7 @@ void FGAPIENTRY glutSetCursor( int cursorID )
|
|||||||
|
|
||||||
if( GLUT_CURSOR_FULL_CROSSHAIR == cursorID )
|
if( GLUT_CURSOR_FULL_CROSSHAIR == cursorID )
|
||||||
cursorID = GLUT_CURSOR_CROSSHAIR;
|
cursorID = GLUT_CURSOR_CROSSHAIR;
|
||||||
|
|
||||||
switch( cursorID )
|
switch( cursorID )
|
||||||
{
|
{
|
||||||
MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, XC_right_ptr);
|
MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, XC_right_ptr);
|
||||||
@ -162,7 +162,7 @@ void FGAPIENTRY glutSetCursor( int cursorID )
|
|||||||
0, 0 );
|
0, 0 );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case GLUT_CURSOR_INHERIT:
|
case GLUT_CURSOR_INHERIT:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ void FGAPIENTRY glutSetCursor( int cursorID )
|
|||||||
MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS );
|
MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS );
|
||||||
/* MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO ); */
|
/* MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO ); */
|
||||||
ZAP_CURSOR( GLUT_CURSOR_NONE, NULL );
|
ZAP_CURSOR( GLUT_CURSOR_NONE, NULL );
|
||||||
|
|
||||||
default:
|
default:
|
||||||
MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_ARROW );
|
MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_ARROW );
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ static struct name_address_pair glut_functions[] =
|
|||||||
{ "glutGetProcAddress", (void *) glutGetProcAddress },
|
{ "glutGetProcAddress", (void *) glutGetProcAddress },
|
||||||
{ "glutMouseWheelFunc", (void *) glutMouseWheelFunc },
|
{ "glutMouseWheelFunc", (void *) glutMouseWheelFunc },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void *FGAPIENTRY glutGetProcAddress( const char *procName )
|
void *FGAPIENTRY glutGetProcAddress( const char *procName )
|
||||||
|
@ -280,7 +280,7 @@ void FGAPIENTRY glutStrokeString( void* fontID, const unsigned char *string )
|
|||||||
|
|
||||||
glEnd( );
|
glEnd( );
|
||||||
}
|
}
|
||||||
|
|
||||||
length += schar->Right;
|
length += schar->Right;
|
||||||
glTranslatef( schar->Right, 0.0, 0.0 );
|
glTranslatef( schar->Right, 0.0, 0.0 );
|
||||||
}
|
}
|
||||||
@ -302,7 +302,7 @@ int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
|
|||||||
);
|
);
|
||||||
schar = font->Characters[ character ];
|
schar = font->Characters[ character ];
|
||||||
freeglut_return_val_if_fail( schar, 0 );
|
freeglut_return_val_if_fail( schar, 0 );
|
||||||
|
|
||||||
return ( int )( schar->Right + 0.5 );
|
return ( int )( schar->Right + 0.5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Following fonts are defined in this file:
|
* Following fonts are defined in this file:
|
||||||
*
|
*
|
||||||
* 1. fgFontFixed8x13 <-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1>
|
* 1. fgFontFixed8x13 <-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1>
|
||||||
* 2. fgFontFixed9x15 <-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1>
|
* 2. fgFontFixed9x15 <-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1>
|
||||||
* 3. fgFontHelvetica10 <-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1>
|
* 3. fgFontHelvetica10 <-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1>
|
||||||
|
@ -89,7 +89,7 @@ void fghRememberState( void )
|
|||||||
/*
|
/*
|
||||||
* Query the current display settings:
|
* Query the current display settings:
|
||||||
*/
|
*/
|
||||||
fgDisplay.DisplayModeValid =
|
fgDisplay.DisplayModeValid =
|
||||||
XF86VidModeGetModeLine(
|
XF86VidModeGetModeLine(
|
||||||
fgDisplay.Display,
|
fgDisplay.Display,
|
||||||
fgDisplay.Screen,
|
fgDisplay.Screen,
|
||||||
@ -110,7 +110,7 @@ void fghRememberState( void )
|
|||||||
#elif TARGET_HOST_WIN32
|
#elif TARGET_HOST_WIN32
|
||||||
|
|
||||||
/* DEVMODE devMode; */
|
/* DEVMODE devMode; */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Grab the current desktop settings...
|
* Grab the current desktop settings...
|
||||||
*/
|
*/
|
||||||
@ -432,7 +432,7 @@ int FGAPIENTRY glutEnterGameMode( void )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
fgStructure.GameMode = fgCreateWindow(
|
fgStructure.GameMode = fgCreateWindow(
|
||||||
NULL, "FREEGLUT", 0, 0,
|
NULL, "FREEGLUT", 0, 0,
|
||||||
fgState.GameModeSize.X, fgState.GameModeSize.Y, GL_TRUE, GL_FALSE
|
fgState.GameModeSize.X, fgState.GameModeSize.Y, GL_TRUE, GL_FALSE
|
||||||
);
|
);
|
||||||
@ -453,7 +453,7 @@ int FGAPIENTRY glutEnterGameMode( void )
|
|||||||
/* Move the Pointer to the middle of the fullscreen window */
|
/* Move the Pointer to the middle of the fullscreen window */
|
||||||
XWarpPointer(
|
XWarpPointer(
|
||||||
fgDisplay.Display,
|
fgDisplay.Display,
|
||||||
None,
|
None,
|
||||||
fgDisplay.RootWindow,
|
fgDisplay.RootWindow,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
fgState.GameModeSize.X/2, fgState.GameModeSize.Y/2
|
fgState.GameModeSize.X/2, fgState.GameModeSize.Y/2
|
||||||
@ -476,7 +476,7 @@ int FGAPIENTRY glutEnterGameMode( void )
|
|||||||
GrabModeAsync, GrabModeAsync,
|
GrabModeAsync, GrabModeAsync,
|
||||||
fgStructure.GameMode->Window.Handle, None, CurrentTime) )
|
fgStructure.GameMode->Window.Handle, None, CurrentTime) )
|
||||||
usleep( 100 );
|
usleep( 100 );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Change input focus to the new window. This will exit the application
|
* Change input focus to the new window. This will exit the application
|
||||||
* if the new window is not viewable yet, see the XGrabPointer loop above.
|
* if the new window is not viewable yet, see the XGrabPointer loop above.
|
||||||
|
@ -197,7 +197,7 @@ void FGAPIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks)
|
|||||||
glVertex3d(0,0,radius);
|
glVertex3d(0,0,radius);
|
||||||
|
|
||||||
for (j=slices; j>=0; j--)
|
for (j=slices; j>=0; j--)
|
||||||
{
|
{
|
||||||
glNormal3d(cost1[j]*r1, sint1[j]*r1, z1 );
|
glNormal3d(cost1[j]*r1, sint1[j]*r1, z1 );
|
||||||
glVertex3d(cost1[j]*r1*radius, sint1[j]*r1*radius, z1*radius);
|
glVertex3d(cost1[j]*r1*radius, sint1[j]*r1*radius, z1*radius);
|
||||||
}
|
}
|
||||||
@ -263,7 +263,7 @@ void FGAPIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks)
|
|||||||
double x,y,z;
|
double x,y,z;
|
||||||
|
|
||||||
/* Pre-computed circle */
|
/* Pre-computed circle */
|
||||||
|
|
||||||
double *sint1,*cost1;
|
double *sint1,*cost1;
|
||||||
double *sint2,*cost2;
|
double *sint2,*cost2;
|
||||||
circleTable(&sint1,&cost1,-slices );
|
circleTable(&sint1,&cost1,-slices );
|
||||||
|
@ -46,20 +46,20 @@
|
|||||||
|
|
||||||
struct freeglutStrokeFont
|
struct freeglutStrokeFont
|
||||||
{
|
{
|
||||||
const char *name ;
|
const char *name ;
|
||||||
int num_chars ;
|
int num_chars ;
|
||||||
void *ch ;
|
void *ch ;
|
||||||
float top ;
|
float top ;
|
||||||
float bottom ;
|
float bottom ;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct freeglutBitmapFont
|
struct freeglutBitmapFont
|
||||||
{
|
{
|
||||||
const char *name ;
|
const char *name ;
|
||||||
const int num_chars ;
|
const int num_chars ;
|
||||||
const int first ;
|
const int first ;
|
||||||
const void *ch ;
|
const void *ch ;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct freeglutStrokeFont glutStrokeRoman ;
|
struct freeglutStrokeFont glutStrokeRoman ;
|
||||||
|
@ -298,7 +298,7 @@ void fgDeinitialize( void )
|
|||||||
free( fgState.ProgramName );
|
free( fgState.ProgramName );
|
||||||
fgState.ProgramName = NULL;
|
fgState.ProgramName = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if TARGET_HOST_UNIX_X11
|
#if TARGET_HOST_UNIX_X11
|
||||||
|
|
||||||
@ -369,7 +369,7 @@ from The Open Group.
|
|||||||
* It returns a bitmask that indicates which of the four values
|
* It returns a bitmask that indicates which of the four values
|
||||||
* were actually found in the string. For each value found,
|
* were actually found in the string. For each value found,
|
||||||
* the corresponding argument is updated; for each value
|
* the corresponding argument is updated; for each value
|
||||||
* not found, the corresponding argument is left unchanged.
|
* not found, the corresponding argument is left unchanged.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -377,7 +377,7 @@ ReadInteger(char *string, char **NextString)
|
|||||||
{
|
{
|
||||||
register int Result = 0;
|
register int Result = 0;
|
||||||
int Sign = 1;
|
int Sign = 1;
|
||||||
|
|
||||||
if (*string == '+')
|
if (*string == '+')
|
||||||
string++;
|
string++;
|
||||||
else if (*string == '-')
|
else if (*string == '-')
|
||||||
@ -417,7 +417,7 @@ static int XParseGeometry (
|
|||||||
strind = (char *)string;
|
strind = (char *)string;
|
||||||
if (*strind != '+' && *strind != '-' && *strind != 'x') {
|
if (*strind != '+' && *strind != '-' && *strind != 'x') {
|
||||||
tempWidth = ReadInteger(strind, &nextCharacter);
|
tempWidth = ReadInteger(strind, &nextCharacter);
|
||||||
if (strind == nextCharacter)
|
if (strind == nextCharacter)
|
||||||
return 0;
|
return 0;
|
||||||
strind = nextCharacter;
|
strind = nextCharacter;
|
||||||
mask |= WidthValue;
|
mask |= WidthValue;
|
||||||
@ -522,7 +522,7 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
|
|||||||
{
|
{
|
||||||
int interval;
|
int interval;
|
||||||
sscanf( fps, "%d", &interval );
|
sscanf( fps, "%d", &interval );
|
||||||
|
|
||||||
if( interval <= 0 )
|
if( interval <= 0 )
|
||||||
fgState.FPSInterval = 5000; /* 5000 millisecond default */
|
fgState.FPSInterval = 5000; /* 5000 millisecond default */
|
||||||
else
|
else
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
/* XXX Update these for each release! */
|
/* XXX Update these for each release! */
|
||||||
#define VERSION_MAJOR 2
|
#define VERSION_MAJOR 2
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Freeglut is meant to be available under all Unix/X11 and Win32 platforms.
|
* Freeglut is meant to be available under all Unix/X11 and Win32 platforms.
|
||||||
@ -488,7 +488,7 @@ enum
|
|||||||
CB_ButtonBox,
|
CB_ButtonBox,
|
||||||
CB_TabletMotion,
|
CB_TabletMotion,
|
||||||
CB_TabletButton,
|
CB_TabletButton,
|
||||||
|
|
||||||
/* Always make this the LAST one */
|
/* Always make this the LAST one */
|
||||||
TOTAL_CALLBACKS
|
TOTAL_CALLBACKS
|
||||||
};
|
};
|
||||||
|
@ -530,7 +530,7 @@ static void fghJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
|
|||||||
IOHIDEventStruct hidEvent;
|
IOHIDEventStruct hidEvent;
|
||||||
(*(joy->hidDev))->getElementValue ( joy->hidDev, buttonCookies[i], &hidEvent );
|
(*(joy->hidDev))->getElementValue ( joy->hidDev, buttonCookies[i], &hidEvent );
|
||||||
if ( hidEvent.value )
|
if ( hidEvent.value )
|
||||||
*buttons |= 1 << i;
|
*buttons |= 1 << i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -892,7 +892,7 @@ static CFDictionaryRef fghJoystickGetCFProperties ( SFG_Joystick *joy, io_object
|
|||||||
IOReturn rv;
|
IOReturn rv;
|
||||||
CFMutableDictionaryRef cfProperties;
|
CFMutableDictionaryRef cfProperties;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* comment copied from darwin/SDL_sysjoystick.c */
|
/* comment copied from darwin/SDL_sysjoystick.c */
|
||||||
/* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also
|
/* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also
|
||||||
* get dictionary for usb properties: step up two levels and get CF dictionary for USB properties
|
* get dictionary for usb properties: step up two levels and get CF dictionary for USB properties
|
||||||
@ -913,7 +913,7 @@ static CFDictionaryRef fghJoystickGetCFProperties ( SFG_Joystick *joy, io_object
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rv = IORegistryEntryCreateCFProperties( ioDev /*parent2*/,
|
rv = IORegistryEntryCreateCFProperties( ioDev /*parent2*/,
|
||||||
&cfProperties, kCFAllocatorDefault, kNilOptions);
|
&cfProperties, kCFAllocatorDefault, kNilOptions);
|
||||||
if (rv != kIOReturnSuccess || !cfProperties) {
|
if (rv != kIOReturnSuccess || !cfProperties) {
|
||||||
fgWarning ( "%s", "error getting device properties");
|
fgWarning ( "%s", "error getting device properties");
|
||||||
@ -930,7 +930,7 @@ static void fghJoystickElementEnumerator ( SFG_Joystick *joy, void *element, voi
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static_cast<jsJoystick*>(vjs)->parseElement ( (CFDictionaryRef) element );
|
static_cast<jsJoystick*>(vjs)->parseElement ( (CFDictionaryRef) element );
|
||||||
}
|
}
|
||||||
|
|
||||||
/** element enumerator function : pass NULL for top-level*/
|
/** element enumerator function : pass NULL for top-level*/
|
||||||
@ -939,7 +939,7 @@ static void fghJoystickEnumerateElements ( SFG_Joystick *joy, CFTypeRef element
|
|||||||
assert(CFGetTypeID(element) == CFArrayGetTypeID());
|
assert(CFGetTypeID(element) == CFArrayGetTypeID());
|
||||||
|
|
||||||
CFRange range = {0, CFArrayGetCount ((CFArrayRef)element)};
|
CFRange range = {0, CFArrayGetCount ((CFArrayRef)element)};
|
||||||
CFArrayApplyFunction((CFArrayRef) element, range,
|
CFArrayApplyFunction((CFArrayRef) element, range,
|
||||||
&fghJoystickElementEnumerator, joy );
|
&fghJoystickElementEnumerator, joy );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -951,7 +951,7 @@ static void fghJoystickParseElement ( SFG_Joystick *joy, CFDictionaryRef element
|
|||||||
long type, page, usage;
|
long type, page, usage;
|
||||||
|
|
||||||
CFNumberGetValue((CFNumberRef)
|
CFNumberGetValue((CFNumberRef)
|
||||||
CFDictionaryGetValue ((CFDictionaryRef) element, CFSTR(kIOHIDElementTypeKey)),
|
CFDictionaryGetValue ((CFDictionaryRef) element, CFSTR(kIOHIDElementTypeKey)),
|
||||||
kCFNumberLongType, &type);
|
kCFNumberLongType, &type);
|
||||||
|
|
||||||
switch ( typ e) {
|
switch ( typ e) {
|
||||||
@ -962,7 +962,7 @@ static void fghJoystickParseElement ( SFG_Joystick *joy, CFDictionaryRef element
|
|||||||
CFNumberGetValue( (CFNumberRef) refUsage, kCFNumberLongType, &usage );
|
CFNumberGetValue( (CFNumberRef) refUsage, kCFNumberLongType, &usage );
|
||||||
CFNumberGetValue( (CFNumberRef) refPage, kCFNumberLongType, &page );
|
CFNumberGetValue( (CFNumberRef) refPage, kCFNumberLongType, &page );
|
||||||
|
|
||||||
if (page == kHIDPage_GenericDesktop) {
|
if (page == kHIDPage_GenericDesktop) {
|
||||||
switch ( usage ) /* look at usage to determine function */
|
switch ( usage ) /* look at usage to determine function */
|
||||||
{
|
{
|
||||||
case kHIDUsage_GD_X:
|
case kHIDUsage_GD_X:
|
||||||
@ -1000,7 +1000,7 @@ static void fghJoystickParseElement ( SFG_Joystick *joy, CFDictionaryRef element
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fghJoystickAddAxisElement ( SFG_Joystick *joy, CFDictionaryRef axis )
|
static void fghJoystickAddAxisElement ( SFG_Joystick *joy, CFDictionaryRef axis )
|
||||||
@ -1009,17 +1009,17 @@ static void fghJoystickAddAxisElement ( SFG_Joystick *joy, CFDictionaryRef axis
|
|||||||
int index = joy->num_axes++;
|
int index = joy->num_axes++;
|
||||||
|
|
||||||
CFNumberGetValue ((CFNumberRef)
|
CFNumberGetValue ((CFNumberRef)
|
||||||
CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementCookieKey) ),
|
CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementCookieKey) ),
|
||||||
kCFNumberLongType, &cookie);
|
kCFNumberLongType, &cookie);
|
||||||
|
|
||||||
axisCookies[index] = (IOHIDElementCookie) cookie;
|
axisCookies[index] = (IOHIDElementCookie) cookie;
|
||||||
|
|
||||||
CFNumberGetValue ((CFNumberRef)
|
CFNumberGetValue ((CFNumberRef)
|
||||||
CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementMinKey) ),
|
CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementMinKey) ),
|
||||||
kCFNumberLongType, &lmin);
|
kCFNumberLongType, &lmin);
|
||||||
|
|
||||||
CFNumberGetValue ((CFNumberRef)
|
CFNumberGetValue ((CFNumberRef)
|
||||||
CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementMaxKey) ),
|
CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementMaxKey) ),
|
||||||
kCFNumberLongType, &lmax);
|
kCFNumberLongType, &lmax);
|
||||||
|
|
||||||
joy->min[index] = lmin;
|
joy->min[index] = lmin;
|
||||||
@ -1033,7 +1033,7 @@ static void fghJoystickAddButtonElement ( SFG_Joystick *joy, CFDictionaryRef but
|
|||||||
{
|
{
|
||||||
long cookie;
|
long cookie;
|
||||||
CFNumberGetValue ((CFNumberRef)
|
CFNumberGetValue ((CFNumberRef)
|
||||||
CFDictionaryGetValue ( button, CFSTR(kIOHIDElementCookieKey) ),
|
CFDictionaryGetValue ( button, CFSTR(kIOHIDElementCookieKey) ),
|
||||||
kCFNumberLongType, &cookie);
|
kCFNumberLongType, &cookie);
|
||||||
|
|
||||||
joy->buttonCookies[num_buttons++] = (IOHIDElementCookie) cookie;
|
joy->buttonCookies[num_buttons++] = (IOHIDElementCookie) cookie;
|
||||||
@ -1254,7 +1254,7 @@ static void fghJoystickOpen( SFG_Joystick* joy )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* create device interface */
|
/* create device interface */
|
||||||
rv = IOCreatePlugInInterfaceForService( ioDevices[ joy->id ],
|
rv = IOCreatePlugInInterfaceForService( ioDevices[ joy->id ],
|
||||||
kIOHIDDeviceUserClientTypeID,
|
kIOHIDDeviceUserClientTypeID,
|
||||||
kIOCFPlugInInterfaceID,
|
kIOCFPlugInInterfaceID,
|
||||||
&plugin, &score );
|
&plugin, &score );
|
||||||
@ -1266,7 +1266,7 @@ static void fghJoystickOpen( SFG_Joystick* joy )
|
|||||||
}
|
}
|
||||||
|
|
||||||
pluginResult = ( *plugin )->QueryInterface(
|
pluginResult = ( *plugin )->QueryInterface(
|
||||||
plugin,
|
plugin,
|
||||||
CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID),
|
CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID),
|
||||||
&( LPVOID )joy->hidDev
|
&( LPVOID )joy->hidDev
|
||||||
);
|
);
|
||||||
@ -1289,7 +1289,7 @@ static void fghJoystickOpen( SFG_Joystick* joy )
|
|||||||
props = getCFProperties( ioDevices[ joy->id ] );
|
props = getCFProperties( ioDevices[ joy->id ] );
|
||||||
|
|
||||||
/* recursively enumerate all the bits */
|
/* recursively enumerate all the bits */
|
||||||
CFTypeRef topLevelElement =
|
CFTypeRef topLevelElement =
|
||||||
CFDictionaryGetValue( props, CFSTR( kIOHIDElementKey ) );
|
CFDictionaryGetValue( props, CFSTR( kIOHIDElementKey ) );
|
||||||
enumerateElements( topLevelElement );
|
enumerateElements( topLevelElement );
|
||||||
|
|
||||||
@ -1490,11 +1490,11 @@ static void fghJoystickOpen( SFG_Joystick* joy )
|
|||||||
* Set the correct number of axes for the linux driver
|
* Set the correct number of axes for the linux driver
|
||||||
*/
|
*/
|
||||||
# ifdef JS_NEW
|
# ifdef JS_NEW
|
||||||
/* Melchior Franz's fixes for big-endian Linuxes since writing
|
/* Melchior Franz's fixes for big-endian Linuxes since writing
|
||||||
* to the upper byte of an uninitialized word doesn't work.
|
* to the upper byte of an uninitialized word doesn't work.
|
||||||
* 9 April 2003
|
* 9 April 2003
|
||||||
*/
|
*/
|
||||||
ioctl( joy->fd, JSIOCGAXES, &u );
|
ioctl( joy->fd, JSIOCGAXES, &u );
|
||||||
joy->num_axes = u;
|
joy->num_axes = u;
|
||||||
ioctl( joy->fd, JSIOCGBUTTONS, &u );
|
ioctl( joy->fd, JSIOCGBUTTONS, &u );
|
||||||
joy->num_buttons = u;
|
joy->num_buttons = u;
|
||||||
@ -1514,7 +1514,7 @@ static void fghJoystickOpen( SFG_Joystick* joy )
|
|||||||
counter = 0;
|
counter = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
fghJoystickRawRead( joy, NULL, joy->center );
|
fghJoystickRawRead( joy, NULL, joy->center );
|
||||||
counter++;
|
counter++;
|
||||||
} while( !joy->error &&
|
} while( !joy->error &&
|
||||||
|
@ -180,7 +180,7 @@ static void fghRedrawWindowByHandle ( SFG_WindowHandleType handle )
|
|||||||
|
|
||||||
fgSetWindow( window );
|
fgSetWindow( window );
|
||||||
|
|
||||||
fghReshapeWindowByHandle(
|
fghReshapeWindowByHandle(
|
||||||
window->Window.Handle,
|
window->Window.Handle,
|
||||||
window->State.Width,
|
window->State.Width,
|
||||||
window->State.Height
|
window->State.Height
|
||||||
@ -205,7 +205,7 @@ static void fghcbDisplayWindow( SFG_Window *window,
|
|||||||
|
|
||||||
fgSetWindow( window );
|
fgSetWindow( window );
|
||||||
|
|
||||||
fghReshapeWindowByHandle(
|
fghReshapeWindowByHandle(
|
||||||
window->Window.Handle,
|
window->Window.Handle,
|
||||||
window->State.Width,
|
window->State.Width,
|
||||||
window->State.Height
|
window->State.Height
|
||||||
@ -229,7 +229,7 @@ static void fghcbDisplayWindow( SFG_Window *window,
|
|||||||
}
|
}
|
||||||
#elif TARGET_HOST_WIN32
|
#elif TARGET_HOST_WIN32
|
||||||
RedrawWindow(
|
RedrawWindow(
|
||||||
window->Window.Handle, NULL, NULL,
|
window->Window.Handle, NULL, NULL,
|
||||||
RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE | RDW_UPDATENOW
|
RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE | RDW_UPDATENOW
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
@ -412,7 +412,7 @@ static void fgHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e)
|
|||||||
e->data = w;
|
e->data = w;
|
||||||
}
|
}
|
||||||
fgEnumSubWindows( w, fgHavePendingRedisplaysCallback, e );
|
fgEnumSubWindows( w, fgHavePendingRedisplaysCallback, e );
|
||||||
}
|
}
|
||||||
static int fgHavePendingRedisplays (void)
|
static int fgHavePendingRedisplays (void)
|
||||||
{
|
{
|
||||||
SFG_Enumerator enumerator;
|
SFG_Enumerator enumerator;
|
||||||
@ -497,7 +497,7 @@ int fgGetXModifiers( XEvent *event )
|
|||||||
ret |= GLUT_ACTIVE_CTRL;
|
ret |= GLUT_ACTIVE_CTRL;
|
||||||
if( event->xkey.state & Mod1Mask )
|
if( event->xkey.state & Mod1Mask )
|
||||||
ret |= GLUT_ACTIVE_ALT;
|
ret |= GLUT_ACTIVE_ALT;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -540,7 +540,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
*/
|
*/
|
||||||
if( (Atom) event.xclient.data.l[ 0 ] == fgDisplay.DeleteWindow )
|
if( (Atom) event.xclient.data.l[ 0 ] == fgDisplay.DeleteWindow )
|
||||||
{
|
{
|
||||||
GETWINDOW( xclient );
|
GETWINDOW( xclient );
|
||||||
|
|
||||||
fgDestroyWindow ( window );
|
fgDestroyWindow ( window );
|
||||||
|
|
||||||
@ -640,7 +640,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
|
|
||||||
case VisibilityNotify:
|
case VisibilityNotify:
|
||||||
{
|
{
|
||||||
GETWINDOW( xvisibility );
|
GETWINDOW( xvisibility );
|
||||||
/*
|
/*
|
||||||
* XXX INVOKE_WCB() does this check for us.
|
* XXX INVOKE_WCB() does this check for us.
|
||||||
*/
|
*/
|
||||||
@ -660,13 +660,13 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
INVOKE_WCB( *window, WindowStatus, ( GLUT_FULLY_RETAINED ) );
|
INVOKE_WCB( *window, WindowStatus, ( GLUT_FULLY_RETAINED ) );
|
||||||
window->State.Visible = GL_TRUE;
|
window->State.Visible = GL_TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VisibilityPartiallyObscured:
|
case VisibilityPartiallyObscured:
|
||||||
INVOKE_WCB( *window, WindowStatus,
|
INVOKE_WCB( *window, WindowStatus,
|
||||||
( GLUT_PARTIALLY_RETAINED ) );
|
( GLUT_PARTIALLY_RETAINED ) );
|
||||||
window->State.Visible = GL_TRUE;
|
window->State.Visible = GL_TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VisibilityFullyObscured:
|
case VisibilityFullyObscured:
|
||||||
INVOKE_WCB( *window, WindowStatus, ( GLUT_FULLY_COVERED ) );
|
INVOKE_WCB( *window, WindowStatus, ( GLUT_FULLY_COVERED ) );
|
||||||
window->State.Visible = GL_FALSE;
|
window->State.Visible = GL_FALSE;
|
||||||
@ -741,7 +741,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
*/
|
*/
|
||||||
GETWINDOW( xbutton );
|
GETWINDOW( xbutton );
|
||||||
GETMOUSE( xbutton );
|
GETMOUSE( xbutton );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* An X button (at least in XFree86) is numbered from 1.
|
* An X button (at least in XFree86) is numbered from 1.
|
||||||
* A GLUT button is numbered from 0.
|
* A GLUT button is numbered from 0.
|
||||||
@ -783,7 +783,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
window->ActiveMenu->Window->State.MouseY =
|
window->ActiveMenu->Window->State.MouseY =
|
||||||
event.xbutton.y_root - window->ActiveMenu->Y;
|
event.xbutton.y_root - window->ActiveMenu->Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In the menu, invoke the callback and deactivate the menu*/
|
/* In the menu, invoke the callback and deactivate the menu*/
|
||||||
if( fgCheckActiveMenu( window->ActiveMenu->Window,
|
if( fgCheckActiveMenu( window->ActiveMenu->Window,
|
||||||
window->ActiveMenu ) )
|
window->ActiveMenu ) )
|
||||||
@ -883,7 +883,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
int direction = -1;
|
int direction = -1;
|
||||||
if( button % 2 )
|
if( button % 2 )
|
||||||
direction = 1;
|
direction = 1;
|
||||||
|
|
||||||
if( pressed )
|
if( pressed )
|
||||||
INVOKE_WCB( *window, MouseWheel, ( wheel_number,
|
INVOKE_WCB( *window, MouseWheel, ( wheel_number,
|
||||||
direction,
|
direction,
|
||||||
@ -1082,7 +1082,7 @@ void FGAPIENTRY glutMainLoop( void )
|
|||||||
INVOKE_WCB( *window, Visibility, ( window->State.Visible ) );
|
INVOKE_WCB( *window, Visibility, ( window->State.Visible ) );
|
||||||
fgSetWindow( current_window );
|
fgSetWindow( current_window );
|
||||||
}
|
}
|
||||||
|
|
||||||
window = (SFG_Window *)window->Node.Next ;
|
window = (SFG_Window *)window->Node.Next ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1096,13 +1096,13 @@ void FGAPIENTRY glutMainLoop( void )
|
|||||||
/*
|
/*
|
||||||
* Step through the list of windows, seeing if there are any
|
* Step through the list of windows, seeing if there are any
|
||||||
* that are not menus
|
* that are not menus
|
||||||
*/
|
*/
|
||||||
for( window = ( SFG_Window * )fgStructure.Windows.First;
|
for( window = ( SFG_Window * )fgStructure.Windows.First;
|
||||||
window;
|
window;
|
||||||
window = ( SFG_Window * )window->Node.Next )
|
window = ( SFG_Window * )window->Node.Next )
|
||||||
if ( ! ( window->IsMenu ) )
|
if ( ! ( window->IsMenu ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if( ! window )
|
if( ! window )
|
||||||
fgState.ExecState = GLUT_EXEC_STATE_STOP;
|
fgState.ExecState = GLUT_EXEC_STATE_STOP;
|
||||||
else
|
else
|
||||||
@ -1236,12 +1236,12 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
#if 0
|
#if 0
|
||||||
case WM_SETFOCUS:
|
case WM_SETFOCUS:
|
||||||
printf("WM_SETFOCUS: %p\n", window );
|
printf("WM_SETFOCUS: %p\n", window );
|
||||||
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
|
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_ACTIVATE:
|
case WM_ACTIVATE:
|
||||||
if (LOWORD(wParam) != WA_INACTIVE)
|
if (LOWORD(wParam) != WA_INACTIVE)
|
||||||
{
|
{
|
||||||
/* glutSetCursor( fgStructure.Window->State.Cursor ); */
|
/* glutSetCursor( fgStructure.Window->State.Cursor ); */
|
||||||
@ -1262,7 +1262,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
* XXX call glutSetCurdsor() instead of defining two macros
|
* XXX call glutSetCurdsor() instead of defining two macros
|
||||||
* XXX and implementing a nested case in-line.
|
* XXX and implementing a nested case in-line.
|
||||||
*/
|
*/
|
||||||
case WM_SETCURSOR:
|
case WM_SETCURSOR:
|
||||||
/* Set the cursor AND change it for this window class. */
|
/* Set the cursor AND change it for this window class. */
|
||||||
#define MAP_CURSOR(a,b) \
|
#define MAP_CURSOR(a,b) \
|
||||||
case a: \
|
case a: \
|
||||||
@ -1327,7 +1327,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
{
|
{
|
||||||
window->State.MouseX = LOWORD( lParam );
|
window->State.MouseX = LOWORD( lParam );
|
||||||
window->State.MouseY = HIWORD( lParam );
|
window->State.MouseY = HIWORD( lParam );
|
||||||
|
|
||||||
if ( window->ActiveMenu )
|
if ( window->ActiveMenu )
|
||||||
{
|
{
|
||||||
window->State.Redisplay = GL_TRUE;
|
window->State.Redisplay = GL_TRUE;
|
||||||
@ -1569,7 +1569,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remember the current modifiers state. This is done here in order
|
* Remember the current modifiers state. This is done here in order
|
||||||
* to make sure the VK_DELETE keyboard callback is executed properly.
|
* to make sure the VK_DELETE keyboard callback is executed properly.
|
||||||
*/
|
*/
|
||||||
fgState.Modifiers = fgGetWin32Modifiers( );
|
fgState.Modifiers = fgGetWin32Modifiers( );
|
||||||
@ -1635,7 +1635,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
POINT mouse_pos;
|
POINT mouse_pos;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remember the current modifiers state. This is done here in order
|
* Remember the current modifiers state. This is done here in order
|
||||||
* to make sure the VK_DELETE keyboard callback is executed properly.
|
* to make sure the VK_DELETE keyboard callback is executed properly.
|
||||||
*/
|
*/
|
||||||
fgState.Modifiers = fgGetWin32Modifiers( );
|
fgState.Modifiers = fgGetWin32Modifiers( );
|
||||||
@ -1688,9 +1688,9 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
{
|
{
|
||||||
BYTE state[ 256 ];
|
BYTE state[ 256 ];
|
||||||
WORD code[ 2 ];
|
WORD code[ 2 ];
|
||||||
|
|
||||||
GetKeyboardState( state );
|
GetKeyboardState( state );
|
||||||
|
|
||||||
if( ToAscii( wParam, 0, state, code, 0 ) == 1 )
|
if( ToAscii( wParam, 0, state, code, 0 ) == 1 )
|
||||||
wParam=code[ 0 ];
|
wParam=code[ 0 ];
|
||||||
|
|
||||||
|
@ -507,7 +507,7 @@ int FGAPIENTRY glutDeviceGet( GLenum eWhat )
|
|||||||
|
|
||||||
case GLUT_HAS_MOUSE:
|
case GLUT_HAS_MOUSE:
|
||||||
/*
|
/*
|
||||||
* The Windows can be booted without a mouse.
|
* The Windows can be booted without a mouse.
|
||||||
* It would be nice to have this reported.
|
* It would be nice to have this reported.
|
||||||
*/
|
*/
|
||||||
return GetSystemMetrics( SM_MOUSEPRESENT );
|
return GetSystemMetrics( SM_MOUSEPRESENT );
|
||||||
|
@ -405,7 +405,7 @@ void fgDestroyStructure( void )
|
|||||||
*/
|
*/
|
||||||
while( fgStructure.Menus.First )
|
while( fgStructure.Menus.First )
|
||||||
fgDestroyMenu( ( SFG_Menu * )fgStructure.Menus.First );
|
fgDestroyMenu( ( SFG_Menu * )fgStructure.Menus.First );
|
||||||
|
|
||||||
while( fgStructure.Windows.First )
|
while( fgStructure.Windows.First )
|
||||||
fgDestroyWindow( ( SFG_Window * )fgStructure.Windows.First );
|
fgDestroyWindow( ( SFG_Window * )fgStructure.Windows.First );
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly,
|
|||||||
|
|
||||||
pfd.cColorBits = (BYTE) GetDeviceCaps( window->Window.Device, BITSPIXEL );
|
pfd.cColorBits = (BYTE) GetDeviceCaps( window->Window.Device, BITSPIXEL );
|
||||||
ppfd = &pfd;
|
ppfd = &pfd;
|
||||||
|
|
||||||
pixelformat = ChoosePixelFormat( window->Window.Device, ppfd );
|
pixelformat = ChoosePixelFormat( window->Window.Device, ppfd );
|
||||||
if( pixelformat == 0 )
|
if( pixelformat == 0 )
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
@ -235,8 +235,8 @@ void fgSetWindow ( SFG_Window *window )
|
|||||||
if ( window )
|
if ( window )
|
||||||
{
|
{
|
||||||
window->Window.Device = GetDC( window->Window.Handle );
|
window->Window.Device = GetDC( window->Window.Handle );
|
||||||
wglMakeCurrent(
|
wglMakeCurrent(
|
||||||
window->Window.Device,
|
window->Window.Device,
|
||||||
window->Window.Context
|
window->Window.Context
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -293,7 +293,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
|
|||||||
window->Window.VisualInfo = fgChooseVisual( );
|
window->Window.VisualInfo = fgChooseVisual( );
|
||||||
fgState.DisplayMode &= ~GLUT_DOUBLE;
|
fgState.DisplayMode &= ~GLUT_DOUBLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GLUT also checks for multi-sampling, but I don't see that
|
* GLUT also checks for multi-sampling, but I don't see that
|
||||||
* anywhere else in FREEGLUT so I won't bother with it for the moment.
|
* anywhere else in FREEGLUT so I won't bother with it for the moment.
|
||||||
@ -471,13 +471,13 @@ void fgOpenWindow( SFG_Window* window, const char* title,
|
|||||||
&wmHints,
|
&wmHints,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
XSetWMProtocols( fgDisplay.Display, window->Window.Handle,
|
XSetWMProtocols( fgDisplay.Display, window->Window.Handle,
|
||||||
&fgDisplay.DeleteWindow, 1 );
|
&fgDisplay.DeleteWindow, 1 );
|
||||||
|
|
||||||
XMapWindow( fgDisplay.Display, window->Window.Handle );
|
XMapWindow( fgDisplay.Display, window->Window.Handle );
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif TARGET_HOST_WIN32
|
#elif TARGET_HOST_WIN32
|
||||||
|
|
||||||
WNDCLASS wc;
|
WNDCLASS wc;
|
||||||
@ -486,13 +486,13 @@ void fgOpenWindow( SFG_Window* window, const char* title,
|
|||||||
ATOM atom;
|
ATOM atom;
|
||||||
|
|
||||||
freeglut_assert_ready;
|
freeglut_assert_ready;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Grab the window class we have registered on glutInit():
|
* Grab the window class we have registered on glutInit():
|
||||||
*/
|
*/
|
||||||
atom = GetClassInfo( fgDisplay.Instance, "FREEGLUT", &wc );
|
atom = GetClassInfo( fgDisplay.Instance, "FREEGLUT", &wc );
|
||||||
assert( atom != 0 );
|
assert( atom != 0 );
|
||||||
|
|
||||||
if( gameMode )
|
if( gameMode )
|
||||||
{
|
{
|
||||||
assert( window->Parent == NULL );
|
assert( window->Parent == NULL );
|
||||||
@ -649,7 +649,7 @@ int FGAPIENTRY glutCreateWindow( const char* title )
|
|||||||
int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h )
|
int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h )
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if( GL_FALSE == fgStructure.Window->State.IsOffscreen )
|
if( GL_FALSE == fgStructure.Window->State.IsOffscreen )
|
||||||
{
|
{
|
||||||
SFG_Window* window = NULL;
|
SFG_Window* window = NULL;
|
||||||
@ -804,18 +804,18 @@ void FGAPIENTRY glutSetWindowTitle( const char* title )
|
|||||||
#if TARGET_HOST_UNIX_X11
|
#if TARGET_HOST_UNIX_X11
|
||||||
|
|
||||||
XTextProperty text;
|
XTextProperty text;
|
||||||
|
|
||||||
text.value = (unsigned char *) title;
|
text.value = (unsigned char *) title;
|
||||||
text.encoding = XA_STRING;
|
text.encoding = XA_STRING;
|
||||||
text.format = 8;
|
text.format = 8;
|
||||||
text.nitems = strlen( title );
|
text.nitems = strlen( title );
|
||||||
|
|
||||||
XSetWMName(
|
XSetWMName(
|
||||||
fgDisplay.Display,
|
fgDisplay.Display,
|
||||||
fgStructure.Window->Window.Handle,
|
fgStructure.Window->Window.Handle,
|
||||||
&text
|
&text
|
||||||
);
|
);
|
||||||
|
|
||||||
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
|
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
|
||||||
|
|
||||||
#elif TARGET_HOST_WIN32
|
#elif TARGET_HOST_WIN32
|
||||||
@ -840,7 +840,7 @@ void FGAPIENTRY glutSetIconTitle( const char* title )
|
|||||||
#if TARGET_HOST_UNIX_X11
|
#if TARGET_HOST_UNIX_X11
|
||||||
|
|
||||||
XTextProperty text;
|
XTextProperty text;
|
||||||
|
|
||||||
text.value = (unsigned char *) title;
|
text.value = (unsigned char *) title;
|
||||||
text.encoding = XA_STRING;
|
text.encoding = XA_STRING;
|
||||||
text.format = 8;
|
text.format = 8;
|
||||||
@ -898,7 +898,7 @@ void FGAPIENTRY glutPositionWindow( int x, int y )
|
|||||||
#elif TARGET_HOST_WIN32
|
#elif TARGET_HOST_WIN32
|
||||||
|
|
||||||
RECT winRect;
|
RECT winRect;
|
||||||
|
|
||||||
GetWindowRect( fgStructure.Window->Window.Handle, &winRect );
|
GetWindowRect( fgStructure.Window->Window.Handle, &winRect );
|
||||||
MoveWindow(
|
MoveWindow(
|
||||||
fgStructure.Window->Window.Handle,
|
fgStructure.Window->Window.Handle,
|
||||||
|
Reference in New Issue
Block a user