1a1d141d5Smrg 2a1d141d5Smrg#ifndef _EyesP_h 3a1d141d5Smrg#define _EyesP_h 4a1d141d5Smrg 5a1d141d5Smrg#include "Eyes.h" 6a1d141d5Smrg#include <X11/CoreP.h> 72ddb6cf1Smrg#ifdef XRENDER 82ddb6cf1Smrg#include <X11/extensions/Xrender.h> 92ddb6cf1Smrg#endif 10a1d141d5Smrg#include "transform.h" 1126df5c7cSmrg#ifdef PRESENT 1226df5c7cSmrg#include <X11/Xlib-xcb.h> 1326df5c7cSmrg#include <xcb/xcb.h> 1426df5c7cSmrg#include <xcb/present.h> 1526df5c7cSmrg#include <xcb/xfixes.h> 1626df5c7cSmrg#include <xcb/damage.h> 1726df5c7cSmrg#endif 18a1d141d5Smrg 19a1d141d5Smrg#define SEG_BUFF_SIZE 128 20a1d141d5Smrg 213bee1c92Smrgtypedef struct { 223bee1c92Smrg // X offset 233bee1c92Smrg double x; 243bee1c92Smrg // Y offset 253bee1c92Smrg double y; 263bee1c92Smrg} EyeLayout; 273bee1c92Smrg 283bee1c92Smrgtypedef struct { 293bee1c92Smrg EyeLayout *eyes; 303bee1c92Smrg int count; 313bee1c92Smrg 323bee1c92Smrg double w_min_x; 333bee1c92Smrg double w_max_x; 343bee1c92Smrg double w_min_y; 353bee1c92Smrgdouble w_max_y; 363bee1c92Smrg} EyeConfiguration; 373bee1c92Smrg 38a1d141d5Smrg/* New fields for the eyes widget instance record */ 39a1d141d5Smrgtypedef struct { 402ddb6cf1Smrg Pixel pixel[PART_SHAPE]; 412ddb6cf1Smrg GC gc[PART_MAX]; 42a1d141d5Smrg/* start of graph stuff */ 43a1d141d5Smrg int backing_store; /* backing store variety */ 44a1d141d5Smrg Boolean reverse_video; /* swap fg and bg pixels */ 45a1d141d5Smrg Boolean shape_window; /* use SetWindowShapeMask */ 46a1d141d5Smrg int update; /* current timeout index */ 47a1d141d5Smrg TPoint mouse; /* old mouse position */ 483bee1c92Smrg Boolean biblically_accurate; 493bee1c92Smrg EyeConfiguration *configuration; 503bee1c92Smrg TPoint *pupils; 51a1d141d5Smrg Transform t; 52a1d141d5Smrg Transform maskt; 53a1d141d5Smrg XtIntervalId interval_id; 54a1d141d5Smrg Pixmap shape_mask; /* window shape */ 5526df5c7cSmrg Boolean has_xi2; 562ddb6cf1Smrg#ifdef XRENDER 572ddb6cf1Smrg Boolean render; 582ddb6cf1Smrg Picture picture; 592ddb6cf1Smrg Picture fill[PART_SHAPE]; 6026df5c7cSmrg#endif 6126df5c7cSmrg#ifdef PRESENT 6226df5c7cSmrg Pixmap back_buffer; 6326df5c7cSmrg xcb_damage_damage_t back_damage; 6426df5c7cSmrg xcb_xfixes_region_t back_region; 6526df5c7cSmrg Boolean present; 662ddb6cf1Smrg#endif 672ddb6cf1Smrg Boolean distance; 68a1d141d5Smrg } EyesPart; 69a1d141d5Smrg 7026df5c7cSmrg#define xt_xcb(w) (XGetXCBConnection(XtDisplay(w))) 7126df5c7cSmrg 72a1d141d5Smrg/* Full instance record declaration */ 73a1d141d5Smrgtypedef struct _EyesRec { 74a1d141d5Smrg CorePart core; 75a1d141d5Smrg EyesPart eyes; 76a1d141d5Smrg } EyesRec; 77a1d141d5Smrg 78a1d141d5Smrg/* New fields for the Eyes widget class record */ 79a1d141d5Smrgtypedef struct {int dummy;} EyesClassPart; 80a1d141d5Smrg 81a1d141d5Smrg/* Full class record declaration. */ 82a1d141d5Smrgtypedef struct _EyesClassRec { 83a1d141d5Smrg CoreClassPart core_class; 84a1d141d5Smrg EyesClassPart eyes_class; 85a1d141d5Smrg } EyesClassRec; 86a1d141d5Smrg 87a1d141d5Smrg/* Class pointer. */ 88a1d141d5Smrgextern EyesClassRec eyesClassRec; 89a1d141d5Smrg 90a1d141d5Smrg#endif /* _EyesP_h */ 91