Go to the documentation of this file.
   10 #ifndef FREEGLUT_INTERNAL_H 
   11 #define FREEGLUT_INTERNAL_H 
   18 #define VERSION_MAJOR 2 
   19 #define VERSION_MINOR 4 
   20 #define VERSION_PATCH 0 
   23 #if defined(_WIN32_WCE) 
   24 #define TARGET_HOST_UNIX_X11 0 
   25 #define TARGET_HOST_WIN32 0 
   26 #define TARGET_HOST_WINCE 1 
   27 #elif defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) 
   28 #define TARGET_HOST_UNIX_X11 0 
   29 #define TARGET_HOST_WIN32 1 
   30 #define TARGET_HOST_WINCE 0 
   32 #define TARGET_HOST_UNIX_X11 1 
   33 #define TARGET_HOST_WIN32 0 
   34 #define TARGET_HOST_WINCE 0 
   37 #define FREEGLUT_MAX_MENUS 3 
   48 #define strdup _strdup 
   59 #include <sys/types.h> 
   64 #if TIME_WITH_SYS_TIME 
   76 #if TARGET_HOST_UNIX_X11 
   79 #include <X11/Xatom.h> 
   80 #include <X11/keysym.h> 
   82 #ifdef HAVE_X11_EXTENSIONS_XF86VMODE_H 
   83 #include <X11/extensions/xf86vmode.h> 
   89 #define M_PI 3.14159265358979323846 
  165 #if TARGET_HOST_WIN32 || TARGET_HOST_WINCE 
  235 #if TARGET_HOST_UNIX_X11 
  242 #ifdef X_XF86VidModeGetModeLine 
  247         int DisplayModeValid; 
 
  248         XF86VidModeModeLine DisplayMode; 
 
  249         int DisplayModeClock; 
 
  250         int DisplayViewPortX; 
 
  251         int DisplayViewPortY; 
 
  257 #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE 
  283 #if TARGET_HOST_UNIX_X11 
  288 #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE 
  305 #if TARGET_HOST_UNIX_X11 
  307 #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE 
  364 #define SET_WCB(window, cbname, func)                               \ 
  367                 if (FETCH_WCB(window, cbname) != (SFG_Proc)(func))          \ 
  368                         (((window).CallBacks[CB_##cbname]) = (SFG_Proc)(func)); \ 
  382 #define FETCH_WCB(window, cbname) ((window).CallBacks[CB_##cbname]) 
  403 #if TARGET_HOST_WIN32 
  404 #define INVOKE_WCB(window, cbname, arg_list)                               \ 
  407                 if (FETCH_WCB(window, cbname))                                     \ 
  409                         FGCB##cbname func = (FGCB##cbname)(FETCH_WCB(window, cbname)); \ 
  410                         fgSetWindow(&window);                                          \ 
  415 #define INVOKE_WCB(window, cbname, arg_list)                    \ 
  418                 if (FETCH_WCB(window, cbname))                          \ 
  420                         fgSetWindow(&window);                               \ 
  421                         ((FGCB##cbname)FETCH_WCB(window, cbname)) arg_list; \ 
  479 #if TARGET_HOST_UNIX_X11 
  647 #define FREEGLUT_EXIT_IF_NOT_INITIALISED(string)  \ 
  648         if (!fgState.Initialised)                     \ 
  651                         " ERROR:  Function <%s> called"       \ 
  652                         " without first calling 'glutInit'.", \ 
  656 #define FREEGLUT_INTERNAL_ERROR_EXIT_IF_NOT_INITIALISED(string) \ 
  657         if (!fgState.Initialised)                                   \ 
  660                         " ERROR:  Internal <%s> function called"            \ 
  661                         " without first calling 'glutInit'.",               \ 
  665 #define FREEGLUT_INTERNAL_ERROR_EXIT(cond, string, function)         \ 
  669                         " ERROR:  Internal error <%s> in function %s", (string), \ 
  677 #define freeglut_return_if_fail(expr) \ 
  679 #define freeglut_return_val_if_fail(expr, val) \ 
  680         if (!(expr)) return val; 
  686 #define FREEGLUT_EXIT_IF_NO_WINDOW(string)      \ 
  687         if (!fgStructure.CurrentWindow)             \ 
  690                         " ERROR:  Function <%s> called"     \ 
  691                         " with no current window defined.", \ 
  712 #if TARGET_HOST_UNIX_X11 
  717 #if TARGET_HOST_WIN32 || TARGET_HOST_WINCE 
  719         fgWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
  730         SFG_Window* parent, 
const char* title, 
int x, 
int y, 
int w, 
int h,
 
  734         SFG_Window* window, 
const char* title, 
int x, 
int y, 
int w, 
int h,
 
  824 void fgError(
const char* fmt, ...);
 
  
void fgJoystickClose(void)
 
void(* FGCBSpaceMotion)(int, int, int)
 
void fgSetCursor(SFG_Window *window, int cursorID)
 
SFG_Window * fgWindowByID(int windowID)
 
void fgDeinitialize(void)
 
void fgDeactivateMenu(SFG_Window *window)
 
void fgError(const char *fmt,...)
 
void fgAddToWindowDestroyList(SFG_Window *window)
 
void(* FGCBTabletButton)(int, int, int, int)
 
void(* FGCBPassive)(int, int)
 
SFG_Window * fgWindowByHandle(SFG_WindowHandleType hWindow)
 
void(* FGCBVisibility)(int)
 
void(* FGCBTabletMotion)(int, int)
 
GLboolean JoysticksInitialised
 
SFG_Menu * fgCreateMenu(FGCBMenu menuCallback)
 
void(* FGCBMotion)(int, int)
 
void fgJoystickPollWindow(SFG_Window *window)
 
void fgCreateStructure(void)
 
void(* FGCBDestroy)(void)
 
void fgDestroyMenu(SFG_Menu *menu)
 
void fgUpdateMenuHighlight(SFG_Menu *menu)
 
void fgListInsert(SFG_List *list, SFG_Node *next, SFG_Node *node)
 
int glutJoystickGetNumButtons(int ident)
 
@ GLUT_EXEC_STATE_RUNNING
 
SFG_Window * fgCreateWindow(SFG_Window *parent, const char *title, int x, int y, int w, int h, GLboolean gameMode, GLboolean isMenu)
 
void(* FGCBMouse)(int, int, int, int)
 
void fgInitialiseJoysticks(void)
 
void fgListRemove(SFG_List *list, SFG_Node *node)
 
GLubyte GLubyte GLubyte GLubyte w
 
int glutJoystickNotWorking(int ident)
 
XVisualInfo * fgChooseVisual(void)
 
FGCBMenuStatus MenuStatusCallback
 
void fgListAppend(SFG_List *list, SFG_Node *node)
 
const SFG_StrokeVertex * Vertices
 
const GLubyte ** Characters
 
int fgListLength(SFG_List *list)
 
SFG_MenuContext * MenuContext
 
#define FREEGLUT_MAX_MENUS
 
SFG_Structure fgStructure
 
SFG_Menu * Menu[FREEGLUT_MAX_MENUS]
 
void(* FGCBButtonBox)(int, int)
 
void(* FGCBMenuState)(int)
 
void fgDestroyWindow(SFG_Window *window)
 
void fgWarning(const char *fmt,...)
 
void(* FGCBenumerator)(SFG_Window *, SFG_Enumerator *)
 
GLboolean IgnoreKeyRepeat
 
void fgDestroyStructure(void)
 
void(* FGCBMenuStatus)(int, int, int)
 
GLboolean UseCurrentContext
 
Window SFG_WindowHandleType
 
FGCBMenuState MenuStateCallback
 
void(* FGCBReshape)(int, int)
 
void(* FGCBMouseWheel)(int, int, int, int)
 
struct __GLXcontextRec * GLXContext
 
SFG_List WindowsToDestroy
 
const SFG_StrokeChar ** Characters
 
void(* FGCBSpaceRotation)(int, int, int)
 
void fgCloseWindow(SFG_Window *window)
 
int glutJoystickGetNumAxes(int ident)
 
const SFG_StrokeStrip * Strips
 
void fgOpenWindow(SFG_Window *window, const char *title, int x, int y, int w, int h, GLboolean gameMode, GLboolean isSubWindow)
 
void(* FGCBKeyboardUp)(unsigned char, int, int)
 
SFG_Proc CallBacks[TOTAL_CALLBACKS]
 
SFG_Menu * fgMenuByID(int menuID)
 
SFG_Window * CurrentWindow
 
fgExecutionState ExecState
 
void fgEnumWindows(FGCBenumerator enumCallback, SFG_Enumerator *enumerator)
 
void(* FGCBOverlayDisplay)(void)
 
void fgEnumSubWindows(SFG_Window *window, FGCBenumerator enumCallback, SFG_Enumerator *enumerator)
 
SFG_WindowContextType Context
 
void(* FGCBSpecialUp)(int, int, int)
 
int fgJoystickDetect(void)
 
void fgSetWindow(SFG_Window *window)
 
void(* FGCBWindowStatus)(int)
 
void(* FGCBSpecial)(int, int, int)
 
GLboolean fgCheckActiveMenu(SFG_Window *window, int button, GLboolean pressed, int mouse_x, int mouse_y)
 
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
 
void(* FGCBSpaceButton)(int, int)
 
void(* FGCBDisplay)(void)
 
void(* FGCBDials)(int, int)
 
void fgListInit(SFG_List *list)
 
void(* FGCBJoystick)(unsigned int, int, int, int)
 
void(* FGCBKeyboard)(unsigned char, int, int)
 
SFG_WindowHandleType Handle
 
void(* FGCBSelect)(int, int, int)
 
GLXContext SFG_WindowContextType
 
   |  Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST |   |