fix a memory leak
[rhythmbox.git] / widgets / rb-query-creator.h
blobeee51cf032aaaf9dd6f4bae822b41388430dce88
1 /*
2 * arch-tag: Header for RhythmDB query creation dialog
4 * Copyright (C) 2003 Colin Walters <walters@gnome.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22 #include <gtk/gtkdialog.h>
24 #include "rhythmdb.h"
25 #include "rhythmdb-query-model.h"
27 #ifndef __RB_QUERY_CREATOR_H
28 #define __RB_QUERY_CREATOR_H
30 G_BEGIN_DECLS
32 #define RB_TYPE_QUERY_CREATOR (rb_query_creator_get_type ())
33 #define RB_QUERY_CREATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_QUERY_CREATOR, RBQueryCreator))
34 #define RB_QUERY_CREATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_QUERY_CREATOR, RBQueryCreatorClass))
35 #define RB_IS_QUERY_CREATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_QUERY_CREATOR))
36 #define RB_IS_QUERY_CREATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_QUERY_CREATOR))
37 #define RB_QUERY_CREATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_QUERY_CREATOR, RBQueryCreatorClass))
39 typedef struct
41 GtkDialog parent;
42 } RBQueryCreator;
44 typedef struct
46 GtkDialogClass parent_class;
47 } RBQueryCreatorClass;
49 GType rb_query_creator_get_type (void);
51 GtkWidget * rb_query_creator_new (RhythmDB *db);
53 GtkWidget * rb_query_creator_new_from_query (RhythmDB *db, GPtrArray *query,
54 RhythmDBQueryModelLimitType limit_type, GValueArray *limit_value,
55 const char *sort_column, gint sort_direction);
57 GPtrArray * rb_query_creator_get_query (RBQueryCreator *creator);
59 void rb_query_creator_get_limit (RBQueryCreator *creator,
60 RhythmDBQueryModelLimitType *limit_type,
61 GValueArray **limit_value);
63 void rb_query_creator_get_sort_order (RBQueryCreator *creator, const char **sort_key, gint *sort_direction);
65 G_END_DECLS
67 #endif /* __RB_QUERY_CREATOR_H */