/*==========================================================================*\
 |  This file is part of setiherder (http://www.sackheads.org/setiherder/)  |
 |  which was written by Brian L. Naylor <brian+seti@sackheads.org> and is  |
 |  under the GNU General Public License.  You should have recieved a copy  |
 |  of the GPL with this source code.  If not, we'd like to know about it.  |
\*--------------------------------------------------------------------------*/

#ifndef SH_WIN
#define SH_WIN

#include <gtk/gtk.h>
#include "shtypes.h"

#define SHWIN_DEFAULT_HOST_WIDTH        130
#define SHWIN_DEFAULT_ACCOUNT_WIDTH     150
#define SHWIN_DEFAULT_STATE_WIDTH        80
#define SHWIN_DEFAULT_UNITS_WIDTH        50
#define SHWIN_DEFAULT_COMPLETE_WIDTH     50
#define SHWIN_DEFAULT_MAIN_WINDOW_WIDTH   0  /* lets it auto-size */
#define SHWIN_DEFAULT_MAIN_WINDOW_HEIGHT  0

#define SH_GUI_MENU_EXPAND      1
#define SH_GUI_MENU_START       2
#define SH_GUI_MENU_STOP        3
#define SH_GUI_MENU_REMOVE      4
#define SH_GUI_MENU_EDIT        5

/*--------------------------------------------------------------------------*\
 | Function prototypes                                                      |
\*--------------------------------------------------------------------------*/
sh_rc shwin_init(void);
sh_rc shwin_client_add(sh_client_t*);
sh_rc shwin_status_change(int idx);
sh_rc shwin_increment_session_work();
sh_rc shwin_details_change(int client);

sh_rc parse_buffer(char *, int, int);
sh_rc parse_line(char *, int);
gint  idle_check(gpointer data);
void  add_text_to_log(int level, char *text);

/*--------------------------------------------------------------------------*\
 | Callback prototypes                                                      |
\*--------------------------------------------------------------------------*/
void delete_event(GtkWidget *widget, GdkEvent *event, gpointer data);
void exit_callback(GtkWidget *widget, gpointer data);
void input_callback(gpointer data, gint source, GdkInputCondition cnd);
void add_button_callback(GtkWidget *widget, gpointer data);
void add_ok_callback(GtkWidget *widget, gpointer data);
void add_cancel_callback(GtkWidget *widget, gpointer data);
void popup_handler(GtkWidget *widget, gpointer data);
void clist_select_row_callback(GtkCList*, gint, gint, GdkEvent*, gpointer);


#endif
