Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

queries.h

Go to the documentation of this file.
00001 
00005 /* GtkSQL -- an interactive graphical query tool for PostgreSQL
00006  * Copyright (C) 1998-2002  Lionel ULMER, Darryl Luff.
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00021  * ==========================================================================
00022  *
00023  * Functions for managing the query and result windows.
00024  */
00025 
00026 #ifndef __QUERIES_H__
00027 #define __QUERIES_H__
00028 
00029 #include <gtk/gtk.h>
00030 #include "querydata.h"
00031 
00033 #define MAXCOLWID 25
00034 
00035 #define RESULT_KEY  "Result"
00036 #define STATUS_KEY  "Message"
00037 
00038 typedef enum {
00039     QUERY_NEW = 0,
00040     QUERY_SWITCH,
00041     QUERY_FAKE,
00042     QUERY_ERROR
00043 } QueryDisplay;
00044 
00045 extern int lastQuery;
00046 extern int nbQueries;
00047 extern int queryStatus;
00048 
00049 extern GtkWidget *queryPopupClearItem;
00050 extern GtkWidget *queryPopupCloseItem;
00051 extern GtkWidget *queryPopupImportItem;
00052 extern GtkWidget *queryPopupNewItem;
00053 extern GtkWidget *queryPopupSaveItem;
00054 extern GtkWidget *queryPopupSaveAsItem;
00055 extern GtkWidget *queryPopupSendItem;
00056 
00057 
00058 extern void do_export_dialog(GtkWidget * widget, gpointer data);
00059 
00061 extern guint queryNotebookPageChangeHandler;
00062 
00064 int query_close();
00065 
00067 int query_delete_at_position(int position);
00068 
00069 GtkWidget *query_get_current();
00070 char *query_get_current_name();
00071 
00072 void *get_current_query_result();
00073 
00075 void *query_get_current_result(void);
00076 
00078 GtkWidget *query_get_no(int n);
00079 char *query_get_text_no(int n);
00080 
00082 QueryData *query_get_querydata(GtkWidget *query);
00083 void *query_get_result(GtkWidget * query);
00084 
00086 GtkWidget *query_pane_init();
00087 void queries_init();
00088 
00090 GtkWidget *result_pane_init();
00091 
00093 void results_display(void *result, int why, int position);
00094 
00096 void query_import(void);
00098 void query_clear(void);
00100 int query_count();
00101 
00103 GtkWidget *query_add(void);
00104 
00106 char *query_get_text(GtkWidget * query);
00107 
00110 void query_save(GtkWidget *qry);
00112 void query_save_as(GtkWidget *qry);
00114 void query_save_to_file(GtkWidget *query, char *fn);
00116 void query_set_name(int position, char *name);
00117 
00118 #endif

Generated on Sun May 9 19:19:17 2004 for GtkSQL by doxygen1.2.18