finch/libgnt/gntbindable.h

Fri, 07 Feb 2014 01:17:31 +0530

author
Ankit Vani <a@nevitus.org>
date
Fri, 07 Feb 2014 01:17:31 +0530
branch
soc.2013.gobjectification.plugins
changeset 37080
fbb8840b1d71
parent 37079
5d1f08386e92
child 37081
3e876e3e3131
permissions
-rw-r--r--

Revert changes to libgnt/*.h from the prev commit

18358
2122fd567315 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 17586
diff changeset
1 /*
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
2 * GNT - The GLib Ncurses Toolkit
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
3 *
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
4 * GNT is the legal property of its developers, whose names are too numerous
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
6 * source distribution.
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
7 *
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
8 * This library is free software; you can redistribute it and/or modify
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
9 * it under the terms of the GNU General Public License as published by
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
11 * (at your option) any later version.
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
12 *
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
13 * This program is distributed in the hope that it will be useful,
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
16 * GNU General Public License for more details.
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
17 *
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
18 * You should have received a copy of the GNU General Public License
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
19 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18427
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
21 */
35446
c0f80955551d Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents: 35408
diff changeset
22 /**
c0f80955551d Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents: 35408
diff changeset
23 * SECTION:gntbindable
c0f80955551d Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents: 35408
diff changeset
24 * @section_id: libgnt-gntbindable
c0f80955551d Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents: 35408
diff changeset
25 * @short_description: <filename>gntbindable.h</filename>
c0f80955551d Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents: 35408
diff changeset
26 * @title: Bindable
c0f80955551d Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents: 35408
diff changeset
27 */
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
28
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
29 #ifndef GNT_BINDABLE_H
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
30 #define GNT_BINDABLE_H
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
31
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
32 #include <stdio.h>
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
33 #include <glib.h>
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
34 #include <glib-object.h>
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
35 #include <ncurses.h>
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
36
35379
ea1a0327001e Rename _get_gtype() functions in libgnt to _get_type()
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
37 #define GNT_TYPE_BINDABLE (gnt_bindable_get_type())
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
38 #define GNT_BINDABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_BINDABLE, GntBindable))
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
39 #define GNT_BINDABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_BINDABLE, GntBindableClass))
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
40 #define GNT_IS_BINDABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_BINDABLE))
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
41 #define GNT_IS_BINDABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BINDABLE))
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
42 #define GNT_BINDABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BINDABLE, GntBindableClass))
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
43
16362
a4af57dc76fd Debug is not necessary anymore, and don't crash on null text.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15991
diff changeset
44 #define GNTDEBUG
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
45
15991
1efb6bd8ba3f Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15886
diff changeset
46 typedef struct _GntBindable GntBindable;
1efb6bd8ba3f Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15886
diff changeset
47 typedef struct _GntBindableClass GntBindableClass;
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
48
15991
1efb6bd8ba3f Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15886
diff changeset
49 struct _GntBindable
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
50 {
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
51 GObject inherit;
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
52 };
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
53
15991
1efb6bd8ba3f Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15886
diff changeset
54 struct _GntBindableClass
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
55 {
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
56 GObjectClass parent;
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
57
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
58 GHashTable *remaps; /* Key remaps */
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
59 GHashTable *actions; /* name -> Action */
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
60 GHashTable *bindings; /* key -> ActionParam */
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
61
17589
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
62 GntBindable * help_window;
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
63
35447
5a8d59fd6c2e Add /*< private >*/ for all padding members in libgnt
Ankit Vani <a@nevitus.org>
parents: 35446
diff changeset
64 /*< private >*/
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
65 void (*gnt_reserved2)(void);
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
66 void (*gnt_reserved3)(void);
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
67 void (*gnt_reserved4)(void);
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
68 };
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
69
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
70 G_BEGIN_DECLS
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
71
35379
ea1a0327001e Rename _get_gtype() functions in libgnt to _get_type()
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
72 GType gnt_bindable_get_type(void);
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
73
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
74 /******************/
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
75 /* Key Remaps */
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
76 /******************/
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
77 const char * gnt_bindable_remap_keys(GntBindable *bindable, const char *text);
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
78
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
79 /******************/
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
80 /* Bindable Actions */
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
81 /******************/
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
82 typedef gboolean (*GntBindableActionCallback) (GntBindable *bindable, GList *params);
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
83 typedef gboolean (*GntBindableActionCallbackNoParam)(GntBindable *bindable);
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
84
15991
1efb6bd8ba3f Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15886
diff changeset
85 typedef struct _GntBindableAction GntBindableAction;
1efb6bd8ba3f Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15886
diff changeset
86 typedef struct _GntBindableActionParam GntBindableActionParam;
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
87
15991
1efb6bd8ba3f Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15886
diff changeset
88 struct _GntBindableAction
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
89 {
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
90 char *name; /* The name of the action */
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
91 union {
37080
fbb8840b1d71 Revert changes to libgnt/*.h from the prev commit
Ankit Vani <a@nevitus.org>
parents: 37079
diff changeset
92 gboolean (*action)(GntBindable *bindable, GList *params);
fbb8840b1d71 Revert changes to libgnt/*.h from the prev commit
Ankit Vani <a@nevitus.org>
parents: 37079
diff changeset
93 gboolean (*action_noparam)(GntBindable *bindable);
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
94 } u;
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
95 };
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
96
15991
1efb6bd8ba3f Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15886
diff changeset
97 struct _GntBindableActionParam
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
98 {
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
99 GntBindableAction *action;
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
100 GList *list;
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
101 };
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
102
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
103 /*GntBindableAction *gnt_bindable_action_parse(const char *name);*/
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
104
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
105 /**
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
106 * gnt_bindable_action_free:
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
107 * @action: The bindable action.
20198
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
108 *
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
109 * Free a bindable action.
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
110 */
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
111 void gnt_bindable_action_free(GntBindableAction *action);
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
112
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
113 /**
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
114 * gnt_bindable_action_param_free:
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
115 * @param: The GntBindableActionParam to free.
20198
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
116 *
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
117 * Free a GntBindableActionParam.
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
118 */
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
119 void gnt_bindable_action_param_free(GntBindableActionParam *param);
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
120
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
121 /**
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
122 * gnt_bindable_class_register_action:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
123 * @klass: The class the binding is for.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
124 * @name: The name of the binding.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
125 * @callback: The callback for the binding.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
126 * @trigger: The default trigger for the binding, or %NULL, followed by a NULL-terminated
20198
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
127 * list of default parameters.
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
128 *
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
129 * Register a bindable action for a class.
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
130 */
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
131 void gnt_bindable_class_register_action(GntBindableClass *klass, const char *name, GntBindableActionCallback callback, const char *trigger, ...);
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
132
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
133 /**
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
134 * gnt_bindable_register_binding:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
135 * @klass: The class the binding is for.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
136 * @name: The name of the binding.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
137 * @trigger: A new trigger for the binding, followed by a %NULL-terminated list of parameters for the callback.
20198
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
138 *
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
139 * Register a key-binding to an existing action.
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
140 */
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
141 void gnt_bindable_register_binding(GntBindableClass *klass, const char *name, const char *trigger, ...);
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
142
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
143 /**
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
144 * gnt_bindable_perform_action_key:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
145 * @bindable: The bindable object.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
146 * @keys: The key to trigger the action.
20198
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
147 *
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
148 * Perform an action from a keybinding.
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
149 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
150 * Returns: %TRUE if the action was performed successfully, %FALSE otherwise.
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
151 */
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
152 gboolean gnt_bindable_perform_action_key(GntBindable *bindable, const char *keys);
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
153
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
154 /**
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
155 * gnt_bindable_check_key:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
156 * @bindable: The bindable object.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
157 * @keys: The key to check for.
23064
1a35c6029964 Check if a key is already bound before assigning a menu trigger
Richard Nelson <wabz@pidgin.im>
parents: 20293
diff changeset
158 *
1a35c6029964 Check if a key is already bound before assigning a menu trigger
Richard Nelson <wabz@pidgin.im>
parents: 20293
diff changeset
159 * Discover if a key is bound.
1a35c6029964 Check if a key is already bound before assigning a menu trigger
Richard Nelson <wabz@pidgin.im>
parents: 20293
diff changeset
160 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
161 * Returns: %TRUE if the the key has an action associated with it.
23064
1a35c6029964 Check if a key is already bound before assigning a menu trigger
Richard Nelson <wabz@pidgin.im>
parents: 20293
diff changeset
162 */
1a35c6029964 Check if a key is already bound before assigning a menu trigger
Richard Nelson <wabz@pidgin.im>
parents: 20293
diff changeset
163 gboolean gnt_bindable_check_key(GntBindable *bindable, const char *keys);
1a35c6029964 Check if a key is already bound before assigning a menu trigger
Richard Nelson <wabz@pidgin.im>
parents: 20293
diff changeset
164
1a35c6029964 Check if a key is already bound before assigning a menu trigger
Richard Nelson <wabz@pidgin.im>
parents: 20293
diff changeset
165 /**
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
166 * gnt_bindable_perform_action_named:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
167 * @bindable: The bindable object.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
168 * @name: The action to perform, followed by a %NULL-terminated list of parameters.
20198
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
169 *
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
170 * Perform an action on a bindable object.
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
171 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
172 * Returns: %TRUE if the action was performed successfully, %FALSE otherwise.
17586
5beb8d987e84 applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 16362
diff changeset
173 */
28631
d0b410479721 Add missing null sentinels, and help the compiler catch such errors.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 23064
diff changeset
174 gboolean gnt_bindable_perform_action_named(GntBindable *bindable, const char *name, ...) G_GNUC_NULL_TERMINATED;
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
175
17589
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
176 /**
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
177 * gnt_bindable_bindings_view:
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
178 * @bind: The object to list the bindings for.
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20198
diff changeset
179 *
20198
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
180 * Returns a GntTree populated with "key" -> "binding" for the widget.
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20198
diff changeset
181 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
182 * Returns: The GntTree.
20198
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
183 */
17589
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
184 GntBindable * gnt_bindable_bindings_view(GntBindable *bind);
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
185
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
186 /**
35408
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
187 * gnt_bindable_build_help_window:
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
188 * @bindable: The object to list the bindings for.
5f7ccec14f33 Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
189 *
20198
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
190 * Builds a window that list the key bindings for a GntBindable object.
90ae53934c28 applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
191 * From this window a user can select a listing to rebind a new key for the given action.
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20198
diff changeset
192 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 31293
diff changeset
193 * Returns: %TRUE
17589
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
194 */
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
195
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
196 gboolean gnt_bindable_build_help_window(GntBindable *bindable);
193d380e5261 Moved rebinding functionality into GntBindable.
Eric Polino <aluink@pidgin.im>
parents: 17586
diff changeset
197
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
198 G_END_DECLS
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
199
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
200 #endif /* GNT_BINDABLE_H */
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
201

mercurial