home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Linux
/
Divers
/
yagirc-0.51.tar.gz
/
yagirc-0.51.tar
/
yagirc-0.51
/
gui.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-05-09
|
3KB
|
147 lines
#ifndef USE_GUI
#include "no_ui.h"
#else
#include "data.h"
#ifndef __GUI_H
#define __GUI_H
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#define PROGRAM_TITLE "yagIRC"
#define PROGRAM_TITLE_SIZE 6
#define CONFIG_FILE "~/.yagircrc"
#define SITE_CONFIG_FILE "/etc/yagirc.site"
#define GLOBAL_CONFIG_FILE "/etc/yagirc.conf"
#define MAX_TEXTLINES_HISTORY 1000
typedef struct
{
GtkWidget *mainwin;
GtkWidget *entry;
GtkWidget *statusbar;
GtkWidget *hbox;
GtkWidget *chanbox; /* channel buttons */
CHAN_REC *highchan; /* last hilighted channel button */
GList *windows; /* list of child windows in this window */
WINDOW_REC *selected; /* current selected child window */
GtkWidget *nicklist;
int nicklistlen;
/* menu */
GtkMenuFactory *factory;
GHashTable *entry_ht;
GtkWidget *menubar;
GtkAcceleratorTable *table;
}
GUI_TOPWIN_REC;
typedef struct
{
GtkText *text;
GtkWidget *textscroll;
GUI_TOPWIN_REC *parent;
int lines;
int linelen[MAX_TEXTLINES_HISTORY];
}
GUI_WINDOW_REC;
typedef struct
{
GtkWidget *mainwin;
GtkWidget *progbar;
GtkWidget *infotext;
}
GUI_DCC_REC;
typedef GtkWidget GUI_CHAN_REC;
/* Input functions */
typedef GdkInputFunction GUI_INPUT_FUNC;
#define GUI_INPUT_READ GDK_INPUT_READ
#define GUI_INPUT_WRITE GDK_INPUT_WRITE
#define gui_input_add(a,b,c,d) gdk_input_add(a,b,c,d)
#define gui_input_remove(a) gdk_input_remove(a)
/* Timeout functions */
typedef GtkFunction GUI_TIMEOUT_FUNC;
#define gui_timeout_new(a,b,c) gtk_timeout_add(a,b,c)
#define gui_timeout_remove(a) gtk_timeout_remove(a)
extern GdkColor colors[];
extern GdkColor default_color, default_bgcolor;
extern GdkColor yag_colors[15];
enum
{
NOCOLOR,
BLACK,
BLUE,
GREEN,
CYAN,
RED,
MAGENTA,
YELLOW,
WHITE,
BBLACK,
BBLUE,
BGREEN,
BCYAN,
BRED,
BMAGENTA,
BYELLOW,
BWHITE,
COLORS
};
/* Initialize IRC window */
void gui_window_init(WINDOW_REC *win, WINDOW_REC *parent);
/* Deinitialize IRC window */
void gui_window_deinit(WINDOW_REC *win);
/* IRC channel/window changed, update everything you can think of.. */
void gui_window_update(WINDOW_REC *win);
/* Change focus to specified window */
void gui_window_select(WINDOW_REC *win);
/* Quit program requested */
void gui_exit(void);
/* Inform GUI what connection state we are in - 0 = disconnected, 1 = socket
connected, 2 = IRC server ready */
void gui_connected(SERVER_REC *serv, int state);
/* Someone in notify list joined IRC */
void gui_notify_join(char *nick);
/* Someone in notify list left IRC */
void gui_notify_part(char *nick);
/* Update status bar */
void gui_update_statusbar(WINDOW_REC *win);
#include "gui_dcc.h"
#include "gui_join.h"
#include "gui_connect.h"
#include "gui_channels.h"
#include "gui_nicklist.h"
#include "gui_menu.h"
#include "gui_setup.h"
/* private */
int gui_is_sb_down(WINDOW_REC *win);
void gui_set_sb_down(WINDOW_REC *win);
void gui_refresh_windows(void);
#endif
#endif