torcs - 1.2.2

src/libs/tgfclient/gui.cpp File Reference


Detailed Description

This API is used to manage all the menu screens.

Author:
Eric Espie
Version:
Id
gui.cpp,v 1.3 2003/10/19 18:59:38 torcs Exp

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <tgfclient.h>
#include "gui.h"

Include dependency graph for gui.cpp:

Include dependency graph

Defines

#define REPEAT1   1.0
#define REPEAT2   0.2

Functions

void gfuiInit (void)
void GfuiDisplayNothing (void)
 Dummy display function for glut.

void GfuiIdle (void)
 Idle function for the GUI to be called during Idle loop of glut.

void GfuiDisplay (void)
 Display function for the GUI to be called during redisplay of glut.

void GfuiMouseHide (void)
 Hide the mouse cursor.

void GfuiMouseShow (void)
 Show the mouse cursor.

void GfuiMouseSetHWPresent (void)
 Force the hardware mouse pointer.

tMouseInfoGfuiMouseInfo (void)
 Get the mouse information (position and buttons).

void GfuiMouseSetPos (int x, int y)
 Set the mouse position.

int GfuiScreenIsActive (void *screen)
 Tell if the screen is active or not.

void GfuiScreenActivate (void *screen)
 Activate a screen and make it current.

void GfuiScreenReplace (void *screen)
 Activate a screen and make it current plus release the current screen.

void GfuiScreenDeactivate (void)
 Deactivate the current screen.

void * GfuiScreenCreate (void)
 Create a new screen.

void * GfuiScreenCreateEx (float *bgColor, void *userDataOnActivate, tfuiCallback onActivate, void *userDataOnDeactivate, tfuiCallback onDeactivate, int mouseAllowed)
 Create a screen.

void GfuiScreenRelease (void *scr)
 Release the given screen.

void * GfuiHookCreate (void *userDataOnActivate, tfuiCallback onActivate)
 Create a callback hook.

void GfuiHookRelease (void *hook)
 Release the given hook.

void GfuiKeyEventRegister (void *scr, tfuiKeyCallback onKeyAction)
void GfuiSKeyEventRegister (void *scr, tfuiSKeyCallback onSKeyAction)
void GfuiKeyEventRegisterCurrent (tfuiKeyCallback onKeyAction)
void GfuiSKeyEventRegisterCurrent (tfuiSKeyCallback onSKeyAction)
void GfuiAddKey (void *scr, unsigned char key, char *descr, void *userData, tfuiCallback onKeyPressed, tfuiCallback onKeyReleased)
 Add a Keyboard callback to a screen.

void GfuiRegisterKey (unsigned char key, char *descr, void *userData, tfuiCallback onKeyPressed, tfuiCallback onKeyReleased)
 Add a Keyboard callback to the current screen.

void GfuiAddSKey (void *scr, int key, char *descr, void *userData, tfuiCallback onKeyPressed, tfuiCallback onKeyReleased)
 Add a Special Keyboard shortcut to the screen.

void GfuiScreenShot (void *)
 Save a screen shot in png format.

void GfuiScreenAddBgImg (void *scr, char *filename)
 Add an image background to a screen.


Variables

tGfuiScreenGfuiScreen
tMouseInfo GfuiMouse
int GfuiMouseHW = 0
float GfuiColor [GFUI_COLORNB][4]

Define Documentation

#define REPEAT1   1.0
 

#define REPEAT2   0.2
 


Function Documentation

void gfuiInit void   ) 
 

Here is the call graph for this function:

void GfuiKeyEventRegister void *  scr,
tfuiKeyCallback  onKeyAction
 

void GfuiKeyEventRegisterCurrent tfuiKeyCallback  onKeyAction  ) 
 

void GfuiSKeyEventRegister void *  scr,
tfuiSKeyCallback  onSKeyAction
 

void GfuiSKeyEventRegisterCurrent tfuiSKeyCallback  onSKeyAction  ) 
 


Variable Documentation

float GfuiColor[GFUI_COLORNB][4]
 

tMouseInfo GfuiMouse
 

int GfuiMouseHW = 0
 

tGfuiScreen* GfuiScreen
 


Generated at Thu Feb 26 21:53:09 2004 for torcs by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-1999
TORCS © Eric Espié 1999, 2002.