/*\ * libLB - The LBPP support library * Copyright (C) 2001 Anthony Liguori * * libLB is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * libLB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \*/ #ifndef _LB_WINDOW_H #define _LB_WINDOW_H #include "lb.h" typedef struct _variable_queue_tag { Variable *v; struct _variable_queue_tag *next; } VarQ; typedef struct _lb_gui_tag { GtkWidget *w; GtkWidget *c; LBString close_label; VarQ *queue; int queue_size; int queue_capacity; } LBGUI; #define LB_GUI_CLOSE 1 #define LB_GUI_GOTO 2 int lb_open_window(LBContext *cxt, char *name, Variable *handle); void lb_close_window(LBContext *cxt, LBGUI *gui); int lb_eof_window(LBContext *cxt, LBGUI *gui); LBString lb_read_window_str(LBContext *cxt, LBGUI *gui, size_t size); int lb_write_window_str(LBContext *cxt, LBGUI *gui, LBString str); double lb_read_window_db(LBContext *cxt, LBGUI *gui); gint lb_gtk_delete(GtkWidget *w, GdkEvent *e, gpointer data); void lb_gtk_destroy(GtkWidget *w, gpointer data); void lb_gtk_button_clicked(GtkWidget *w, gpointer data); #endif