minor fix for gui-less building
[drnoksnes] / gui / cellrendererkey.h
1 /* gtkcellrendererkeybinding.h
2  * Copyright (C) 2000  Red Hat, Inc.,  Jonathan Blandford <jrb@redhat.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __CELL_RENDERER_KEY_H__
21 #define __CELL_RENDERER_KEY_H__
22
23 #include <gtk/gtkcellrenderertext.h>
24
25 G_BEGIN_DECLS
26
27 #define TYPE_CELL_RENDERER_KEY          (cell_renderer_key_get_type ())
28 #define CELL_RENDERER_KEY(obj)          (GTK_CHECK_CAST ((obj), TYPE_CELL_RENDERER_KEY, CellRendererKey))
29 #define CELL_RENDERER_KEY_CLASS(klass)  (GTK_CHECK_CLASS_CAST ((klass), TYPE_CELL_RENDERER_KEY, CellRendererKeyClass))
30 #define IS_CELL_RENDERER_KEY(obj)               (GTK_CHECK_TYPE ((obj), TYPE_CELL_RENDERER_KEY))
31 #define IS_CELL_RENDERER_KEY_CLASS(klass)       (GTK_CHECK_CLASS_TYPE ((klass), TYPE_CELL_RENDERER_KEY))
32 #define CELL_RENDERER_KEY_GET_CLASS(obj)   (GTK_CHECK_GET_CLASS ((obj), TYPE_CELL_RENDERER_KEY, CellRendererKeyClass))
33
34 typedef struct _CellRendererKey      CellRendererKey;
35 typedef struct _CellRendererKeyClass CellRendererKeyClass;
36
37 struct _CellRendererKey
38 {
39   GtkCellRendererText parent;
40   gint scancode;
41   GtkWidget *edit_widget;
42   GtkWidget *grab_widget;
43   GtkWidget *sizing_label;
44 };
45
46 struct _CellRendererKeyClass
47 {
48   GtkCellRendererTextClass parent_class;
49
50   void (* accel_edited) (CellRendererKey    *keys,
51                          const char             *path_string,
52                          guint                   scancode);
53
54   void (* accel_cleared) (CellRendererKey    *keys,
55                           const char             *path_string);
56 };
57
58 GType            cell_renderer_key_get_type        (void);
59 GtkCellRenderer *cell_renderer_key_new             (void);
60
61 void cell_renderer_key_set_scancode(CellRendererKey * key, gint scancode);
62 gint cell_renderer_key_get_scancode(CellRendererKey * key);
63
64 G_END_DECLS
65
66
67 #endif /* __GTK_CELL_RENDERER_KEYS_H__ */