1
/* Metacity hacked-up GtkAccelLabel */
2
/* Copyright (C) 2002 Red Hat, Inc. */
3
/* GTK - The GIMP Toolkit
4
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
6
* MetaAccelLabel: GtkLabel with accelerator monitoring facilities.
7
* Copyright (C) 1998 Tim Janik
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 2 of the License, or (at your option) any later version.
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the
21
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22
* Boston, MA 02111-1307, USA.
26
* Modified by the GTK+ Team and others 1997-2001. See the AUTHORS
27
* file for a list of people on the GTK+ Team. See the ChangeLog
28
* files for a list of changes. These files are distributed with
29
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
32
#ifndef __META_ACCEL_LABEL_H__
33
#define __META_ACCEL_LABEL_H__
35
#include <gtk/gtklabel.h>
40
#endif /* __cplusplus */
43
#define META_TYPE_ACCEL_LABEL (meta_accel_label_get_type ())
44
#define META_ACCEL_LABEL(obj) (GTK_CHECK_CAST ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabel))
45
#define META_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
46
#define META_IS_ACCEL_LABEL(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_ACCEL_LABEL))
47
#define META_IS_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_ACCEL_LABEL))
48
#define META_ACCEL_LABEL_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
51
typedef struct _MetaAccelLabel MetaAccelLabel;
52
typedef struct _MetaAccelLabelClass MetaAccelLabelClass;
54
struct _MetaAccelLabel
58
MetaVirtualModifier accel_mods;
62
guint16 accel_string_width;
65
struct _MetaAccelLabelClass
67
GtkLabelClass parent_class;
71
gchar *mod_name_shift;
72
gchar *mod_name_control;
75
gchar *mod_name_super;
76
gchar *mod_name_hyper;
82
gchar *accel_seperator;
83
guint latin1_to_char : 1;
85
/* Padding for future expansion */
86
void (*_gtk_reserved1) (void);
87
void (*_gtk_reserved2) (void);
88
void (*_gtk_reserved3) (void);
89
void (*_gtk_reserved4) (void);
92
GtkType meta_accel_label_get_type (void) G_GNUC_CONST;
93
GtkWidget* meta_accel_label_new_with_mnemonic (const gchar *string);
94
void meta_accel_label_set_accelerator (MetaAccelLabel *accel_label,
95
guint accelerator_key,
96
MetaVirtualModifier accelerator_mods);
101
#endif /* __cplusplus */
104
#endif /* __META_ACCEL_LABEL_H__ */