diff options
author | Serge Bazanski <q3k@q3k.org> | 2023-05-28 14:21:56 +0200 |
---|---|---|
committer | Serge Bazanski <q3k@q3k.org> | 2023-05-28 14:28:58 +0200 |
commit | 6f6c975d2cdc1f615f83576c9d1f828e1cdabda3 (patch) | |
tree | fa3f59c025ea60b640416b9432a3d10f81048235 /EyesP.h | |
parent | f30ef4e0f3e464f6304bdc85d28ebec0c2ba5e4f (diff) |
Implement multi-ocular support, add biblical example
This removes the assumption that an xeyes instance displays just a pair
of eyes, and instead allows future developers to implement different
kinds of ocular layouts.
Currently, the ocular layout system only allows for specifying offsets,
but a future change might also make different parts of the eye geometry
configurable: size of different elements, padding, etc.
Signed-off-by: Serge Bazanski <q3k@q3k.org>
Diffstat (limited to 'EyesP.h')
-rw-r--r-- | EyesP.h | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -18,6 +18,23 @@ #define SEG_BUFF_SIZE 128 +typedef struct { + // X offset + double x; + // Y offset + double y; +} EyeLayout; + +typedef struct { + EyeLayout *eyes; + int count; + + double w_min_x; + double w_max_x; + double w_min_y; +double w_max_y; +} EyeConfiguration; + /* New fields for the eyes widget instance record */ typedef struct { Pixel pixel[PART_SHAPE]; @@ -28,7 +45,9 @@ typedef struct { Boolean shape_window; /* use SetWindowShapeMask */ int update; /* current timeout index */ TPoint mouse; /* old mouse position */ - TPoint pupil[2]; /* pupil position */ + Boolean biblically_accurate; + EyeConfiguration *configuration; + TPoint *pupils; Transform t; Transform maskt; XtIntervalId interval_id; |