1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 Copyright (C) Dragos Dena 2010
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 Street, Fifth Floor,
19 Boston, MA 02110-1301 USA
22 #ifndef __SNIPPETS_BROWSER_H__
23 #define __SNIPPETS_BROWSER_H__
26 #include <glib-object.h>
28 #include "snippets-db.h"
30 #include "snippets-interaction-interpreter.h"
31 #include <libanjuta/anjuta-shell.h>
35 typedef struct _SnippetsBrowser SnippetsBrowser
;
36 typedef struct _SnippetsBrowserPrivate SnippetsBrowserPrivate
;
37 typedef struct _SnippetsBrowserClass SnippetsBrowserClass
;
39 #define ANJUTA_TYPE_SNIPPETS_BROWSER (snippets_browser_get_type ())
40 #define ANJUTA_SNIPPETS_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_SNIPPETS_BROWSER, SnippetsBrowser))
41 #define ANJUTA_SNIPPETS_BROWSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_SNIPPETS_BROWSER, SnippetsBrowserClass))
42 #define ANJUTA_IS_SNIPPETS_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_SNIPPETS_BROWSER))
43 #define ANJUTA_IS_SNIPPETS_BROWSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_SNIPPETS_BROWSER))
45 struct _SnippetsBrowser
49 gboolean show_only_document_language_snippets
;
50 AnjutaShell
*anjuta_shell
;
53 SnippetsBrowserPrivate
*priv
;
56 struct _SnippetsBrowserClass
58 GtkBoxClass parent_class
;
61 void (*maximize_request
) (SnippetsBrowser
*snippets_browser
);
62 void (*unmaximize_request
) (SnippetsBrowser
*snippets_browser
);
68 GType
snippets_browser_get_type (void) G_GNUC_CONST
;
69 SnippetsBrowser
* snippets_browser_new (void);
71 void snippets_browser_load (SnippetsBrowser
*snippets_browser
,
72 SnippetsDB
*snippets_db
,
73 SnippetsInteraction
*snippets_interaction
);
74 void snippets_browser_unload (SnippetsBrowser
*snippets_browser
);
76 void snippets_browser_show_editor (SnippetsBrowser
*snippets_browser
);
77 void snippets_browser_hide_editor (SnippetsBrowser
*snippets_browser
);
78 void snippets_browser_refilter_snippets_view (SnippetsBrowser
*snippets_browser
);
80 GtkWidget
* snippets_browser_get_grip (SnippetsBrowser
*snippets_browser
);
82 #endif /* __SNIPPETS_BROWSER_H__ */