/* * GRacer * * Copyright (C) 1999 Takashi Matsuda * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __GRACER_GR_H__ #define __GRACER_GR_H__ #include #include #include #include "tcldefs.h" #ifdef __cplusplus extern "C" { #endif #if 0 } #endif typedef struct { char *name; GLenum val; } glWordList; typedef struct { char *name; void *val; } glutWordList; typedef struct TclGlutCallback { Tcl_Interp *interp; Tcl_Obj *obj; int value; } TclGlutCallback; int Glbind_Init (Tcl_Interp *interp); int Glbind_SafeInit (Tcl_Interp *interp); GLenum GetGLEnum (Tcl_Obj *CONST obj); void* GetGlutEnum (Tcl_Obj *CONST obj); void tcl_PutCache (char *key, ClientData data); ClientData tcl_GetCache (char *key); void tcl_DisplayFunc (void); void tcl_ReshapeFunc (int width, int height); void tcl_KeyboardFunc (unsigned char key, int x, int y); void tcl_KeyboardUpFunc (unsigned char key, int x, int y); void tcl_SpecialFunc (int key, int x, int y); void tcl_SpecialUpFunc (int key, int x, int y); void tcl_MouseFunc (int button, int state, int x, int y); void tcl_MotionFunc (int x, int y); void tcl_PassiveMotionFunc (int x, int y); void tcl_EntryFunc (int state); void tcl_VisibilityFunc (int state); void tcl_TimerFunc (int value); void tcl_IdleFunc (void); void tcl_MenuStateFunc (int state); void tcl_TabletMotionFunc (int x, int y); void tcl_TabletButtonFunc (int button, int state, int x, int y); void tcl_MenuStatusFunc (int status, int x, int y); void tcl_WindowStatusFunc (int state); void tcl_GrSceneLoadTexture (Tcl_Interp *interp, char *baseurl, GrScene *scene); GrScene *tcl_GetGrScene (Tcl_Interp *interp, char *name, char *baseurl); FILE* gr_open_file (char *url, char *mode); char* gr_get_fullurl (char *url, char *baseurl); extern Tcl_Obj *obj_x; extern Tcl_Obj *obj_y; extern Tcl_Obj *obj_width; extern Tcl_Obj *obj_height; extern Tcl_Obj *obj_state; extern Tcl_Obj *obj_status; extern Tcl_Obj *obj_key; extern Tcl_Obj *obj_button; extern Tcl_Obj *obj_value; #ifdef __cplusplus } #endif #endif /* __GRACER_GR_H__ */