Set up current working directory on File->Open
[gscope.git] / queries.h
blobf5345ca56f8ca30b25e19f60d5aa0539711be51f
1 /*
2 * (c) 2010 Cyrill Gorcunov, gorcunov@gmail.com
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at
7 * your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20 #ifndef QUERIES_H
21 #define QUERIES_H
23 #include <gtk/gtk.h>
25 #include "list.h"
27 #include "backend-proto.h"
28 #include "notebook.h"
29 #include "tags.h"
30 #include "id-utils.h"
31 #include "cscope.h"
32 #include "view.h"
34 struct query_result {
35 struct list_head *head;
36 enum backend_protocols protocol;
37 struct backend_proto *proto;
40 struct query_view {
41 GtkWidget *me; /* master widget we are embedded into */
43 struct query_result query;
44 GtkWidget *query_tree_widget;
45 GtkListStore *query_store;
48 static inline int is_valid_query_result(struct query_result *result)
50 return result->proto != NULL;
53 struct query_view *query_view_create(struct query_result *result);
54 void query_view_destroy(GtkWidget *me, void *private);
56 struct gscope_info;
57 int query_switch_or_read_source_into_notebook(struct gscope_info *info, struct backend_proto_item *item);
59 #endif /* QUERIES_H */