Fix another double define, and add subdir-objects where needed
[claws.git] / src / plugins / notification / gtkhotkey / gtk-hotkey-info.h
1 /*
2  * This file is part of GtkHotkey.
3  * Copyright Mikkel Kamstrup Erlandsen, March, 2008
4  *
5  *   GtkHotkey is free software: you can redistribute it and/or modify
6  *   it under the terms of the GNU Lesser General Public License as published by
7  *   the Free Software Foundation, either version 3 of the License, or
8  *   (at your option) any later version.
9  *
10  *   GtkHotkey is distributed in the hope that it will be useful,
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *   GNU Lesser General Public License for more details.
14  *
15  *   You should have received a copy of the GNU Lesser General Public License
16  *   along with GtkHotkey.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #if !defined (__GTK_HOTKEY_H__) && !defined (GTK_HOTKEY_COMPILATION)
20 #error "Only <gtkhotkey.h> can be included directly."
21 #endif
22
23 #ifndef __GTK_HOTKEY_INFO_H__
24 #define __GTK_HOTKEY_INFO_H__
25
26 #include <glib.h>
27 #include <glib-object.h>
28 #include <gio/gio.h>
29 #include <stdlib.h>
30 #include <string.h>
31
32 G_BEGIN_DECLS
33
34
35 #define GTK_HOTKEY_TYPE_INFO (gtk_hotkey_info_get_type ())
36 #define GTK_HOTKEY_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_HOTKEY_TYPE_INFO, GtkHotkeyInfo))
37 #define GTK_HOTKEY_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_HOTKEY_TYPE_INFO, GtkHotkeyInfoClass))
38 #define GTK_HOTKEY_IS_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_HOTKEY_TYPE_INFO))
39 #define GTK_HOTKEY_IS_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_HOTKEY_TYPE_INFO))
40 #define GTK_HOTKEY_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_HOTKEY_TYPE_INFO, GtkHotkeyInfoClass))
41
42 typedef struct _GtkHotkeyInfo GtkHotkeyInfo;
43 typedef struct _GtkHotkeyInfoClass GtkHotkeyInfoClass;
44 typedef struct _GtkHotkeyInfoPrivate GtkHotkeyInfoPrivate;
45
46 struct _GtkHotkeyInfo {
47         GObject parent;
48         GtkHotkeyInfoPrivate * priv;
49 };
50 struct _GtkHotkeyInfoClass {
51         GObjectClass parent;
52 };
53
54 gboolean                gtk_hotkey_info_bind (GtkHotkeyInfo* self, GError **error);
55
56 gboolean                gtk_hotkey_info_unbind (GtkHotkeyInfo* self, GError **error);
57
58 gboolean                gtk_hotkey_info_is_bound (GtkHotkeyInfo* self);
59
60 const gchar*    gtk_hotkey_info_get_application_id (GtkHotkeyInfo* self);
61
62 const gchar*    gtk_hotkey_info_get_key_id (GtkHotkeyInfo* self);
63
64 GAppInfo*               gtk_hotkey_info_get_app_info (GtkHotkeyInfo* self);
65
66 const gchar*    gtk_hotkey_info_get_application_id (GtkHotkeyInfo* self);
67
68 const gchar*    gtk_hotkey_info_get_signature (GtkHotkeyInfo* self);
69
70 const gchar*    gtk_hotkey_info_get_key_id (GtkHotkeyInfo* self);
71
72 const gchar*    gtk_hotkey_info_get_description (GtkHotkeyInfo* self);
73
74 void                    gtk_hotkey_info_set_description (GtkHotkeyInfo* self, const gchar *description);
75
76 gboolean                gtk_hotkey_info_equals (GtkHotkeyInfo *hotkey1, GtkHotkeyInfo *hotkey2, gboolean sloppy_equals);
77
78 void                    gtk_hotkey_info_activated (GtkHotkeyInfo* self, guint event_time);
79
80 GtkHotkeyInfo*  gtk_hotkey_info_new                                             (const gchar    *app_id,
81                                                                                                                  const gchar    *key_id,
82                                                                                                                  const gchar    *signature,
83                                                                                                                  GAppInfo               *app_info);
84
85 GType                   gtk_hotkey_info_get_type (void);
86
87 G_END_DECLS
88
89 #endif