Added stroke fonts.
[freeglut] / include / GL / freeglut_internal.h
index db78865..8c46ee0 100644 (file)
@@ -179,7 +179,11 @@ struct tagSFG_XYUse
 typedef struct tagSFG_Time SFG_Time;
 struct tagSFG_Time
 {
+#ifdef WIN32
+    DWORD Value;
+#else
     struct timeval  Value;
+#endif
     GLboolean       Set;
 };
 
@@ -208,6 +212,9 @@ struct tagSFG_State
 
     FGCBidle        IdleCallback;       /* The global idle callback          */
 
+    FGCBmenuState   MenuStateCallback;  /* Menu callbacks are global         */
+    FGCBmenuStatus  MenuStatusCallback;
+
     SFG_XYUse       GameModeSize;       /* The game mode screen's dimensions */
     int             GameModeDepth;      /* The pixel depth for game mode     */
     int             GameModeRefresh;    /* The refresh rate for game mode    */
@@ -316,27 +323,21 @@ struct tagSFG_WindowCallbacks
     FGCBdisplay         Display;
     FGCBreshape         Reshape;
     FGCBkeyboard        Keyboard;
+    FGCBkeyboardUp      KeyboardUp;
     FGCBspecial         Special;
+    FGCBspecialUp       SpecialUp;
     FGCBmouse           Mouse;
     FGCBmotion          Motion;
     FGCBpassive         Passive;
     FGCBentry           Entry;
     FGCBvisibility      Visibility;
     FGCBwindowStatus    WindowStatus;
-
-    /*
-     * Those callbacks are required for the initial version
-     */
-    FGCBmenuState       MenuState;
-    FGCBmenuStatus      MenuStatus;
-    FGCBselect          Select;
     FGCBjoystick        Joystick;
-    FGCBkeyboardUp      KeyboardUp;
-    FGCBspecialUp       SpecialUp;
 
     /*
      * Those callbacks are being ignored for the moment
      */
+    FGCBselect          Select;
     FGCBoverlayDisplay  OverlayDisplay;
     FGCBspaceMotion     SpaceMotion;
     FGCBspaceRotate     SpaceRotation;
@@ -442,6 +443,39 @@ struct tagSFG_Font
     const GLubyte** Characters;                 /* The characters mapping    */
 };
 
+/*
+ * The stroke font structures
+ */
+
+typedef struct tagSFG_StrokeVertex SFG_StrokeVertex;
+struct tagSFG_StrokeVertex
+{
+    GLfloat         X, Y;
+};
+
+typedef struct tagSFG_StrokeStrip SFG_StrokeStrip;
+struct tagSFG_StrokeStrip
+{
+    int             Number;
+    const SFG_StrokeVertex* Vertices;
+};
+
+typedef struct tagSFG_StrokeChar SFG_StrokeChar;
+struct tagSFG_StrokeChar
+{
+    GLfloat         Right;
+    int             Number;
+    const SFG_StrokeStrip* Strips;
+};
+
+typedef struct tagSFG_StrokeFont SFG_StrokeFont;
+struct tagSFG_StrokeFont
+{
+    char*           Name;                       /* The source font name      */
+    int             Quantity;                   /* Number of chars in font   */
+    GLfloat         Height;                     /* Height of the characters  */
+    const SFG_StrokeChar** Characters;          /* The characters mapping    */
+};
 
 /* -- GLOBAL VARIABLES EXPORTS --------------------------------------------- */
 
@@ -512,7 +546,7 @@ XVisualInfo* fgChooseVisual( void );
  */
 #if TARGET_HOST_WIN32
 LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
-gboolean fgSetupPixelFormat( SFG_Window* window, gboolean checkOnly );
+GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly );
 #endif
 
 /*