/usr/include/togl.h is in libtogl-dev 1.7-12ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | /* $Id: togl.h,v 1.28 2005/10/27 07:45:48 gregcouch Exp $ */
/* vi:set sw=4: */
/*
* Togl - a Tk OpenGL widget
*
* Copyright (C) 1996-1998 Brian Paul and Ben Bederson
* See the LICENSE file for copyright details.
*/
#ifndef TOGL_H
# define TOGL_H
# include "togl_ws.h"
# ifdef TOGL_WGL
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# undef WIN32_LEAN_AND_MEAN
# if defined(_MSC_VER)
# define DllEntryPoint DllMain
# endif
# endif
# ifdef _WIN32
# define TOGL_EXTERN __declspec(dllexport) extern
# else
# define TOGL_EXTERN extern
# endif /* _WIN32 */
# ifdef TOGL_AGL_CLASSIC
# ifndef MAC_TCL
# define MAC_TCL 1
# endif
# endif
# ifdef TOGL_AGL
# ifndef MAC_OSX_TCL
# define MAC_OSX_TCL 1
# endif
# ifndef MAC_OSX_TK
# define MAC_OSX_TK 1
# endif
# endif
# include <tcl.h>
# include <tk.h>
# if defined(TOGL_AGL) || defined(TOGL_AGL_CLASSIC)
# include <OpenGL/gl.h>
# else
# include <GL/gl.h>
# endif
# ifdef __sgi
# include <GL/glx.h>
# include <X11/extensions/SGIStereo.h>
# endif
# ifndef CONST84
# define CONST84
# endif
# ifndef NULL
# define NULL 0
# endif
# ifndef TOGL_USE_FONTS
# define TOGL_USE_FONTS 1 /* needed for demos */
# endif
# ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
# endif
# define TOGL_VERSION "1.7"
# define TOGL_MAJOR_VERSION 1
# define TOGL_MINOR_VERSION 7
/*
* "Standard" fonts which can be specified to Togl_LoadBitmapFont()
*/
# define TOGL_BITMAP_8_BY_13 ((char *) 1)
# define TOGL_BITMAP_9_BY_15 ((char *) 2)
# define TOGL_BITMAP_TIMES_ROMAN_10 ((char *) 3)
# define TOGL_BITMAP_TIMES_ROMAN_24 ((char *) 4)
# define TOGL_BITMAP_HELVETICA_10 ((char *) 5)
# define TOGL_BITMAP_HELVETICA_12 ((char *) 6)
# define TOGL_BITMAP_HELVETICA_18 ((char *) 7)
/*
* Normal and overlay plane constants
*/
# define TOGL_NORMAL 1
# define TOGL_OVERLAY 2
struct Togl;
typedef struct Togl Togl;
typedef void (Togl_Callback) (Togl *togl);
typedef int (Togl_CmdProc) (Togl *togl, int argc, CONST84 char *argv[]);
TOGL_EXTERN int Togl_Init(Tcl_Interp *interp);
/*
* Default/initial callback setup functions
*/
TOGL_EXTERN void Togl_CreateFunc(Togl_Callback *proc);
TOGL_EXTERN void Togl_DisplayFunc(Togl_Callback *proc);
TOGL_EXTERN void Togl_ReshapeFunc(Togl_Callback *proc);
TOGL_EXTERN void Togl_DestroyFunc(Togl_Callback *proc);
TOGL_EXTERN void Togl_TimerFunc(Togl_Callback *proc);
TOGL_EXTERN void Togl_ResetDefaultCallbacks(void);
/*
* Change callbacks for existing widget
*/
TOGL_EXTERN void Togl_SetCreateFunc(Togl *togl, Togl_Callback *proc);
TOGL_EXTERN void Togl_SetDisplayFunc(Togl *togl, Togl_Callback *proc);
TOGL_EXTERN void Togl_SetReshapeFunc(Togl *togl, Togl_Callback *proc);
TOGL_EXTERN void Togl_SetDestroyFunc(Togl *togl, Togl_Callback *proc);
TOGL_EXTERN void Togl_SetTimerFunc(Togl *togl, Togl_Callback *proc);
/*
* Miscellaneous
*/
TOGL_EXTERN int Togl_Configure(Tcl_Interp *interp, Togl *togl,
int argc, const char *argv[], int flags);
TOGL_EXTERN void Togl_MakeCurrent(const Togl *togl);
TOGL_EXTERN void Togl_CreateCommand(char *cmd_name, Togl_CmdProc *cmd_proc);
TOGL_EXTERN void Togl_PostRedisplay(Togl *togl);
TOGL_EXTERN void Togl_SwapBuffers(const Togl *togl);
/*
* Query functions
*/
TOGL_EXTERN const char *Togl_Ident(const Togl *togl);
TOGL_EXTERN int Togl_Width(const Togl *togl);
TOGL_EXTERN int Togl_Height(const Togl *togl);
TOGL_EXTERN Tcl_Interp *Togl_Interp(const Togl *togl);
TOGL_EXTERN Tk_Window Togl_TkWin(const Togl *togl);
/*
* Color Index mode
*/
TOGL_EXTERN unsigned long Togl_AllocColor(const Togl *togl, float red,
float green, float blue);
TOGL_EXTERN void Togl_FreeColor(const Togl *togl, unsigned long index);
TOGL_EXTERN void Togl_SetColor(const Togl *togl, unsigned long index,
float red, float green, float blue);
# if TOGL_USE_FONTS == 1
/*
* Bitmap fonts
*/
TOGL_EXTERN GLuint Togl_LoadBitmapFont(const Togl *togl, const char *fontname);
TOGL_EXTERN void Togl_UnloadBitmapFont(const Togl *togl, GLuint fontbase);
# endif
/*
* Overlay functions
*/
TOGL_EXTERN void Togl_UseLayer(Togl *togl, int layer);
TOGL_EXTERN void Togl_ShowOverlay(Togl *togl);
TOGL_EXTERN void Togl_HideOverlay(Togl *togl);
TOGL_EXTERN void Togl_PostOverlayRedisplay(Togl *togl);
TOGL_EXTERN void Togl_OverlayDisplayFunc(Togl_Callback *proc);
TOGL_EXTERN int Togl_ExistsOverlay(const Togl *togl);
TOGL_EXTERN int Togl_GetOverlayTransparentValue(const Togl *togl);
TOGL_EXTERN int Togl_IsMappedOverlay(const Togl *togl);
TOGL_EXTERN unsigned long Togl_AllocColorOverlay(const Togl *togl,
float red, float green, float blue);
TOGL_EXTERN void Togl_FreeColorOverlay(const Togl *togl, unsigned long index);
/*
* User client data
*/
TOGL_EXTERN void Togl_ClientData(ClientData clientData);
TOGL_EXTERN ClientData Togl_GetClientData(const Togl *togl);
TOGL_EXTERN void Togl_SetClientData(Togl *togl, ClientData clientData);
# ifdef TOGL_X11
/*
* X11-only commands.
* Contributed by Miguel A. De Riera Pasenau (miguel@DALILA.UPC.ES)
*/
TOGL_EXTERN Display *Togl_Display(const Togl *togl);
TOGL_EXTERN Screen *Togl_Screen(const Togl *togl);
TOGL_EXTERN int Togl_ScreenNumber(const Togl *togl);
TOGL_EXTERN Colormap Togl_Colormap(const Togl *togl);
# endif
# ifdef __sgi
/*
* SGI stereo-only commands.
* Contributed by Ben Evans (Ben.Evans@anusf.anu.edu.au)
*/
TOGL_EXTERN void Togl_OldStereoDrawBuffer(GLenum mode);
TOGL_EXTERN void Togl_OldStereoClear(GLbitfield mask);
# endif
TOGL_EXTERN void Togl_StereoFrustum(GLfloat left, GLfloat right, GLfloat bottom,
GLfloat top, GLfloat near, GLfloat far, GLfloat eyeDist,
GLfloat eyeOffset);
/*
* Generate EPS file.
* Contributed by Miguel A. De Riera Pasenau (miguel@DALILA.UPC.ES)
*/
TOGL_EXTERN int Togl_DumpToEpsFile(const Togl *togl, const char *filename,
int inColor, void (*user_redraw) (const Togl *));
# ifdef TOGL_AGL_CLASSIC
/*
* Mac-specific setup functions
*/
extern int Togl_MacInit(void);
extern int Togl_MacSetupMainInterp(Tcl_Interp *interp);
# endif
# ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
# endif
#endif
|