gmlTcl_Texture.h

00001 /*
00002  * gmlTcl_Texture.h --
00003  *
00004  *    Wrapping of gml_TTexture into a Tcl interpreter.
00005  *
00006  *  Copyright (c) 1995-2004 CLIPS-IMAG
00007  *
00008  *  See the file "gml_LicenseTerms.txt" for information on usage and redistribution
00009  *  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00010  */
00011 
00012 #ifndef __GMLTCL_TEXTURE__
00013 #define __GMLTCL_TEXTURE__
00014 
00015 #include "tcl.h"
00016 #include "tk.h"
00017 
00018 
00019 #include "gml/tcl/wrapper/wrapper/gmlTcl_Wrapper.h"
00020 
00021 #include "gml/base/gml_Callback.h"
00022 #include "gml/gl/gml_GL_Texture.h"
00023 
00024   #if defined(__cplusplus)
00025     extern "C" {
00026   #endif
00027 
00028 extern char                   gmlTcl_gTextureClassName[];
00029 extern gmlTcl_TWrapClass      gmlTcl_gTextureClassToken;
00030 
00031 
00032 
00033 /*
00034  * gmlTcl_gOption_WrappedTexture --
00035  *
00036  *  A "Tk_ObjCustomOption" (see "Tk_SetOptions" Tk C library man pages) for parsing
00037  *    wrapped gmlTcl_TTexture from string names.
00038  */
00039 extern Tk_ObjCustomOption     gmlTcl_gOption_WrappedTexture;
00040 
00041 
00042 
00043 /*
00044  * gmlTcl_TTexture --
00045  *
00046  *  An opaque type to manipulate texture objects.
00047  */
00048 typedef gml_TPointer          gmlTcl_TTexture;
00049 
00050 
00051 
00052 /*
00053  * gmlTcl_Texture_GetNative --
00054  *
00055  *  Returns the native "gmlGL_TTexture" object wrapped into <texture>.
00056  */
00057 gmlGL_TTexture* gmlTcl_Texture_GetNative (gmlTcl_TTexture   texture);
00058 
00059 
00060 
00061 /*
00062  * gmlTcl_Texture_Update --
00063  *
00064  *  Notify that <texture> has been modified.
00065  */
00066 void gmlTcl_Texture_Update (gmlTcl_TTexture   texture);
00067 
00068 
00069 
00070 /*
00071  * gmlTcl_Texture_RegisterCallbacks --
00072  *
00073  *  If <updateCallback> is not NULL, registers <updateCallback> to be called and
00074  *  receive <updateUserData> as a parameter whenever the texture <texture> is updated.
00075  *  If <disposeCallback> is not NULL, registers <disposeCallback> to be called and
00076  *  receive <disposeUserData> as a parameter when the texture <texture> is disposed.
00077  */
00078 int gmlTcl_Texture_RegisterCallbacks (Tcl_Interp*       interp,
00079                                             gmlTcl_TTexture   texture,
00080                                       gml_TCallback     updateCallback,
00081                                       gml_TPointer      updateUserData,
00082                                       gml_TCallback     disposeCallback,
00083                                       gml_TPointer      disposeUserData);
00084 
00085 
00086 
00087 /*
00088  * gmlTcl_Texture_DeregisterCallbacks --
00089  *
00090  *  If <updateCallback> is not NULL, removes the couple (<updateCallback>, <updateUserData>)
00091  *  from the list of callbacks registered on the "update" event.
00092  *  If <disposeCallback> is not NULL, removes the couple (<disposeCallback>, <disposeUserData>)
00093  *  from the list of callbacks registered on the "dispose" event.
00094  */
00095 void gmlTcl_Texture_DeregisterCallbacks  (gmlTcl_TTexture   texture,
00096                                           gml_TCallback     updateCallback,
00097                                           gml_TPointer      updateUserData,
00098                                           gml_TCallback     disposeCallback,
00099                                           gml_TPointer      disposeUserData);
00100 
00101 
00102 /*
00103  * gmlTcl_gWrapParseTexture --
00104  *
00105  *  Parser function for use with "gmlTcl_WrapParse".
00106  *  Stores a gmlTcl_TTexture as the result of parsing.
00107  */
00108 extern gmlTcl_TWrapParseProc* gmlTcl_gWrapParseTexture;
00109 
00110 /*
00111  * gmlTcl_gWrapParseTextureList --
00112  *
00113  *  Parser function for use with "gmlTcl_WrapParse".
00114  *  Stores a gmlTcl_TTexture array and an integer as the result of parsing.
00115  */
00116 extern gmlTcl_TWrapParseProc* gmlTcl_gWrapParseTextureList;
00117 
00118 
00119 /*
00120  * gmlTcl_TextureInit --
00121  *
00122  *  Registers the gml_TTexture class into the interpreter.
00123  */
00124 int gmlTcl_TextureInit (Tcl_Interp* interp);
00125 
00126 
00127 
00128 /*
00129  * gmlTcl_TextureExit --
00130  *
00131  *  De-registers the gml_TTexture class and all its objects from the interpreter.
00132  */
00133 void gmlTcl_TextureExit (Tcl_Interp* interp);
00134 
00135 
00136 
00137 
00138   #if defined(__cplusplus)
00139     }
00140   #endif
00141 #endif
Generated on Tue Jun 12 14:03:27 2007 for gml by Doxygen 1.5.2.