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 21typedef struct { 22 // X offset 23 double x; 24 // Y offset 25 double y; 26} EyeLayout; 27 28typedef struct { 29 EyeLayout *eyes; 30 int count; 31 32 double w_min_x; 33 double w_max_x; 34 double w_min_y; 35double w_max_y; 36} EyeConfiguration; 37 38/* New fields for the eyes widget instance record */ 39typedef struct { 40 Pixel pixel[PART_SHAPE]; 41 GC gc[PART_MAX]; 42/* start of graph stuff */ 43 int backing_store; /* backing store variety */ 44 Boolean reverse_video; /* swap fg and bg pixels */ 45 Boolean shape_window; /* use SetWindowShapeMask */ 46 int update; /* current timeout index */ 47 TPoint mouse; /* old mouse position */ 48 Boolean biblically_accurate; 49 EyeConfiguration *configuration; 50 TPoint *pupils; 51 Transform t; 52 Transform maskt; 53 XtIntervalId interval_id; 54 Pixmap shape_mask; /* window shape */ 55 Boolean has_xi2; 56#ifdef XRENDER 57 Boolean render; 58 Picture picture; 59 Picture fill[PART_SHAPE]; 60#endif 61#ifdef PRESENT 62 Pixmap back_buffer; 63 xcb_damage_damage_t back_damage; 64 xcb_xfixes_region_t back_region; 65 Boolean present; 66#endif 67 Boolean distance; 68 } EyesPart; 69 70#define xt_xcb(w) (XGetXCBConnection(XtDisplay(w))) 71 72/* Full instance record declaration */ 73typedef struct _EyesRec { 74 CorePart core; 75 EyesPart eyes; 76 } EyesRec; 77 78/* New fields for the Eyes widget class record */ 79typedef struct {int dummy;} EyesClassPart; 80 81/* Full class record declaration. */ 82typedef struct _EyesClassRec { 83 CoreClassPart core_class; 84 EyesClassPart eyes_class; 85 } EyesClassRec; 86 87/* Class pointer. */ 88extern EyesClassRec eyesClassRec; 89 90#endif /* _EyesP_h */ 91