/*cc -O -o tcs tcs.c -lforms -L/usr/X11R6/lib -lX11 -lm*/
#ifndef FD_mainform_h_
#define FD_mainform_h_
#include <forms.h>
//#include "/usr/include/forms.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <time.h>

#define TRUE             1
#define FALSE            0
#define	IMAGE_W	       752         /* Width of image area                      */
#define	IMAGE_H	       582         /* Height of image area                     */
//#define	IMAGE_W	       800         /* Width of image area                      */
//#define	IMAGE_H	       770         /* Height of image area                     */
#define LUT_H 16 // lookup table image height

// globals for saving to latest.dat

/** Callbacks, globals and object handlers **/

extern void cont_expose_cb(FL_OBJECT *ob, long arg );
extern void stop_cont_expose_cb(FL_OBJECT *ob, long arg );
extern void expose_cb(FL_OBJECT *ob, long arg );
extern void ext_prog_cb(FL_OBJECT *ob, long arg );
extern void SliderUP_cb(FL_OBJECT *ob, long arg );
extern void SliderBOT_cb(FL_OBJECT *ob, long arg );
extern void Slidergam_cb(FL_OBJECT *ob, long arg );
extern void Sliderbright_cb(FL_OBJECT *ob, long arg );
extern void set_exptime_cb(FL_OBJECT *ob, long arg );
extern void set_backgrd_cb(FL_OBJECT *ob, long arg );
extern void abort_expose_cb(FL_OBJECT *ob, long arg );
extern void bin1X1_cb(FL_OBJECT *ob, long arg );
extern void bin2X2_cb(FL_OBJECT *ob, long arg );


typedef struct {
  FL_FORM *mainform;
  //  void *vdata;
  //  char *cdata;
  //  long  ldata;
  FL_IMAGE  *image;               
  FL_IMAGE  *lut ;               // look up table image bar
  FL_OBJECT *clut;               // look up table
  FL_OBJECT *slideup_but;
  FL_OBJECT *slidebot_but;
  FL_OBJECT *slide_gama;
  FL_OBJECT *slide_bright;
  FL_OBJECT *expose_but;
  FL_OBJECT *cont_expose_but;
  FL_OBJECT *stop_cont_expose_but;
  FL_OBJECT *abort_expose_but;
  FL_OBJECT *ext_prog_but;
  FL_OBJECT *image_canvas;
  FL_OBJECT *blank_image;
  FL_OBJECT *set_exptime_inp;
  FL_OBJECT *set_exptime_but;
  FL_OBJECT *set_backgrd_inp;
  FL_OBJECT *set_backgrd_but;
  FL_OBJECT *timer;
  FL_OBJECT *xyz_text;          
  FL_OBJECT *bright_text;
  FL_OBJECT *backgrd_text;
  FL_OBJECT *bin1x1_but;
  FL_OBJECT *bin2x2_but;

} FD_mainform;


FD_mainform *fd_mainform;


#endif /* FD_mainform_h_ */




