Broke freeglut.h into glut.h and freeglut_ext.h
[freeglut] / include / GL / freeglut_internal.h
1 /*
2  * freeglut_internal.h
3  *
4  * The freeglut library private include file.
5  *
6  * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
7  * Written by Pawel W. Olszta, <olszta@sourceforge.net>
8  * Creation date: Thu Dec 2 1999
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a
11  * copy of this software and associated documentation files (the "Software"),
12  * to deal in the Software without restriction, including without limitation
13  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  * and/or sell copies of the Software, and to permit persons to whom the
15  * Software is furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included
18  * in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
23  * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26  */
27
28 #ifndef  FREEGLUT_INTERNAL_H
29 #define  FREEGLUT_INTERNAL_H
30
31 /*
32  * Freeglut is meant to be available under all Unix/X11 and Win32 platforms.
33  */
34 #if !defined(_WIN32)
35 #   define  TARGET_HOST_UNIX_X11    1
36 #   define  TARGET_HOST_WIN32       0
37 #else
38 #   define  TARGET_HOST_UNIX_X11    0
39 #   define  TARGET_HOST_WIN32       1
40 #endif
41
42 #define  FREEGLUT_MAX_MENUS         3
43 #define  FREEGLUT_DEBUG             1
44
45 #if FREEGLUT_DEBUG
46     #undef   G_DISABLE_ASSERT
47     #undef   G_DISABLE_CHECKS
48 #else
49     #define  G_DISABLE_ASSERT
50     #define  G_DISABLE_CHECKS
51 #endif
52
53 /*
54  * Somehow all Win32 include headers depend on this one:
55  */
56 #if TARGET_HOST_WIN32
57     #include <windows.h>
58     #include <windowsx.h>
59 #endif
60
61 /*
62  * Those files should be available on every platform.
63  */
64 #include <GL/gl.h>
65 #include <GL/glu.h>
66 #include <stdio.h>
67 #include <string.h>
68 #include <math.h>
69 #include <stdlib.h>
70 #include <assert.h>
71 #include <stdarg.h>
72 #if TARGET_HOST_UNIX_X11
73 #include <sys/time.h>
74 #endif
75
76 /*
77  * The system-dependant include files should go here:
78  */
79 #if TARGET_HOST_UNIX_X11
80     #include <GL/glx.h>
81     #include <X11/Xlib.h>
82     #include <X11/Xatom.h>
83     #include <X11/keysym.h>
84
85     /*
86      * This will generate errors, but I don't have any idea how to fix it (will autoconf help?)
87      */
88     #include <X11/extensions/xf86vmode.h>
89 #endif
90
91 /*
92  * Microsoft VisualC++ 5.0's <math.h> does not define the PI
93  */
94 #ifndef M_PI
95 #    define  M_PI  3.14159265358979323846
96 #endif
97
98 #ifndef TRUE
99 #    define  TRUE  1
100 #endif
101
102 #ifndef FALSE
103 #    define  FALSE  0
104 #endif
105
106 /* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */
107
108 /*
109  * Freeglut callbacks type definitions
110  */
111 typedef void (* FGCBdisplay       )( void );
112 typedef void (* FGCBreshape       )( int, int );
113 typedef void (* FGCBvisibility    )( int );
114 typedef void (* FGCBkeyboard      )( unsigned char, int, int );
115 typedef void (* FGCBspecial       )( int, int, int );
116 typedef void (* FGCBmouse         )( int, int, int, int );
117 typedef void (* FGCBmotion        )( int, int );
118 typedef void (* FGCBpassive       )( int, int );
119 typedef void (* FGCBentry         )( int );
120 typedef void (* FGCBwindowStatus  )( int );
121 typedef void (* FGCBmenuState     )( int );
122 typedef void (* FGCBmenuStatus    )( int, int, int );
123 typedef void (* FGCBselect        )( int, int, int );
124 typedef void (* FGCBjoystick      )( unsigned int, int, int, int );
125 typedef void (* FGCBkeyboardUp    )( unsigned char, int, int );
126 typedef void (* FGCBspecialUp     )( int, int, int );
127 typedef void (* FGCBoverlayDisplay)( void );
128 typedef void (* FGCBspaceMotion   )( int, int, int );
129 typedef void (* FGCBspaceRotate   )( int, int, int );
130 typedef void (* FGCBspaceButton   )( int, int );
131 typedef void (* FGCBdials         )( int, int );
132 typedef void (* FGCBbuttonBox     )( int, int );
133 typedef void (* FGCBtabletMotion  )( int, int );
134 typedef void (* FGCBtabletButton  )( int, int, int, int );
135 typedef void (* FGCBdestroy       )( void );
136
137 /*
138  * The global callbacks type definitions
139  */
140 typedef void (* FGCBidle          )( void );
141 typedef void (* FGCBtimer         )( int );
142
143 /*
144  * The callback used when creating/using menus
145  */
146 typedef void (* FGCBmenu          )( int );
147
148
149 /*
150  * A list structure
151  */
152 typedef struct tagSFG_List SFG_List;
153 struct tagSFG_List
154 {
155     void *First;
156     void *Last;
157 };
158
159 /*
160  * A list node structure
161  */
162 typedef struct tagSFG_Node SFG_Node;
163 struct tagSFG_Node
164 {
165     void *Next;
166     void *Prev;
167 };
168
169 /*
170  * A helper structure holding two ints and a boolean
171  */
172 typedef struct tagSFG_XYUse SFG_XYUse;
173 struct tagSFG_XYUse
174 {
175     GLint           X, Y;               /* The two integers...               */
176     GLboolean       Use;                /* ...and a single boolean.          */
177 };
178
179 /*
180  * A helper structure holding a timeval and a boolean
181  */
182 typedef struct tagSFG_Time SFG_Time;
183 struct tagSFG_Time
184 {
185 #ifdef WIN32
186     DWORD Value;
187 #else
188     struct timeval  Value;
189 #endif
190     GLboolean       Set;
191 };
192
193 /*
194  * An enumeration containing the state of the GLUT execution:  initializing, running, or stopping
195  */
196 typedef enum {
197   GLUT_EXEC_STATE_INIT,
198   GLUT_EXEC_STATE_RUNNING,
199   GLUT_EXEC_STATE_STOP
200 } fgExecutionState ;
201
202 /*
203  * This structure holds different freeglut settings
204  */
205 typedef struct tagSFG_State SFG_State;
206 struct tagSFG_State
207 {
208     SFG_XYUse        Position;             /* The default windows' position     */
209     SFG_XYUse        Size;                 /* The default windows' size         */
210     unsigned int     DisplayMode;          /* The display mode for new windows  */
211
212     GLboolean        ForceDirectContext;   /* Should we force direct contexts?  */
213     GLboolean        TryDirectContext;     /* What about giving a try to?       */
214
215     GLboolean        ForceIconic;          /* All new top windows are iconified */
216
217     GLboolean        GLDebugSwitch;        /* OpenGL state debugging switch     */
218     GLboolean        XSyncSwitch;          /* X11 sync protocol switch          */
219
220     GLboolean        IgnoreKeyRepeat;      /* Whether to ignore key repeat...   */
221
222     SFG_Time         Time;                 /* The time that glutInit was called */
223     SFG_List         Timers;               /* The freeglut timer hooks          */
224
225     FGCBidle         IdleCallback;         /* The global idle callback          */
226
227     FGCBmenuState    MenuStateCallback;    /* Menu callbacks are global         */
228     FGCBmenuStatus   MenuStatusCallback;
229
230     SFG_XYUse        GameModeSize;         /* The game mode screen's dimensions */
231     int              GameModeDepth;        /* The pixel depth for game mode     */
232     int              GameModeRefresh;      /* The refresh rate for game mode    */
233
234     int              ActionOnWindowClose ; /* Action when user clicks "x" on window header bar */
235
236     fgExecutionState ExecState ;           /* Current state of the GLUT execution */
237 };
238
239 /*
240  * The structure used by display initialization in freeglut_init.c
241  */
242 typedef struct tagSFG_Display SFG_Display;
243 struct tagSFG_Display
244 {
245 #if TARGET_HOST_UNIX_X11
246     Display*        Display;            /* The display we are being run in.  */
247     int             Screen;             /* The screen we are about to use.   */
248     Window          RootWindow;         /* The screen's root window.         */
249     int             Connection;         /* The display's connection number   */
250     Atom            DeleteWindow;       /* The window deletion atom          */
251
252 #ifdef X_XF86VidModeGetModeLine
253     XF86VidModeModeLine DisplayMode;    /* Current screen's display settings */
254     int             DisplayModeClock;   /* The display mode's refresh rate   */
255 #endif
256
257 #elif TARGET_HOST_WIN32
258     HINSTANCE        Instance;          /* The application's instance        */
259     DEVMODE         DisplayMode;        /* Desktop's display settings        */
260
261 #endif
262
263     int             ScreenWidth;        /* The screen's width in pixels      */
264     int             ScreenHeight;       /* The screen's height in pixels     */
265     int             ScreenWidthMM;      /* The screen's width in milimeters  */
266     int             ScreenHeightMM;     /* The screen's height in milimeters */
267 };
268
269
270 /*
271  * The user can create any number of timer hooks
272  */
273 typedef struct tagSFG_Timer SFG_Timer;
274 struct tagSFG_Timer
275 {
276     SFG_Node        Node;
277     int             ID;                 /* The timer ID integer              */
278     FGCBtimer       Callback;           /* The timer callback                */
279     long            TriggerTime;        /* The timer trigger time            */
280 };
281
282 /*
283  * A window and its OpenGL context. The contents of this structure
284  * are highly dependant on the target operating system we aim at...
285  */
286 typedef struct tagSFG_Context SFG_Context;
287 struct tagSFG_Context
288 {
289 #if TARGET_HOST_UNIX_X11
290     Window          Handle;             /* The window's handle               */
291     GLXContext      Context;            /* The OpenGL context                */
292     XVisualInfo*    VisualInfo;         /* The window's visual information   */
293
294 #elif TARGET_HOST_WIN32
295     HWND            Handle;             /* The window's handle               */
296     HDC             Device;             /* The window's device context       */
297     HGLRC           Context;            /* The window's WGL context          */
298
299 #endif
300 };
301
302 /*
303  * Window's state description. This structure should be kept portable.
304  */
305 typedef struct tagSFG_WindowState SFG_WindowState;
306 struct tagSFG_WindowState
307 {
308     int             Width;              /* Window's width in pixels          */
309     int             Height;             /* The same about the height         */
310
311     GLboolean       Redisplay;          /* Do we have to redisplay?          */
312     GLboolean       Visible;            /* Is the window visible now         */
313
314     int             Cursor;             /* The currently selected cursor     */
315     int             Modifiers;          /* The current ALT/SHIFT/CTRL state  */
316
317     long            JoystickPollRate;   /* The joystick polling rate         */
318     long            JoystickLastPoll;   /* When the last poll has happened   */
319
320     int             MouseX, MouseY;     /* The most recent mouse position    */
321
322     GLboolean       IsGameMode;         /* Is this the game mode window?     */
323
324 #if TARGET_HOST_WIN32
325     GLboolean       NeedToResize;       /* Do we need to explicitly resize?  */
326 #endif
327 };
328
329 /*
330  * The window callbacks the user can supply us with. Should be kept portable.
331  */
332 typedef struct tagSFG_WindowCallbacks SFG_WindowCallbacks;
333 struct tagSFG_WindowCallbacks
334 {
335     /*
336      * Following callbacks are fully supported right now
337      * and are ready to be tested for GLUT conformance:
338      */
339     FGCBdisplay         Display;
340     FGCBreshape         Reshape;
341     FGCBkeyboard        Keyboard;
342     FGCBkeyboardUp      KeyboardUp;
343     FGCBspecial         Special;
344     FGCBspecialUp       SpecialUp;
345     FGCBmouse           Mouse;
346     FGCBmotion          Motion;
347     FGCBpassive         Passive;
348     FGCBentry           Entry;
349     FGCBvisibility      Visibility;
350     FGCBwindowStatus    WindowStatus;
351     FGCBjoystick        Joystick;
352     FGCBdestroy         Destroy;
353
354     /*
355      * Those callbacks are being ignored for the moment
356      */
357     FGCBselect          Select;
358     FGCBoverlayDisplay  OverlayDisplay;
359     FGCBspaceMotion     SpaceMotion;
360     FGCBspaceRotate     SpaceRotation;
361     FGCBspaceButton     SpaceButton;
362     FGCBdials           Dials;
363     FGCBbuttonBox       ButtonBox;
364     FGCBtabletMotion    TabletMotion;
365     FGCBtabletButton    TabletButton;
366 };
367
368 /*
369  * This structure describes a menu
370  */
371 typedef struct tagSFG_Menu SFG_Menu;
372 struct tagSFG_Menu
373 {
374     SFG_Node            Node;
375     int                 ID;                     /* The global menu ID        */
376     SFG_List            Entries;                /* The menu entries list     */
377     FGCBmenu            Callback;               /* The menu callback         */
378     GLboolean           IsActive;               /* Is the menu selected?     */
379     int                 Width;                  /* Menu box width in pixels  */
380     int                 Height;                 /* Menu box height in pixels */
381     int                 X, Y;                   /* Menu box raster position  */
382 };
383
384 /*
385  * This is a menu entry
386  */
387 typedef struct tagSFG_MenuEntry SFG_MenuEntry;
388 struct tagSFG_MenuEntry
389 {
390     SFG_Node            Node;
391     int                 ID;                     /* The menu entry ID (local) */
392     int                 Ordinal;                /* The menu's ordinal number */
393     char*               Text;                   /* The text to be displayed  */
394     SFG_Menu*           SubMenu;                /* Optional sub-menu tree    */
395     GLboolean           IsActive;               /* Is the entry highlighted? */
396     int                 Width;                  /* Label's width in pixels   */
397 };
398
399 /*
400  * A window, making part of FreeGLUT windows hierarchy. Should be kept portable.
401  */
402 typedef struct tagSFG_Window SFG_Window;
403 struct tagSFG_Window
404 {
405     SFG_Node            Node;
406     int                 ID;                     /* Window's ID number        */
407
408     SFG_Context         Window;                 /* Window and OpenGL context */
409     SFG_WindowState     State;                  /* The window state          */
410     SFG_WindowCallbacks Callbacks;              /* The window callbacks      */
411
412     SFG_Menu*       Menu[ FREEGLUT_MAX_MENUS ]; /* Menus appended to window  */
413     SFG_Menu*       ActiveMenu;                 /* The window's active menu  */
414
415     SFG_Window*         Parent;                 /* The parent to this window */
416     SFG_List            Children;               /* The subwindows d.l. list  */
417 };
418
419 /*
420  * A linked list structure of windows
421  */
422 typedef struct tagSFG_WindowList SFG_WindowList ;
423 struct tagSFG_WindowList
424 {
425   SFG_Window *window ;
426   GLboolean needToClose ;
427   SFG_WindowList *next ;
428 } ;
429
430 /*
431  * This holds information about all the windows, menus etc.
432  */
433 typedef struct tagSFG_Structure SFG_Structure;
434 struct tagSFG_Structure
435 {
436     SFG_List            Windows;                /* The global windows list   */
437     SFG_List            Menus;                  /* The global menus list     */
438
439     SFG_Window*         Window;                 /* The currently active win. */
440     SFG_Menu*           Menu;                   /* Same, but menu...         */
441
442     SFG_Window*         GameMode;               /* The game mode window      */
443
444     int                 WindowID;               /* The new current window ID */
445     int                 MenuID;                 /* The new current menu ID   */
446 };
447
448 /*
449  * This structure is used for the enumeration purposes.
450  * You can easily extend its functionalities by declaring
451  * a structure containing enumerator's contents and custom
452  * data, then casting its pointer to (SFG_Enumerator *).
453  */
454 typedef struct tagSFG_Enumerator SFG_Enumerator;
455 struct tagSFG_Enumerator
456 {
457     GLboolean   found;                          /* Used to terminate search  */
458     void*       data;                           /* Custom data pointer       */
459 };
460 typedef void (* FGCBenumerator  )( SFG_Window *, SFG_Enumerator * );
461
462 /*
463  * The bitmap font structure
464  */
465 typedef struct tagSFG_Font SFG_Font;
466 struct tagSFG_Font
467 {
468     char*           Name;                       /* The source font name      */
469     int             Quantity;                   /* Number of chars in font   */
470     int             Height;                     /* Height of the characters  */
471     const GLubyte** Characters;                 /* The characters mapping    */
472
473     float           xorig, yorig ;              /* The origin of the character relative to the draw location */
474 };
475
476 /*
477  * The stroke font structures
478  */
479
480 typedef struct tagSFG_StrokeVertex SFG_StrokeVertex;
481 struct tagSFG_StrokeVertex
482 {
483     GLfloat         X, Y;
484 };
485
486 typedef struct tagSFG_StrokeStrip SFG_StrokeStrip;
487 struct tagSFG_StrokeStrip
488 {
489     int             Number;
490     const SFG_StrokeVertex* Vertices;
491 };
492
493 typedef struct tagSFG_StrokeChar SFG_StrokeChar;
494 struct tagSFG_StrokeChar
495 {
496     GLfloat         Right;
497     int             Number;
498     const SFG_StrokeStrip* Strips;
499 };
500
501 typedef struct tagSFG_StrokeFont SFG_StrokeFont;
502 struct tagSFG_StrokeFont
503 {
504     char*           Name;                       /* The source font name      */
505     int             Quantity;                   /* Number of chars in font   */
506     GLfloat         Height;                     /* Height of the characters  */
507     const SFG_StrokeChar** Characters;          /* The characters mapping    */
508 };
509
510 /* -- GLOBAL VARIABLES EXPORTS --------------------------------------------- */
511
512 /*
513  * Freeglut display related stuff (initialized once per session)
514  */
515 extern SFG_Display fgDisplay;
516
517 /*
518  * Freeglut internal structure
519  */
520 extern SFG_Structure fgStructure;
521
522 /*
523  * The current freeglut settings
524  */
525 extern SFG_State fgState;
526
527
528 /* -- PRIVATE FUNCTION DECLARATIONS ---------------------------------------- */
529
530 /*
531  * A call to this function makes us sure that the Display and Structure
532  * subsystems have been properly initialized and are ready to be used
533  */
534 #define  freeglut_assert_ready                      assert( fgState.Time.Set );
535
536 /*
537  * Following definitions are somewhat similiar to GLib's,
538  * but do not generate any log messages:
539  */
540 #define  freeglut_return_if_fail( expr )            if( !(expr) ) return;
541 #define  freeglut_return_val_if_fail( expr, val )   if( !(expr) ) return( val );
542
543 /*
544  * A call to those macros assures us that there is a current
545  * window and menu set, respectively:
546  */
547 #define  freeglut_assert_window                     assert( fgStructure.Window != NULL );
548 #define  freeglut_assert_menu                       assert( fgStructure.Menu != NULL );
549
550 /*
551  * The initialize and deinitialize functions get called on glutInit()
552  * and glutMainLoop() end respectively. They should create/clean up
553  * everything inside of the freeglut
554  */
555 void fgInitialize( const char* displayName );
556 void fgDeinitialize( void );
557
558 /*
559  * Those two functions are used to create/destroy the freeglut internal
560  * structures. This actually happens when calling glutInit() and when
561  * quitting the glutMainLoop() (which actually happens, when all windows
562  * have been closed).
563  */
564 void fgCreateStructure( void );
565 void fgDestroyStructure( void );
566
567 /*
568  * A helper function to check if a display mode is possible to use
569  */
570 #if TARGET_HOST_UNIX_X11
571 XVisualInfo* fgChooseVisual( void );
572 #endif
573
574 /*
575  * The window procedure for Win32 events handling
576  */
577 #if TARGET_HOST_WIN32
578 LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
579 GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly );
580 #endif
581
582 /*
583  * Window creation, opening, closing and destruction.
584  * Defined in freeglut_structure.c, freeglut_window.c.
585  */
586 SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, int x, int y, int w, int h, GLboolean gameMode );
587 void        fgOpenWindow( SFG_Window* window, const char* title, int x, int y, int w, int h, GLboolean gameMode, int isSubWindow );
588 void        fgCloseWindow( SFG_Window* window );
589 void        fgAddToWindowDestroyList ( SFG_Window* window, GLboolean needToClose ) ;
590 void        fgCloseWindows () ;
591 void        fgDestroyWindow( SFG_Window* window, GLboolean needToClose );
592
593 /*
594  * Menu creation and destruction. Defined in freeglut_structure.c
595  */
596 SFG_Menu*   fgCreateMenu( FGCBmenu menuCallback );
597 void        fgDestroyMenu( SFG_Menu* menu );
598
599 /*
600  * Joystick device management functions, defined in freeglut_joystick.c
601  */
602 void        fgJoystickInit( int ident );
603 void        fgJoystickClose( void );
604 void        fgJoystickPollWindow( SFG_Window* window );
605
606 /*
607  * Helper function to enumerate through all registered windows
608  * and one to enumerate all of a window's subwindows...
609  *
610  * The GFunc callback for those functions will be defined as:
611  *
612  *      void enumCallback( gpointer window, gpointer enumerator );
613  *
614  * where window is the enumerated (sub)window pointer (SFG_Window *),
615  * and userData is the a custom user-supplied pointer. Functions
616  * are defined and exported from freeglut_structure.c file.
617  */
618 void fgEnumWindows( FGCBenumerator enumCallback, SFG_Enumerator* enumerator );
619 void fgEnumSubWindows( SFG_Window* window, FGCBenumerator enumCallback, SFG_Enumerator* enumerator );
620
621 /*
622  * fgWindowByHandle returns a (SFG_Window *) value pointing to the
623  * first window in the queue matching the specified window handle.
624  * The function is defined in freeglut_structure.c file.
625  */
626 #if TARGET_HOST_UNIX_X11
627     SFG_Window* fgWindowByHandle( Window hWindow );
628 #elif TARGET_HOST_WIN32
629
630     SFG_Window* fgWindowByHandle( HWND hWindow );
631 #endif
632
633 /*
634  * This function is similiar to the previous one, except it is
635  * looking for a specified (sub)window identifier. The function
636  * is defined in freeglut_structure.c file.
637  */
638 SFG_Window* fgWindowByID( int windowID );
639
640 /*
641  * Looks up a menu given its ID. This is easier that fgWindowByXXX
642  * as all menus are placed in a single doubly linked list...
643  */
644 SFG_Menu* fgMenuByID( int menuID );
645
646 /*
647  * The menu activation and deactivation the code. This is the meat
648  * of the menu user interface handling code...
649  */
650 void fgActivateMenu( SFG_Window* window, int button );
651 void fgExecuteMenuCallback( SFG_Menu* menu ) ;
652 GLboolean fgCheckActiveMenu ( SFG_Window *window, SFG_Menu *menu ) ;
653 void fgDeactivateMenu( SFG_Window *window );
654
655 /*
656  * This function gets called just before the buffers swap, so that
657  * freeglut can display the pull-down menus via OpenGL. The function
658  * is defined in freeglut_menu.c file.
659  */
660 void fgDisplayMenu( void );
661
662 /*
663  * Display the mouse cursor using OpenGL calls. The function
664  * is defined in freeglut_cursor.c file.
665  */
666 void fgDisplayCursor( void );
667
668 /*
669  * Elapsed time as per glutGet(GLUT_ELAPSED_TIME).
670  */
671 long fgElapsedTime( void );
672
673 /*
674  * List functions
675  */
676 void fgListInit(SFG_List *list);
677 void fgListAppend(SFG_List *list, SFG_Node *node);
678 void fgListRemove(SFG_List *list, SFG_Node *node);
679 int fgListLength(SFG_List *list);
680
681 /*
682  * Error Messages functions
683  */
684 void fgError( const char *fmt, ... );
685 void fgWarning( const char *fmt, ... );
686
687 #endif /* FREEGLUT_INTERNAL_H */
688
689 /*** END OF FILE ***/