// definitions for the xview and Tcl/Tk control panels.
//
// by: Patrick Reynolds <patrickr@virginia.edu>

#ifndef XQCCTL_H
#define XQCCTL_H

#ifdef REMOTE

#include "camera.h"

int xqc_poll(camera_t *cam);
int xqc_fork(int argc, char *argv[], camera_t *cam, char *dpy_name);
void xqc_quit(void);
void xqc_adj(camera_t *cam);

struct xqc_msg {
  char type;    // type of message: what to adjust/do
  long value;   // adjustment value (undefined in some cases)
};

// camera adjustment types
#define XQC_BRIGHTNESS 'B'
#define XQC_BLACK_LEVEL 'b'
#define XQC_WHITE_LEVEL 'W'

// color adjustment types
#define XQC_RED 'R'
#define XQC_GREEN 'G'
#define XQC_BLUE 'l'   // B and b are taken

// control types
#define XQC_STARTUP '0'
#define XQC_QUIT 'Q'
#define XQC_STATUS 's'
#define XQC_TAKE 't'
#define XQC_ADJUST 'j'

// color/brightness slider synchronization message types
#define SEND_BRIGHT '1'
#define SEND_RED '2'
#define SEND_GREEN '3'
#define SEND_BLUE '4'

#endif // ifdef REMOTE

// auto-action constants
#define AUTO_BRIGHT 1
#define AUTO_BAL 2
#define AUTO_SAVE 4

#endif // ifndef XQCCTL_H
