/*
* Queries the GL context about some attributes
*/
-static gint fghGetConfig( gint attribute )
+static int fghGetConfig( int attribute )
{
- gint returnValue;
+ int returnValue;
/*
* Return nothing if there is no current window set
*/
int FGAPIENTRY glutGet( GLenum eWhat )
{
- gint returnValue;
-
freeglut_assert_ready;
/*
/*
* This is easy and nicely portable, as we are using GLib...
*/
- return( (int) (g_timer_elapsed( fgState.Timer, NULL ) * 1000.0) );
+ return( fgElapsedTime() );
/*
* Following values are stored in fgState and fgDisplay global structures
{
XWindowAttributes winAttributes;
Window another, window;
- gint x, y;
+ int x, y;
/*
* Return zero if there is no current window set
if( fgStructure.Window == NULL )
return( 0 );
- return( g_list_length( fgStructure.Window->Children ) );
+ return( fgListLength( &fgStructure.Window->Children ) );
case GLUT_WINDOW_CURSOR:
/*
if( fgStructure.Menu == NULL )
return( 0 );
- return( g_list_length( fgStructure.Menu->Entries ) );
+ return( fgListLength( &fgStructure.Menu->Entries ) );
default:
/*
* Just have it reported, so that we can see what needs to be implemented
*/
- g_warning( "glutGet(): missing enum handle %i\n", eWhat );
+ fgWarning( "glutGet(): missing enum handle %i\n", eWhat );
break;
}
/*
* If nothing happens, then we are in deep trouble...
*/
- g_assert_not_reached();
+ return( -1 );
}
/*
/*
* Complain.
*/
- g_warning( "glutDeviceGet(): missing enum handle %i\n", eWhat );
+ fgWarning( "glutDeviceGet(): missing enum handle %i\n", eWhat );
break;
}
/*
* And now -- the failure.
*/
- g_assert_not_reached();
+ return( -1 );
}
/*
if( fgStructure.Window->State.Modifiers == 0xffffffff )
{
- g_warning( "glutGetModifiers() called outside an input callback" );
+ fgWarning( "glutGetModifiers() called outside an input callback" );
return( 0 );
}
/*
* Complain to the user about the obvious bug
*/
- g_warning( "glutLayerGet(): missing enum handle %i\n", eWhat );
+ fgWarning( "glutLayerGet(): missing enum handle %i\n", eWhat );
break;
}
/*
* And fail. That's good. Programs do love failing.
*/
- g_assert_not_reached();
+ return( -1 );
}
/*** END OF FILE ***/