diff options
Diffstat (limited to 'src/nanolight.h')
-rw-r--r-- | src/nanolight.h | 111 |
1 files changed, 74 insertions, 37 deletions
diff --git a/src/nanolight.h b/src/nanolight.h index dec9f52..b896a57 100644 --- a/src/nanolight.h +++ b/src/nanolight.h @@ -25,44 +25,59 @@ #include <gtk/gtk.h> -/* Attribute flags */ -#define ATTR_NONE (0) -#define ATTR_16BIT (1) -#define ATTR_STOP (2) - -enum attr_class -{ - ATT_INTENSITY, - ATT_PAN, - ATT_TILT, - ATT_STROBE, - ATT_CYAN, - ATT_MAGENTA, - ATT_YELLOW, - ATT_RGOBO, - ATT_GOBO, - ATT_PRISM, - ATT_FOCUS, - ATT_ZOOM, -}; - - -struct attribute -{ - enum attr_class cls; - int props; - int addr_offset; - int home; - int *stops; - int n_stops; -}; - +/* Fixture attributes */ +#define INTENSITY (1) +#define COL_RGB (2) +#define COL_CMY (4) +#define PANTILT (8) +#define FOCUS (16) +#define ZOOM (32) +#define FROST (64) +#define IRIS (128) +#define SHUTTERS (256) +#define GOBO (512) +#define GOBO_ROTATE (1024) +#define PRISM (2048) +#define PRISM_ROTATE (4096) struct fixture_class { char *name; - int n_attrs; - struct attribute *attrs; + int attributes; + int attributes16; + + int n_magic; + int *magic_chans; + int *magic_vals; + + int intensity_offset; + int pan_offset; + int tilt_offset; + + /* For CMY colour */ + int cyan_offset; + int magenta_offset; + int yellow_offset; + + /* For RGB colour */ + int red_offset; + int green_offset; + int blue_offset; + + int focus_offset; + int zoom_offset; + int frost_offset; + int iris_offset; + + int n_gobos; /* Number of gobos including "no gobo" */ + int n_gobo_chans; + int *gobo_chans; + int *gobo_vals; + + int n_prisms; + int n_prism_chans; + int *prism_chans; + int *prism_vals; }; @@ -72,8 +87,30 @@ struct fixture int universe; int base_addr; struct fixture_class *cls; - int *attr_vals; - int *attr_vals_start; + + float intensity; /* 0 (off) to 1 (full) */ + float cyan; /* 0 (no filter) to 1 (full colour) */ + float magenta; /* 0 (no filter) to 1 (full colour) */ + float yellow; /* 0 (no filter) to 1 (full colour) */ + float red; /* 0 (no red) to 1 (full on) */ + float green; /* 0 (no green) to 1 (full on) */ + float blue; /* 0 (no blue) to 1 (full on) */ + float pan; /* -1 (fully stage left) to +1 (fully stage right) */ + float tilt; /* -1 (fully downstage) to +1 (fully upstage) */ + int gobo; /* Gobo number: 0 to cls->n_gobos-1 inclusive */ + float gobo_rotation; /* -1 (fully anticlockwise) to +1 (fully clockwise) */ + float gobo_spin; /* -1 (fastest anticlockwise) to +1 (fastest clockwise) */ + int prism; /* Exactly like gobo */ + float prism_rotation; /* Exactly like gobo_rotation */ + float prism_spin; /* Exactly like gobo_spin */ + float focus; /* 0 (nearest) to 1 (farthest) */ + float zoom; /* 0 (narrowest) to 1 (widest) */ + float frost; /* 0 (hardest) to 1 (softest) */ + float iris; /* 0 (fully open) to 1 (fully closed) */ + + /* Values at start of mouse movement */ + float pan_start; + float tilt_start; }; @@ -95,7 +132,7 @@ struct nanolight int selection[1024]; int n_sel; - enum attr_class sel_attr; + int sel_attr; int dragging; int fine; int go_lock; |