aboutsummaryrefslogtreecommitdiff
path: root/generic/Image.h
diff options
context:
space:
mode:
authorlecoanet2002-05-16 08:34:17 +0000
committerlecoanet2002-05-16 08:34:17 +0000
commit957c78b25578c10753d593842504784988f4c56f (patch)
tree064e70afd090548a2b50ada1e8d03e364da4586d /generic/Image.h
parentd7c5b765038579619622377bb7a8bed709744825 (diff)
downloadtkzinc-957c78b25578c10753d593842504784988f4c56f.zip
tkzinc-957c78b25578c10753d593842504784988f4c56f.tar.gz
tkzinc-957c78b25578c10753d593842504784988f4c56f.tar.bz2
tkzinc-957c78b25578c10753d593842504784988f4c56f.tar.xz
Adaptation des prototypes suite � la re�criture du module.
Diffstat (limited to 'generic/Image.h')
-rw-r--r--generic/Image.h110
1 files changed, 50 insertions, 60 deletions
diff --git a/generic/Image.h b/generic/Image.h
index 4dfa20e..b234b5a 100644
--- a/generic/Image.h
+++ b/generic/Image.h
@@ -32,79 +32,69 @@
#ifdef GLX
#include <GL/gl.h>
-#include "Draw.h"
#endif
#include "Types.h"
+struct _WidgetInfo;
+
+
+typedef void *ZnImage;
+
+#define ZnGetBitmapPixel(bits, stride, x, y)\
+ (((bits)[(y)*(stride)+((x)>>3)]<<((x)&7))&0x80)
-typedef struct {
+ZnImage
+ZnGetImage(struct _WidgetInfo *wi, char *image_name);
+ZnImage
+ZnGetImageByValue(ZnImage image);
+ZnImage
+ZnGetBitmap(struct _WidgetInfo *wi, char *bitmap_name);
+void
+ZnFreeImage(ZnImage image);
+char *
+ZnNameOfImage(ZnImage image);
+void
+ZnSizeOfImage(ZnImage image, int *width, int *height);
+char *
+ZnImagePattern(ZnImage image, int *stride);
+XImage *
+ZnImageMask(ZnImage image);
+ZnBool
+ZnImageIsBitmap(ZnImage image);
+Pixmap
+ZnImagePixmap(ZnImage image, Pixmap *mask_pmap);
#ifdef GLX
- unsigned char *t_bits; /* Should be kept in sync with same part of */
- GLuint texture; /* ImageBits */
- ZnReal t;
- ZnReal s;
+GLuint
+ZnImageTex(ZnImage image, ZnReal *t, ZnReal *s);
#endif
- int width;
- int height;
- unsigned char *pixels;
- int rowstride;
-} BitmapBits;
-typedef struct _ImageBits {
#ifdef GLX
- unsigned char *t_bits; /* Should be kept in sync with same part of */
- GLuint texture; /* BitmapBits */
- ZnReal t;
- ZnReal s;
-#endif
- int width;
- int height;
- XImage *pixels;
- XImage *mask;
- BitmapBits *b_bits;
- struct _ImagePixmap *pixmaps;
-} ImageBits;
+typedef struct _ZnTexGlyphVertexInfo {
+ GLfloat t0[2];
+ GLshort v0[2];
+ GLfloat t1[2];
+ GLshort v1[2];
+ GLfloat t2[2];
+ GLshort v2[2];
+ GLfloat t3[2];
+ GLshort v3[2];
+ GLfloat advance;
+} ZnTexGVI;
-struct _WidgetInfo;
-int
-ValidateImage(struct _WidgetInfo */* wi */,
- void */* item_or_field */,
- char */* image_name */,
- Tk_ImageChangedProc */* image_proc */,
- Tk_Image */* image_ref */,
- char */* msg */);
+typedef void *ZnTexFontInfo;
-ImageBits *
-GetImageBits(ZnWindow /* win */,
- char */* image_name */,
- ZnImage /* image */);
-Pixmap
-GetImagePixmap(ZnWindow /* win */,
- char */* image_name */,
- ZnImage /* image */,
- Pixmap *mask_pmap);
+ZnTexFontInfo
+ZnGetTexFont(struct _WidgetInfo *wi, ZnFont font);
void
-InvalidateImage(char */* image_name */);
-BitmapBits *
-GetBitmapMask(Display */* dpy */,
- Pixmap /* bitmap */);
-
-#define GetBitmapPixel(bbits, x, y) (((bbits)->pixels[(y)*(bbits)->rowstride+((x)>>3)]<<((x)&7))&0x80)
-
-#ifdef GLX
-TexFont *
-GetTexFont(ZnWindow /* win */,
- ZnFont /* font */);
-
-ImageBits *
-GetImageTexture(ZnWindow /* win */,
- char */* image_name */,
- ZnImage /* image */);
-BitmapBits *
-GetBitmapTexture(Display */* dpy */,
- Pixmap /* bitmap */);
+ZnFreeTexFont(ZnTexFontInfo tfi);
+ZnBool
+ZnCharInTexFont(ZnTexFontInfo tfi, int c);
+ZnTexGVI *
+ZnTexFontGVI(ZnTexFontInfo tfi, int c);
+GLuint
+ZnTexFontTex(ZnTexFontInfo tfi);
#endif
#endif /* _Image_h */