|
Compounds |
struct | MouseInfo |
struct | ScrollBarInfo |
| Scroll bar call-back information. More...
|
struct | tCtrlJoyInfo |
| Joystick Information Structure. More...
|
struct | tCtrlMouseInfo |
| Mouse information structure. More...
|
struct | tCtrlRef |
Defines |
#define | GFUI_LABEL 0 |
#define | GFUI_BUTTON 1 |
#define | GFUI_GRBUTTON 2 |
#define | GFUI_SCROLLIST 3 |
#define | GFUI_SCROLLBAR 4 |
#define | GFUI_EDITBOX 5 |
#define | GFUI_ALIGN_HL_VB 0x00 |
#define | GFUI_ALIGN_HL_VC 0x01 |
#define | GFUI_ALIGN_HL_VT 0x02 |
#define | GFUI_ALIGN_HC_VB 0x10 |
#define | GFUI_ALIGN_HC_VC 0x11 |
#define | GFUI_ALIGN_HC_VT 0x12 |
#define | GFUI_ALIGN_HR_VB 0x20 |
#define | GFUI_ALIGN_HR_VC 0x21 |
#define | GFUI_ALIGN_HR_VT 0x22 |
#define | GFUI_MOUSE_UP 0 |
#define | GFUI_MOUSE_DOWN 1 |
#define | GFUI_KEY_UP 0 |
#define | GFUI_KEY_DOWN 1 |
#define | GFUI_SB_NONE 0 |
#define | GFUI_SB_RIGHT 1 |
#define | GFUI_SB_LEFT 2 |
#define | GFUI_SB_TOP 3 |
#define | GFUI_SB_BOTTOM 4 |
#define | GFUI_HORI_SCROLLBAR 0 |
#define | GFUI_VERT_SCROLLBAR 1 |
#define | GFUI_VISIBLE 1 |
| Object visibility flag.
|
#define | GFUI_INVISIBLE 0 |
| Object invisibility flag.
|
#define | GFUI_DISABLE 1 |
#define | GFUI_ENABLE 0 |
#define | GFUI_FONT_BIG 0 |
#define | GFUI_FONT_LARGE 1 |
#define | GFUI_FONT_MEDIUM 2 |
#define | GFUI_FONT_SMALL 3 |
#define | GFUI_FONT_BIG_C 4 |
#define | GFUI_FONT_LARGE_C 5 |
#define | GFUI_FONT_MEDIUM_C 6 |
#define | GFUI_FONT_SMALL_C 7 |
#define | GFUI_FONT_DIGIT 8 |
#define | GFUI_BTNSZ 300 |
#define | GFCTRL_TYPE_NOT_AFFECTED 0 |
#define | GFCTRL_TYPE_JOY_AXIS 1 |
#define | GFCTRL_TYPE_JOY_BUT 2 |
#define | GFCTRL_TYPE_KEYBOARD 3 |
#define | GFCTRL_TYPE_MOUSE_BUT 4 |
#define | GFCTRL_TYPE_MOUSE_AXIS 5 |
#define | GFCTRL_TYPE_SKEYBOARD 6 |
#define | GFCTRL_JOY_UNTESTED -1 |
#define | GFCTRL_JOY_NONE 0 |
#define | GFCTRL_JOY_PRESENT 1 |
#define | GFCTRL_JOY_MAXBUTTON 32 |
Typedefs |
typedef ScrollBarInfo | tScrollBarInfo |
| Scroll bar call-back information.
|
typedef void(* | tfuiCallback )(void *) |
typedef void(* | tfuiSBCallback )(tScrollBarInfo *) |
typedef int(* | tfuiKeyCallback )(unsigned char key, int modifier, int state) |
| return 1 to prevent normal key computing
|
typedef int(* | tfuiSKeyCallback )(int key, int modifier, int state) |
| return 1 to prevent normal key computing
|
typedef MouseInfo | tMouseInfo |
Functions |
void | GfInitClient (void) |
unsigned char * | GfImgReadPng (const char *filename, int *widthp, int *heightp, float gamma) |
| Load an image from disk to a buffer in RGBA mode.
|
int | GfImgWritePng (unsigned char *img, const char *filename, int width, int height) |
| Write a buffer to a png image on disk.
|
void | GfImgFreeTex (GLuint tex) |
| Free the texture.
|
GLuint | GfImgReadTex (char *filename) |
| Read a png image into a texture.
|
void | GfScrInit (int argc, char *argv[]) |
void | GfScrShutdown (void) |
| Shutdown the screen.
|
void * | GfScrMenuInit (void *precMenu) |
| Create and activate the video options menu screen.
|
char * | GfTime2Str (tdble sec, int sgn) |
| Convert a time in seconds (float) to an ascii string.
|
void | GfScrGetSize (int *ScrW, int *ScrH, int *ViewW, int *ViewH) |
| Get the screen and viewport sizes.
|
void | GfScrReinit (void *) |
void | GfuiDisplay (void) |
| Display function for the GUI to be called during redisplay of glut.
|
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 * | 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 *screen) |
| Release the given screen.
|
void | GfuiScreenActivate (void *screen) |
| Activate a screen and make it current.
|
int | GfuiScreenIsActive (void *screen) |
| Tell if the screen is active or not.
|
void | GfuiScreenReplace (void *screen) |
| Activate a screen and make it current plus release the current screen.
|
void | GfuiScreenDeactivate (void) |
| Deactivate the current screen.
|
void * | GfuiHookCreate (void *userDataOnActivate, tfuiCallback onActivate) |
| Create a callback hook.
|
void | GfuiHookRelease (void *hook) |
| Release the given hook.
|
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 | GfuiHelpScreen (void *prevScreen) |
| Generate a help screen.
|
void | GfuiScreenShot (void *notused) |
| Save a screen shot in png format.
|
void | GfuiScreenAddBgImg (void *scr, char *filename) |
| Add an image background to a screen.
|
void | GfuiKeyEventRegister (void *scr, tfuiKeyCallback onKeyAction) |
void | GfuiSKeyEventRegister (void *scr, tfuiSKeyCallback onSKeyAction) |
void | GfuiKeyEventRegisterCurrent (tfuiKeyCallback onKeyAction) |
void | GfuiSKeyEventRegisterCurrent (tfuiSKeyCallback onSKeyAction) |
tMouseInfo * | GfuiMouseInfo (void) |
| Get the mouse information (position and buttons).
|
void | GfuiMouseSetPos (int x, int y) |
| Set the mouse position.
|
void | GfuiMouseHide (void) |
| Hide the mouse cursor.
|
void | GfuiMouseShow (void) |
| Show the mouse cursor.
|
void | GfuiMouseSetHWPresent (void) |
| Force the hardware mouse pointer.
|
int | GfuiVisibilitySet (void *scr, int id, int visible) |
| Set/unset the visibility attribute of an object.
|
int | GfuiEnable (void *scr, int id, int flag) |
| Enable / Disable an object.
|
void | GfuiUnSelectCurrent (void) |
| Remove the focus on the current element.
|
int | GfuiLabelCreate (void *scr, char *text, int font, int x, int y, int align, int maxlen) |
| Add a label to a screen.
|
int | GfuiLabelCreateEx (void *scr, char *text, float *fgColor, int font, int x, int y, int align, int maxlen) |
| Create a new label (extended version).
|
int | GfuiTipCreate (void *scr, char *text, int maxlen) |
| Add a Tip (generally associated with a button).
|
int | GfuiTitleCreate (void *scr, char *text, int maxlen) |
| Add a Title to the screen.
|
void | GfuiLabelSetText (void *scr, int id, char *text) |
| Change the text of a label.
|
void | GfuiLabelSetColor (void *scr, int id, float *color) |
| Change the color of a label.
|
void | GfuiPrintString (char *text, float *fgColor, int font, int x, int y, int align) |
int | GfuiFontHeight (int font) |
int | GfuiFontWidth (int font, char *text) |
int | GfuiButtonCreate (void *scr, char *text, int font, int x, int y, int width, int align, int mouse, void *userDataOnPush, tfuiCallback onPush, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost) |
| Add a button to a screen.
|
int | GfuiButtonStateCreate (void *scr, char *text, int font, int x, int y, int width, int align, int mouse, void *userDataOnPush, tfuiCallback onPush, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost) |
| Add a state button to a screen.
|
int | GfuiGrButtonCreate (void *scr, char *disabled, char *enabled, char *focused, char *pushed, int x, int y, int align, int mouse, void *userDataOnPush, tfuiCallback onPush, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost) |
| Add a graphical button to a screen.
|
void | GfuiButtonSetText (void *scr, int id, char *text) |
| Change the label of a button.
|
int | GfuiButtonGetFocused (void) |
| Get the Id of the button focused in the current screen.
|
int | GfuiEditboxCreate (void *scr, char *text, int font, int x, int y, int width, int maxlen, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost) |
| Add a editbox to a screen.
|
int | GfuiEditboxGetFocused (void) |
| Get the Id of the editbox focused in the current screen.
|
char * | GfuiEditboxGetString (void *scr, int id) |
| Get the string.
|
void | GfuiEditboxSetString (void *scr, int id, char *text) |
| Set a new string.
|
int | GfuiScrollListCreate (void *scr, int font, int x, int y, int align, int width, int height, int scrollbar, void *userDataOnSelect, tfuiCallback onSelect) |
| Create a new scroll list.
|
int | GfuiScrollListInsertElement (void *scr, int Id, char *element, int index, void *userData) |
| Insert an element in a scroll list.
|
int | GfuiScrollListMoveSelectedElement (void *scr, int Id, int delta) |
| Move the selected element within the scroll list.
|
char * | GfuiScrollListExtractSelectedElement (void *scr, int Id, void **userData) |
| Extract the selected element from the scroll list (removed).
|
char * | GfuiScrollListExtractElement (void *scr, int Id, int index, void **userData) |
| Extract the specified element from the scroll list.
|
char * | GfuiScrollListGetSelectedElement (void *scr, int Id, void **userData) |
| Get the selected element from the scroll list.
|
char * | GfuiScrollListGetElement (void *scr, int Id, int index, void **userData) |
| Get the specified element from the scroll list.
|
int | GfuiScrollBarCreate (void *scr, int x, int y, int align, int width, int orientation, int min, int max, int len, int start, void *userData, tfuiSBCallback onScroll) |
| Create a new scroll bar.
|
void | GfuiScrollBarPosSet (void *scr, int id, int min, int max, int len, int start) |
| Set new values for position.
|
int | GfuiScrollBarPosGet (void *scr, int id) |
| Get the current position of a scroll bar.
|
int | GfuiStaticImageCreate (void *scr, int x, int y, int w, int h, char *name) |
| Create a new static image.
|
void | GfuiStaticImageSet (void *scr, int id, char *name) |
| Replace an image by another one.
|
void * | GfuiMenuScreenCreate (char *title) |
| Create a new menu screen.
|
void | GfuiMenuDefaultKeysAdd (void *scr) |
| Add the default menu keyboard callback to a screen.
|
int | GfuiMenuButtonCreate (void *menu, char *text, char *tip, void *userdata, tfuiCallback onpush) |
| Add a button to a menu screen.
|
int | GfuiMenuBackQuitButtonCreate (void *menu, char *text, char *tip, void *userdata, tfuiCallback onpush) |
| Add the "Back" or "Quit" button at the bottom of the menu screen.
|
tCtrlJoyInfo * | GfctrlJoyInit (void) |
| Initialize the joystick control.
|
int | GfctrlJoyIsPresent (void) |
| Check if a joystick is present.
|
int | GfctrlJoyGetCurrent (tCtrlJoyInfo *joyInfo) |
| Get the joystick current values.
|
void | GfctrlJoyRelease (tCtrlJoyInfo *joyInfo) |
| Release the tCtrlJoyInfo structure.
|
tCtrlMouseInfo * | GfctrlMouseInit (void) |
| Initialize the mouse control.
|
int | GfctrlMouseGetCurrent (tCtrlMouseInfo *mouseInfo) |
| Get the mouse current values.
|
void | GfctrlMouseRelease (tCtrlMouseInfo *mouseInfo) |
| Release the tCtrlMouseInfo structure.
|
void | GfctrlMouseCenter (void) |
| Recentre the mouse on the screen.
|
void | GfctrlMouseInitCenter (void) |
| Get the reference position.
|
tCtrlRef * | GfctrlGetRefByName (char *name) |
| Get a control reference by its name.
|
char * | GfctrlGetNameByRef (int type, int index) |
| Get a control name by its reference.
|