1
/* gtkcellrendererkeybinding.h
2
* Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
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.
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.
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.
20
#ifndef __EGG_CELL_RENDERER_KEYS_H__
21
#define __EGG_CELL_RENDERER_KEYS_H__
24
#include "eggaccelerators.h"
28
#define EGG_TYPE_CELL_RENDERER_KEYS (egg_cell_renderer_keys_get_type ())
29
#define EGG_CELL_RENDERER_KEYS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeys))
30
#define EGG_CELL_RENDERER_KEYS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass))
31
#define EGG_IS_CELL_RENDERER_KEYS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_CELL_RENDERER_KEYS))
32
#define EGG_IS_CELL_RENDERER_KEYS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_CELL_RENDERER_KEYS))
33
#define EGG_CELL_RENDERER_KEYS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass))
35
typedef struct _EggCellRendererKeys EggCellRendererKeys;
36
typedef struct _EggCellRendererKeysClass EggCellRendererKeysClass;
41
EGG_CELL_RENDERER_KEYS_MODE_GTK,
42
EGG_CELL_RENDERER_KEYS_MODE_X
43
} EggCellRendererKeysMode;
45
struct _EggCellRendererKeys
47
GtkCellRendererText parent;
50
EggVirtualModifierType accel_mask;
51
GtkWidget *edit_widget;
52
GtkWidget *grab_widget;
54
GtkWidget *sizing_label;
55
EggCellRendererKeysMode accel_mode;
58
struct _EggCellRendererKeysClass
60
GtkCellRendererTextClass parent_class;
62
void (* accel_edited) (EggCellRendererKeys *keys,
63
const char *path_string,
65
EggVirtualModifierType mask,
66
guint hardware_keycode);
68
void (* accel_cleared) (EggCellRendererKeys *keys,
69
const char *path_string);
72
GType egg_cell_renderer_keys_get_type (void);
73
GtkCellRenderer *egg_cell_renderer_keys_new (void);
75
void egg_cell_renderer_keys_set_accelerator (EggCellRendererKeys *keys,
78
EggVirtualModifierType mask);
79
void egg_cell_renderer_keys_get_accelerator (EggCellRendererKeys *keys,
81
EggVirtualModifierType *mask);
82
void egg_cell_renderer_keys_set_accel_mode (EggCellRendererKeys *keys,
83
EggCellRendererKeysMode accel_mode);
89
#endif /* __GTK_CELL_RENDERER_KEYS_H__ */