gmlTcl_GLCanvasDecls.h

00001 /*
00002  *  gmlGLCanvasDecls.h --
00003  *  
00004  *      Declares the function that were initially exported by Tk.
00005  *      These functions are renamed to "gmlGL_*" in order to create
00006  *      a "gmlCanvas" more standalone.
00007  *  
00008  *    Copyright (c) 2002 CLIPS-IMAG
00009  *  
00010  *    See the file "gml_LicenseTerms.txt" for information on usage and redistribution
00011  *    of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00012  *  
00013  *    Created on August 19, 2002 (FB).
00014  */
00015 
00016 #ifndef __GMLGLCANVASDECLS__
00017 #define __GMLGLCANVASDECLS__
00018 
00019 #include <math.h>
00020 #include <limits.h>
00021 #include <string.h>
00022 #include <stdlib.h>
00023 #include <ctype.h>
00024 #include <time.h>
00025 
00026 #include <X11/Xlib.h>
00027 #include <X11/cursorfont.h>
00028 #include <X11/keysym.h>
00029 #include <X11/Xatom.h>
00030 #include <X11/Xfuncproto.h>
00031 #include <X11/Xutil.h>
00032 
00033 #include "default.h"
00034 
00035 #define UCHAR(c) ((unsigned char) (c))
00036 
00037 
00038 
00039 
00040 extern int gmlGL_CanvasObjCmd (ClientData clientData,
00041                                 Tcl_Interp *interp,
00042                                 int argc,
00043                                 Tcl_Obj *argv[]);
00044 
00045 /* in gmlTcl_GLCanvas_<platform>.cc */
00046 
00047 void gmlTcl_GLCanvas_DrawHighlightBorder (
00048         Tk_Window tkwin, 
00049         GC fgGC, 
00050         GC bgGC, 
00051         int highlightWidth,
00052         Drawable drawable);
00053 
00054 /* in gmlTcl_GLCanvUtil.cc */
00055 
00056 void
00057 gmlGL_DrawInsetFocusHighlight (Tk_Window tkwin,
00058     GC gc,
00059     int width,
00060     Drawable drawable,
00061     int padding);
00062 
00063 /* int tkDecls.h */
00064 
00065 void    gmlGL_CanvasDrawableCoords _ANSI_ARGS_((
00066        Tk_Canvas canvas, double x, double y, 
00067        short * drawableXPtr, short * drawableYPtr));
00068 
00069 void   gmlGL_CanvasEventuallyRedraw _ANSI_ARGS_((
00070        Tk_Canvas canvas, int x1, int y1, int x2, 
00071        int y2));
00072 
00073 int    gmlGL_CanvasGetCoord _ANSI_ARGS_((Tcl_Interp * interp, 
00074         Tk_Canvas canvas, char * str, 
00075        double * doublePtr));
00076 
00077 Tk_CanvasTextInfo * gmlGL_CanvasGetTextInfo _ANSI_ARGS_((
00078        Tk_Canvas canvas));
00079 
00080 int    gmlGL_CanvasPsBitmap _ANSI_ARGS_((Tcl_Interp * interp, 
00081         Tk_Canvas canvas, Pixmap bitmap, int x, 
00082        int y, int width, int height));
00083 
00084 int    gmlGL_CanvasPsColor _ANSI_ARGS_((Tcl_Interp * interp, 
00085        Tk_Canvas canvas, XColor * colorPtr));
00086 
00087 int   gmlGL_CanvasPsFont _ANSI_ARGS_((Tcl_Interp * interp, 
00088         Tk_Canvas canvas, Tk_Font font));
00089 
00090 void   gmlGL_CanvasPsPath _ANSI_ARGS_((Tcl_Interp * interp, 
00091         Tk_Canvas canvas, double * coordPtr, 
00092         int numPoints));
00093 
00094 int   gmlGL_CanvasPsStipple _ANSI_ARGS_((Tcl_Interp * interp, 
00095        Tk_Canvas canvas, Pixmap bitmap));
00096 
00097 double    gmlGL_CanvasPsY _ANSI_ARGS_((Tk_Canvas canvas, double y));
00098 
00099 void    gmlGL_CanvasSetStippleOrigin _ANSI_ARGS_((
00100        Tk_Canvas canvas, GC gc));
00101 
00102 int   gmlGL_CanvasTagsParseProc _ANSI_ARGS_((
00103         ClientData clientData, Tcl_Interp * interp, 
00104        Tk_Window tkwin, char * value, 
00105         char * widgRec, int offset));
00106 
00107 char *   gmlGL_CanvasTagsPrintProc _ANSI_ARGS_((
00108         ClientData clientData, Tk_Window tkwin, 
00109        char * widgRec, int offset, 
00110        Tcl_FreeProc ** freeProcPtr));
00111 
00112 Tk_Window gmlGL_CanvasTkwin _ANSI_ARGS_((Tk_Canvas canvas));
00113 
00114 void    gmlGL_CanvasWindowCoords _ANSI_ARGS_((Tk_Canvas canvas, 
00115        double x, double y, short * screenXPtr, 
00116        short * screenYPtr));
00117 
00118 int    gmlGL_CanvasPsOutline _ANSI_ARGS_((Tk_Canvas canvas, 
00119         Tk_Item * item, Tk_Outline * outline));
00120 
00121 int    gmlGL_CanvasGetCoordFromObj _ANSI_ARGS_((
00122         Tcl_Interp * interp, Tk_Canvas canvas, 
00123         Tcl_Obj * obj, double * doublePtr));
00124 
00125 void    gmlGL_CanvasSetOffset _ANSI_ARGS_((Tk_Canvas canvas, 
00126         GC gc, Tk_TSOffset * offset));
00127 
00128 int   gmlGL_PostscriptBitmap _ANSI_ARGS_((Tcl_Interp * interp, 
00129         Tk_Window tkwin, Tk_PostscriptInfo psInfo, 
00130         Pixmap bitmap, int startX, int startY, 
00131         int width, int height));
00132 
00133 int   gmlGL_PostscriptColor _ANSI_ARGS_((Tcl_Interp * interp, 
00134        Tk_PostscriptInfo psInfo, XColor * colorPtr));
00135 
00136 int   gmlGL_PostscriptFont _ANSI_ARGS_((Tcl_Interp * interp, 
00137         Tk_PostscriptInfo psInfo, Tk_Font font));
00138 
00139 void   gmlGL_PostscriptPath _ANSI_ARGS_((Tcl_Interp * interp, 
00140         Tk_PostscriptInfo psInfo, double * coordPtr, 
00141         int numPoints));
00142 
00143 int   gmlGL_PostscriptStipple _ANSI_ARGS_((
00144         Tcl_Interp * interp, Tk_Window tkwin, 
00145        Tk_PostscriptInfo psInfo, Pixmap bitmap));
00146 
00147 double    gmlGL_PostscriptY _ANSI_ARGS_((double y, 
00148         Tk_PostscriptInfo psInfo));
00149 
00150 int    gmlGL_PostscriptPhoto _ANSI_ARGS_((Tcl_Interp * interp, 
00151        Tk_PhotoImageBlock * blockPtr, 
00152         Tk_PostscriptInfo psInfo, int width, 
00153         int height));
00154 
00155 void   gmlGL_CreateSmoothMethod _ANSI_ARGS_((
00156        Tcl_Interp * interp, 
00157         Tk_SmoothMethod * method));
00158 
00159 int    gmlGL_GetDash _ANSI_ARGS_((Tcl_Interp * interp, 
00160        char * value, Tk_Dash * dash));
00161 
00162 void   gmlGL_CreateOutline _ANSI_ARGS_((Tk_Outline * outline));
00163 
00164 void    gmlGL_DeleteOutline _ANSI_ARGS_((Display * display, 
00165        Tk_Outline * outline));
00166 
00167 int    gmlGL_ConfigOutlineGC _ANSI_ARGS_((XGCValues * gcValues, 
00168         Tk_Canvas canvas, Tk_Item * item, 
00169        Tk_Outline * outline));
00170 
00171 int    gmlGL_ChangeOutlineGC _ANSI_ARGS_((Tk_Canvas canvas, 
00172         Tk_Item * item, Tk_Outline * outline));
00173 
00174 int    gmlGL_ResetOutlineGC _ANSI_ARGS_((Tk_Canvas canvas, 
00175        Tk_Item * item, Tk_Outline * outline));
00176 
00177 /* in tkIntDecls.h */
00178 
00179 void    gmlGLFillPolygon _ANSI_ARGS_((Tk_Canvas canvas, 
00180        double * coordPtr, int numPoints, 
00181        Display * display, Drawable drawable, GC gc, 
00182         GC outlineGC));
00183 
00184 void   gmlGLBezierPoints _ANSI_ARGS_((double control[], 
00185         int numSteps, double * coordPtr));
00186 
00187 void    gmlGLBezierScreenPoints _ANSI_ARGS_((Tk_Canvas canvas, 
00188         double control[], int numSteps, 
00189        XPoint * xPointPtr));
00190 
00191 void   gmlGLGetButtPoints _ANSI_ARGS_((double p1[], 
00192         double p2[], double width, int project, 
00193        double m1[], double m2[]));
00194 
00195 int    gmlGLGetMiterPoints _ANSI_ARGS_((double p1[], 
00196        double p2[], double p3[], double width, 
00197        double m1[], double m2[]));
00198 
00199 void   gmlGLIncludePoint _ANSI_ARGS_((Tk_Item * itemPtr, 
00200        double * pointPtr));
00201 
00202 int   gmlGLLineToArea _ANSI_ARGS_((double end1Ptr[], 
00203         double end2Ptr[], double rectPtr[]));
00204 
00205 double   gmlGLLineToPoint _ANSI_ARGS_((double end1Ptr[], 
00206        double end2Ptr[], double pointPtr[]));
00207 
00208 int   gmlGLMakeBezierCurve _ANSI_ARGS_((Tk_Canvas canvas, 
00209        double * pointPtr, int numPoints, 
00210        int numSteps, XPoint xPoints[], 
00211        double dblPoints[]));
00212 
00213 void   gmlGLMakeBezierPostscript _ANSI_ARGS_((
00214         Tcl_Interp * interp, Tk_Canvas canvas, 
00215         double * pointPtr, int numPoints));
00216 
00217 int    gmlGLOvalToArea _ANSI_ARGS_((double * ovalPtr, 
00218         double * rectPtr));
00219 
00220 double   gmlGLOvalToPoint _ANSI_ARGS_((double ovalPtr[], 
00221        double width, int filled, double pointPtr[]));
00222 
00223 int   gmlGLPolygonToArea _ANSI_ARGS_((double * polyPtr, 
00224        int numPoints, double * rectPtr));
00225 
00226 double    gmlGLPolygonToPoint _ANSI_ARGS_((double * polyPtr, 
00227         int numPoints, double * pointPtr));
00228 
00229 int    gmlGLThickPolyLineToArea _ANSI_ARGS_((double * coordPtr, 
00230         int numPoints, double width, int capStyle, 
00231         int joinStyle, double * rectPtr));
00232        
00233 /* in tkInt.h */
00234 
00235 EXTERN void    TkpDrawHighlightBorder _ANSI_ARGS_((Tk_Window tkwin, 
00236         GC fgGC, GC bgGC, int highlightWidth, 
00237        Drawable drawable));
00238 
00239 
00240 int    gmlGLCanvasDashParseProc _ANSI_ARGS_((
00241          ClientData clientData, Tcl_Interp *interp,
00242          Tk_Window tkwin, char *value, char *widgRec,
00243          int offset));
00244 
00245 char *   gmlGLCanvasDashPrintProc _ANSI_ARGS_((
00246          ClientData clientData, Tk_Window tkwin,
00247           char *widgRec, int offset,
00248          Tcl_FreeProc **freeProcPtr));
00249 
00250 int    gmlGLGetDoublePixels _ANSI_ARGS_((Tcl_Interp *interp,
00251           Tk_Window tkwin, char *string,
00252          double *doublePtr));
00253 
00254 int   gmlGLPostscriptImage _ANSI_ARGS_((Tcl_Interp *interp,
00255           Tk_Window tkwin, Tk_PostscriptInfo psInfo,
00256          XImage *ximage, int x, int y, int width,
00257          int height));
00258 
00259 int    gmlGLSmoothParseProc _ANSI_ARGS_((ClientData clientData,
00260          Tcl_Interp *interp, Tk_Window tkwin,
00261          char *value, char *recordPtr, int offset));
00262 
00263 char *   gmlGLSmoothPrintProc _ANSI_ARGS_((ClientData clientData,
00264          Tk_Window tkwin, char *recordPtr, int offset,
00265           Tcl_FreeProc **freeProcPtr));
00266 
00267 int    gmlGLOffsetParseProc _ANSI_ARGS_((
00268          ClientData clientData, Tcl_Interp *interp,
00269          Tk_Window tkwin, char *value, char *widgRec,
00270          int offset));
00271 
00272 char *   gmlGLOffsetPrintProc _ANSI_ARGS_((
00273          ClientData clientData, Tk_Window tkwin,
00274           char *widgRec, int offset,
00275          Tcl_FreeProc **freeProcPtr));
00276 
00277 int    gmlGLPixelParseProc _ANSI_ARGS_((
00278           ClientData clientData, Tcl_Interp *interp,
00279          Tk_Window tkwin, char *value, char *widgRec,
00280          int offset));
00281 
00282 char *   gmlGLPixelPrintProc _ANSI_ARGS_((
00283           ClientData clientData, Tk_Window tkwin,
00284           char *widgRec, int offset,
00285          Tcl_FreeProc **freeProcPtr));
00286 
00287 int    gmlGLStateParseProc _ANSI_ARGS_((
00288           ClientData clientData, Tcl_Interp *interp,
00289          Tk_Window tkwin, char *value,
00290           char *widgRec, int offset));
00291 
00292 char *    gmlGLStatePrintProc _ANSI_ARGS_((
00293           ClientData clientData, Tk_Window tkwin,
00294           char *widgRec, int offset,
00295          Tcl_FreeProc **freeProcPtr));
00296 
00297 
00298 #endif
Generated on Tue Jun 12 14:03:27 2007 for gml by Doxygen 1.5.2.