File: gifx.h

package info (click to toggle)
xwrits 2.6.1
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 400 kB
  • ctags: 523
  • sloc: ansic: 3,377; sh: 152; makefile: 114
file content (61 lines) | stat: -rw-r--r-- 1,624 bytes parent folder | download
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
#ifndef GIFX_H
#define GIFX_H
#ifdef __cplusplus
extern "C" {
#endif

/* gifx.h - Functions to turn GIFs in memory into X Pixmaps.
   Copyright (C) 1997 Eddie Kohler, eddietwo@lcs.mit.edu
   This file is part of the GIF library.

   The GIF library is free software*; you can copy, distribute, or alter it at
   will, as long as this notice is kept intact and this source code is made
   available. Hypo(pa)thetical commerical developers are asked to write the
   author a note, which might make his day. There is no warranty, express or
   implied.

   *The LZW compression method used by GIFs is patented. Unisys, the patent
   holder, allows the compression algorithm to be used without a license in
   software distributed at no cost to the user. */

#include "gif.h"
#include <X11/Xlib.h>


typedef struct Gif_XContext Gif_XContext;

struct Gif_XContext {
  
  Display *display;
  Drawable drawable;
  Visual *visual;
  u_int16_t depth;
  u_int16_t ncolormap;
  Colormap colormap;
  
  u_int16_t nclosest;
  Gif_Color *closest;
  
  unsigned long transparent_value;
  int refcount;
  
};


Gif_XContext *		Gif_NewXContext(Display *, Window);
Gif_XContext *		Gif_NewXContextFromVisual(Display *, int screen_number,
					Visual *, int depth, Colormap);
void			Gif_DeleteXContext(Gif_XContext *);

Pixmap			Gif_XImage(Gif_XContext *, Gif_Stream *, Gif_Image *);
Pixmap			Gif_XImageColormap(Gif_XContext *, Gif_Stream *,
					   Gif_Colormap *, Gif_Image *);
Pixmap			Gif_XMask(Gif_XContext *, Gif_Stream *, Gif_Image *);

void			Gif_XPreallocateColors(Gif_XContext *, Gif_Colormap *);


#ifdef __cplusplus
}
#endif
#endif