Main Page | Class List | Directories | File List | Class Members | File Members

gui.h File Reference

direct GTK binding (deprecated) More...

#include <gnome.h>
#include <ccu.h>
#include <semaphore.h>
#include <progress.h>
#include <instctrl.h>
#include <telescope.h>
#include <preview.h>
#include <glib.h>

Go to the source code of this file.

Defines

#define __gui_h   1
#define BUTTON_NORMAL   0
#define BUTTON_BREAK   1
#define BUTTON_DISABLE   2
#define UPDATE_BUTTONS   1
#define UPDATE_CCU_STATUS   2
#define UPDATE_TERMINAL   3
#define UPDATE_FILENAME   4
#define UPDATE_OBJECTNAME   5
#define UPDATE_PROGRESS   6
#define UPDATE_FILTERLIST   7
#define UPDATE_SEQUENCES   8
#define UPDATE_PREVIEW   9
#define SHOW_ZEROVOLT   10
#define UPDATE_IMSTAT   11
#define UPDATE_FLATS_DONE   12
#define UPDATE_SHUTTER_OFFSET   13

Functions

int parse_gui (void)
 parses the gboccia main window
void init_gui (void)
 initializes the graphical user interface
void init_sequencecombo (void)
 initialize the "sequence" combobox in the gboccia main window
int init_gaincombo (void)
 initializes the "gain" combobox in the gboccia main window
void gui_init_instctrlwinddow (void)
 initializes the "instrument control" window
void init_drawarea (void)
 sets up rgbbuffer
int gui_done_queuewinddow (void)
 parses the "queue" window, loads and starts the selected queue in the CCU
void on_darea_expose (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
 GTK callback for rgbbuffer expose event.
int gui_ccu_contact (void)
void gui_update_preview (unsigned char *data, int size)
void gui_init_acquisition (void)
void gui_update_buttons (struct gui_button_struct input)
 sets the buttons in the gboccia main window to a state given by the parameter
void gui_init_dapwinddow (void)
 initializes the "data associated parameters" window
int gui_done_databasewinddow (void)
 parses the "database" window and starts the download of the selected database into the CCU
void gui_done_dapwindow (void)
 parses the "data associated parameters" window
void gui_done_multiplewindow (void)
 parses the multiple exposure window
void gui_init_databasewinddow (void)
 initializes the "database" window
void gui_show_full (void)
 starts the external fits viewer
int gui_init_specialsequencecombo (void)
 initialize the "sequence" combobox in the "special exposure" window
int gui_init_specialgaincombo (void)
 initializes the "gain" combobox in the "special exposure" window
void gui_ccu_display_status (struct ccu_status_struct status)
 display the current status of the CCU using GTK
void gui_queue_buttons (struct gui_button_struct input)
 queues a gui change request concerning buttons.
void gui_queue_objectname (char *input)
 queues a gui change request concerning the objectname entry.
gboolean gui_idle (void)
 performs the changes of the GUIas requested by the threads
void gui_queue_normal (void)
 queues a normal exposure
void gui_push_item (struct gui_update_struct input)
 queues a gui change request.
int gui_done_autoflatwinddow ()
void gui_done_ccddatabasewindow ()
 parses the "ccd database" window

Variables

guchar * rgbbuf
char gui_lastname [1000]
acquisition_struct gui_special_struct
char gtk_ccu_sequence_context [100][1000]
char gui_multiplefilename [1000]
char gui_queuefilename [1000]
volatile int gui_clock
sem_t gui_list_sem
sem_t gui_status_sem
int gui_nexposures


Detailed Description

direct GTK binding (deprecated)

Copyright (C) 2001-2003 Dirk Huenniger (dhun@astro.uni-bonn.de)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.


Function Documentation

void gui_ccu_display_status struct ccu_status_struct  status  ) 
 

display the current status of the CCU using GTK

Returns:
void
The current status of the CCU is read using status=ccu_get_status() The elemnts in the gboccia main window and in the terminal window are updated according to status read

void gui_done_ccddatabasewindow  ) 
 

parses the "ccd database" window

Returns:
void
This function parses the "ccd database" window, the results are stored in gui_observername, gui_telescopename and gui_instrumentname, for later use in the fitsfile.

void gui_done_dapwindow void   ) 
 

parses the "data associated parameters" window

Returns:
void
This function parses the "data associated parameters" window, the results are stored in gui_observername, gui_telescopename and gui_instrumentname, for later use in the fitsfile.

int gui_done_databasewinddow void   ) 
 

parses the "database" window and starts the download of the selected database into the CCU

Returns:
interger (0 means success, -1 means fail)
This function parses the "database" window. The results are to ccu_channels (dual channel readout) and ccu_database_filename. The download of the selected database into the CCU is started.

void gui_done_multiplewindow void   ) 
 

parses the multiple exposure window

Returns:
void
This function parses the multiple exposure window and starts a multiple exposure.

int gui_done_queuewinddow void   ) 
 

parses the "queue" window, loads and starts the selected queue in the CCU

Returns:
interger (0 means success, -1 means fail)
This function parses "queue" window, it loads and starts the selected queue in the CCU.

gboolean gui_idle void   ) 
 

performs the changes of the GUIas requested by the threads

Returns:
void
This function performs the changes of the GUIas requested by the threads , is stated every now and then by GTK using the gtk_add_idle mechanism

void gui_init_dapwinddow void   ) 
 

initializes the "data associated parameters" window

Returns:
void
This function sets up the "data associated parameters" window, reading data form gui_observername, gui_telescopename and gui_instrumentname.

void gui_init_databasewinddow void   ) 
 

initializes the "database" window

Returns:
void
This function displays the current ccu_database_filename and the flag dual channel readout (ccu_channels).

void gui_init_instctrlwinddow void   ) 
 

initializes the "instrument control" window

Returns:
void
This function sets the value in the entry "Telescope Focus (desired)" to the value read from "Telescope Focus (actual)" entry in the "instrument control" window.

int gui_init_specialgaincombo void   ) 
 

initializes the "gain" combobox in the "special exposure" window

Returns:
void
the gain combobox is filled with Gain numbers von 1 to 8.

int gui_init_specialsequencecombo void   ) 
 

initialize the "sequence" combobox in the "special exposure" window

Returns:
void
the sequences are loaded from the ui_ccu_sequence_context array into the combo box.

void gui_push_item struct gui_update_struct  input  ) 
 

queues a gui change request.

Returns:
void
This function queues a gui change request it is called by a thread who wants to change the gui.

void gui_queue_buttons struct gui_button_struct  input  ) 
 

queues a gui change request concerning buttons.

Parameters:
input a gui_button_struct containing the button status requested
Returns:
void
This function queues a gui change request concerning buttons it is called by a thread who wants to change the gui.

void gui_queue_normal void   ) 
 

queues a normal exposure

Returns:
void
This function queues a normal exposure into the acquisition queue, it is used whenever the "Start Exposure" button in the gboccia main window is clicked

void gui_queue_objectname char *  input  ) 
 

queues a gui change request concerning the objectname entry.

Parameters:
input a C string cotaining to be writen into the objectname entry.
Returns:
void
This function queues a gui change request concerning the objectname entry it is called by a thread who wants to change the gui.

void gui_show_full void   ) 
 

starts the external fits viewer

Returns:
void
the programm given by the inifile entry [extern:saods9] is started in the background. The current fitsfilename is passed to it as command line argument.

void gui_update_buttons struct gui_button_struct  input  ) 
 

sets the buttons in the gboccia main window to a state given by the parameter

Parameters:
input a struct descibing the status of the buttons, to be set
Returns:
void
This function sets the buttons in the gboccia main window to a state given by the parameter.

void init_drawarea void   ) 
 

sets up rgbbuffer

Returns:
void
This function sets up GTK to display RGB data, and enebale GTK to redisplay rgbbuffer whenever nessary

int init_gaincombo void   ) 
 

initializes the "gain" combobox in the gboccia main window

Returns:
void
the gain combobox is filled with Gain numbers von 1 to 8.

void init_gui void   ) 
 

initializes the graphical user interface

Returns:
void
the buttons are set up, the gui_lastname variable is initialized. The font in the columned list in the CCU terminal window is set to "Monospace 10", the gain combox in the gboccia main window is initialized

void init_sequencecombo void   ) 
 

initialize the "sequence" combobox in the gboccia main window

Returns:
void
the sequences are loaded from the ui_ccu_sequence_context array into the combo box the sequnce with number 0 is ommitted because it contains the dummy read sequence, which is not usefull to acquire frames. The sequence with number 14 is ommited because they contains the zero volt sequence, which is not usefull to acquire frames. The sequence with number 15 is ommited because it is probably not properly inmplementet in the CCU.

void on_darea_expose GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  user_data
 

GTK callback for rgbbuffer expose event.

Parameters:
widget a pointer to the widget containing rgbbuffer
event the expose event
Returns:
void
This function is called by GTK whenever it needs to redisplay rgbbuffer

int parse_gui void   ) 
 

parses the gboccia main window

Returns:
interger (0 means ok, -1 means fail)


Variable Documentation

volatile int gui_clock
 

a counter couinting from one to 20 once pers second

char gui_lastname[1000]
 

the last value in the Objectname entry in the gboccia main window

sem_t gui_list_sem
 

a semaphore protecting gui_list

int gui_nexposures
 

the number of exposures requested as given by the "#Exposures" entry in the gboccia main window

struct acquisition_struct gui_special_struct
 

a structure containing the seettings set in the specail exposure window. It can be passed directly to the acquisition system

sem_t gui_status_sem
 

a semaphore protecting gui_list

guchar* rgbbuf
 

a buffer to hold preview image (24bit rgb)


Generated on Fri Dec 16 22:23:38 2005 for gboccia by  doxygen 1.4.2