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.
21 typedef struct _MacroDB MacroDB
;
22 typedef struct _MacroDBClass MacroDBClass
;
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))
36 GtkTreeStore
*tree_store
;
38 GtkTreeIter iter_user
;
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
,
66 const gchar
* category
,
67 const gchar
* shortcut
, const gchar
* text
);
69 void macro_db_change (MacroDB
* db
, GtkTreeIter
* iter
,
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
,