EyesP.h revision 26df5c7c
1
2#ifndef _EyesP_h
3#define _EyesP_h
4
5#include "Eyes.h"
6#include <X11/CoreP.h>
7#ifdef XRENDER
8#include <X11/extensions/Xrender.h>
9#endif
10#include "transform.h"
11#ifdef PRESENT
12#include <X11/Xlib-xcb.h>
13#include <xcb/xcb.h>
14#include <xcb/present.h>
15#include <xcb/xfixes.h>
16#include <xcb/damage.h>
17#endif
18
19#define SEG_BUFF_SIZE		128
20
21/* New fields for the eyes widget instance record */
22typedef struct {
23	 Pixel		pixel[PART_SHAPE];
24	 GC		gc[PART_MAX];
25/* start of graph stuff */
26	 int		backing_store;	/* backing store variety */
27	 Boolean	reverse_video;	/* swap fg and bg pixels */
28	 Boolean	shape_window;	/* use SetWindowShapeMask */
29	 int		update;		/* current timeout index */
30	 TPoint		mouse;		/* old mouse position */
31	 TPoint		pupil[2];	/* pupil position */
32	 Transform	t;
33	 Transform	maskt;
34	 XtIntervalId	interval_id;
35	 Pixmap		shape_mask;	/* window shape */
36         Boolean        has_xi2;
37#ifdef XRENDER
38	 Boolean    	render;
39	 Picture	picture;
40	 Picture	fill[PART_SHAPE];
41#endif
42#ifdef PRESENT
43         Pixmap         back_buffer;
44         xcb_damage_damage_t back_damage;
45         xcb_xfixes_region_t back_region;
46         Boolean        present;
47#endif
48	 Boolean    	distance;
49   } EyesPart;
50
51#define xt_xcb(w)       (XGetXCBConnection(XtDisplay(w)))
52
53/* Full instance record declaration */
54typedef struct _EyesRec {
55   CorePart core;
56   EyesPart eyes;
57   } EyesRec;
58
59/* New fields for the Eyes widget class record */
60typedef struct {int dummy;} EyesClassPart;
61
62/* Full class record declaration. */
63typedef struct _EyesClassRec {
64   CoreClassPart core_class;
65   EyesClassPart eyes_class;
66   } EyesClassRec;
67
68/* Class pointer. */
69extern EyesClassRec eyesClassRec;
70
71#endif /* _EyesP_h */
72