1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>XmHTML Programmers Manual: XmImage Structure</TITLE>
<META HTTP-EQUIV="Keywords" CONTENT="XmHTML, HTML, Motif, Widget, eXode, XntHelp, Linux">
<META HTTP-EQUIV="Reply-to" CONTENT="ripley@xs4all.nl">
<META HTTP-EQUIV="Description"
CONTENT = "XmImage structure - XmImage Image definition.">
<META NAME="Author" CONTENT="Koen D'Hondt">
<META NAME="Copyright" content="1995-1997 by Ripley Software Development">
<META NAME="Source" content="$Source$">
<META NAME="Revision" content="$Revision$">
<META NAME="Font" content="helvetica">
<link rev="made" href="mailto:ripley@xs4all.nl">
<link rel="home" href="index.html">
<link rel="previous" href="ImInfo.html">
<link rel="next" href="HTObject.html">
<link rel="up" href="../man.html">
<link rel="copyright" href="copyrights.html">
</HEAD>
<BODY BGCOLOR="#FFFFFF" text="#000000">
<h3><font face="helvetica,arial">Name</font></h3>
<blockquote>
XmImage structure - XmImage Image definition.
</blockquote>
<h3><font face="helvetica,arial">Description</font></h3>
<blockquote>
A XmImage structure is returned by the XmImageCreate and
XmImageCreateFromInfo convenience routines.
<p>
See XmImageInfo(3X) for more information about the dispose field in the
XmImageFrame structure.
<p>
The pixmap and clip fields in the XmImage structure can be used
directly in calls to XCopyArea(3X).
</blockquote>
<h3><font face="helvetica,arial">Structures</font></h3>
<pre>
/* XmImage definition */
typedef struct{
String file; /* originating file */
unsigned char type; /* image type, see XmHTMLImageGetType */
Pixmap pixmap; /* actual image */
Pixmap clip; /* for transparant pixmaps */
unsigned int options; /* image option bits */
int width; /* current image width, in pixels */
int height; /* current image height, in pixels */
int ncolors; /* no of colors in this image */
int scolors; /* specified no of colors */
int swidth; /* image width as read from image */
int sheight; /* image height as read from image */
int depth; /* depth of this image */
int npixels; /* no of really allocated pixels */
GC gc; /* graphics context for rendering */
/* animation data */
XmImageFrame *frames; /* array of animation frames */
int nframes; /* no of frames following */
int current_frame; /* current frame count */
int current_loop; /* current loop count */
int loop_count; /* maximum loop count */
XtIntervalId proc_id; /* timer id for animations */
Widget w; /* image owner */
XtAppContext context; /* Application context for animations */
/* private data */
struct _XColorContext *xcc; /* a lot of visual info */
}XmImage;
/* XmImageFrame: animation frame definition */
typedef struct{
int x; /* x position in logical screen */
int y; /* y position in logical screen */
int w; /* width of this particular frame */
int h; /* height of this particular frame */
int timeout; /* timeout for the next frame */
unsigned char dispose; /* previous frame disposal method */
Pixmap pixmap; /* actual image */
Pixmap clip; /* image clipmask */
Pixmap prev_state; /* previous screen state */
}XmImageFrame;
/*
* XmImage options bits (defined in XmHTMLP.h).
* There are more options defined but they are private to XmHTML.
* The IMG_ISANIM and IMG_HASSTATE bits may not be touched when
* they have been set.
*/
#define IMG_ISANIM (1L<<4) /* is an animation */
#define IMG_FRAMEREFRESH (1L<<5) /* animation is running */
#define IMG_HASSTATE (1L<<7) /* current state pixmap present */
/* XmImage configuration flags */
#define ImageFSDither (1L<<1) /* Floyd-Steinberg error correction */
#define ImageCreateGC (1L<<2) /* create gc for image */
#define ImageWorkSpace (1L<<3) /* create animation workspace */
#define ImageClipmask (1L<<4) /* create clipmask */
#define ImageBackground (1L<<5) /* substitute background pixel */
#define ImageQuantize (1L<<6) /* quantize image */
#define ImageMaxColors (1L<<7) /* sets maximum colors */
#define ImageGifDecodeProc (1L<<8) /* gif lzw decoder function */
#define ImageGifzCmd (1L<<9) /* gif lzw uncompress command */
#define ImageFrameSelect (1L<<10)/* frame selection */
#define ImageScreenGamma (1L<<11)/* gamma correction. JPEG/ PNG only */
/* XmImage configuration */
typedef struct{
unsigned long flags; /* XmImage configuration flags, */
int ncolors; /* desired number of colors */
int which_frames; /* animation frames selection flag */
int bg_color; /* transparent pixel */
String z_cmd; /* gif uncompress command */
XmImageGifProc gif_proc; /* external gif decoder */
float gamma; /* gamma correction. JPEG/PNG only */
}XmImageConfig;
</pre>
<h3><font face="helvetica,arial">See Also</font></h3>
<blockquote>
XmHTML(3X), XmImageCreate(3X), XmImageCreateFromInfo(3X),
XmImageDestroy(3X), XmImageInfo(3X), XmHTMLGIFStream(3X)
</blockquote>
<hr noshade size="2" width="25%">
<i><font size="-1">
XmHTML, October 7, 1997
</font></i>
</body>
</html>
|