gml_Pixmap.h

00001 /**
00002  * gml_Pixmap.h --
00003  *
00004  *    Manage mapping between gml_TBitmap and X Pixmaps.
00005  *
00006  *  Copyright (c) 1996-2003 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 #ifndef __GML_PIXMAP__
00012 #define __GML_PIXMAP__
00013 
00014 #include "gml/image/gml_Drawable.h"
00015 #include "gml/image/gml_Bitmap.h"
00016 
00017 
00018 
00019 /**
00020  * gml_TPixmap --
00021  *
00022  *  A pointer to a native pixmap identifier.
00023  *  On all platforms, refers to a Tk pseuso X Bitmap.
00024  */
00025 typedef void* gml_TPixmap;
00026 
00027 
00028 /**
00029  * gml_GetPixmap --
00030  *
00031  *  See Tk_GetPixmap(3) or XCreatePixmap(3X11) man page.
00032  *  Creates a pixmap and a gml_TBitmap structure so that it describes the pixmap
00033  *  and points to its pixel buffer.
00034  *
00035  *  Note that the buffer of the returned bitmap should *not* be freed by the caller.
00036  *
00037  *  *** platform specific implementation ***
00038  */
00039 GML_EXTERN_C
00040 gml_TPixmap gml_GetPixmap (gml_TDisplay display, gml_TDrawable d, int width, int height, int depth, gml_TBitmap* bm);
00041 
00042 
00043 /**
00044  * gml_FreePixmap --
00045  *
00046  *  Frees a pixmap allocated by "gml_GetPixmap" and the associated bitmap buffer.
00047  *
00048  *  *** platform specific implementation ***
00049  */
00050 GML_EXTERN_C
00051 void gml_FreePixmap (gml_TDisplay display, gml_TPixmap pm);
00052 
00053 
00054 /**
00055  * gml_SyncPixmap --
00056  *
00057  *  Make sure that the data in the gml_TBitmap structure is in sync with the
00058  *  corresponding Pixmap.
00059  *
00060  *  It is not an error to pass a Pixmap not previously used in a
00061  *  gml_GetPixmap call.
00062  *
00063  *  *** platform specific implementation ***
00064  */
00065 GML_EXTERN_C
00066 void gml_SyncPixmap (gml_TDisplay display, gml_TPixmap pm);
00067 
00068 #endif
Generated on Tue Jun 12 14:03:27 2007 for gml by Doxygen 1.5.2.