Fix a Gtk warning when checking path input in the log viewer.
[anjuta-git-plugin.git] / plugins / macro / macro-db.h
blob9c03255e176d3b0a20978bc10cef3b662eff5e49
1 /*
2 * macro_db.h (c) 2005 Johannes Schmid
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 #ifndef MACRO_DB_H
19 #define MACRO_DB_H
21 typedef struct _MacroDB MacroDB;
22 typedef struct _MacroDBClass MacroDBClass;
24 #include "plugin.h"
26 #define MACRO_DB_TYPE (macro_db_get_type ())
27 #define MACRO_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MACRO_DB_TYPE, MacroDB))
28 #define MACRO_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MACRO_DB_TYPE, MacroDBClass))
29 #define IS_MACRO_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MACRO_DB_TYPE))
30 #define IS_MACRO_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MACRO_DB_TYPE))
32 struct _MacroDB
34 GObject object;
36 GtkTreeStore *tree_store;
37 GtkTreeIter iter_pre;
38 GtkTreeIter iter_user;
41 struct _MacroDBClass
43 GObjectClass klass;
47 enum
49 MACRO_NAME = 0,
50 MACRO_CATEGORY,
51 MACRO_SHORTCUT,
52 MACRO_TEXT,
53 MACRO_PREDEFINED,
54 MACRO_IS_CATEGORY,
55 MACRO_N_COLUMNS
58 GType macro_db_get_type (void);
59 MacroDB *macro_db_new (void);
61 void macro_db_save (MacroDB * db);
62 GtkTreeModel *macro_db_get_model (MacroDB * db);
64 void macro_db_add (MacroDB * db,
65 const gchar * name,
66 const gchar * category,
67 const gchar * shortcut, const gchar * text);
69 void macro_db_change (MacroDB * db, GtkTreeIter * iter,
70 const gchar * name,
71 const gchar * category,
72 const gchar * shortcut, const gchar * text);
74 void macro_db_remove (MacroDB * db, GtkTreeIter * iter);
76 gchar* macro_db_get_macro(MacroPlugin * plugin, MacroDB * db, GtkTreeIter* iter,
77 gint *offset);
79 #endif