missing NULL terminator in set_config_x
[geda-gaf.git] / gschem / include / gschem_accel_label.h
blob2fedb15f015306dd04cb4d11cf309a3326781917
1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2020 gEDA Contributors (see ChangeLog for details)
5 * Code based on GTK 2.14.5 gtk/gtkaccellabel.h (LGPL)
7 * GTK - The GIMP Toolkit
8 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
10 * GschemAccelLabel: GtkLabel with accelerator monitoring facilities.
11 * Copyright (C) 1998 Tim Janik
13 * Modified by the GTK+ Team and others 1997-2001. See the AUTHORS
14 * file for a list of people on the GTK+ Team. See the ChangeLog
15 * files for a list of changes. These files are distributed with
16 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
18 * Adapted for gEDA by Peter Clifton <pcjc2@cam.ac.uk>
20 * THIS FILE IS LGPL LICENSED, gEDA AS A WHOLE IS GPL LICENSED
22 * This library is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU Lesser General Public
24 * License as published by the Free Software Foundation; either
25 * version 2 of the License, or (at your option) any later version.
27 * This library is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 * Lesser General Public License for more details.
32 * You should have received a copy of the GNU Library General Public
33 * License along with this library; if not, write to the
34 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
35 * Boston, MA 02110-1301 USA
38 #ifndef __GSCHEM_ACCEL_LABEL_H__
39 #define __GSCHEM_ACCEL_LABEL_H__
41 G_BEGIN_DECLS
43 #define GSCHEM_TYPE_ACCEL_LABEL (gschem_accel_label_get_type ())
44 #define GSCHEM_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSCHEM_TYPE_ACCEL_LABEL, GschemAccelLabel))
45 #define GSCHEM_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSCHEM_TYPE_ACCEL_LABEL, GschemAccelLabelClass))
46 #define GSCHEM_IS_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSCHEM_TYPE_ACCEL_LABEL))
47 #define GSCHEM_IS_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSCHEM_TYPE_ACCEL_LABEL))
48 #define GSCHEM_ACCEL_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSCHEM_TYPE_ACCEL_LABEL, GschemAccelLabelClass))
51 typedef struct _GschemAccelLabel GschemAccelLabel;
52 typedef struct _GschemAccelLabelClass GschemAccelLabelClass;
54 struct _GschemAccelLabel
56 GtkAccelLabel label;
58 guint accel_padding;
59 gchar *accel_string;
60 guint16 accel_string_width;
63 struct _GschemAccelLabelClass
65 GtkAccelLabelClass parent_class;
69 GType gschem_accel_label_get_type (void) G_GNUC_CONST;
70 GtkWidget* gschem_accel_label_new (const gchar *string);
71 guint gschem_accel_label_get_accel_width (GschemAccelLabel *accel_label);
72 void gschem_accel_label_set_accel_string (GschemAccelLabel *accel_label,
73 const gchar *accel_string);
74 gboolean gschem_accel_label_refetch (GschemAccelLabel *accel_label);
76 /* private */
77 gchar * _gschem_accel_label_class_get_accelerator_label (GschemAccelLabelClass *klass,
78 guint accelerator_key,
79 GdkModifierType accelerator_mods);
81 G_END_DECLS
83 #endif /* __GSCHEM_ACCEL_LABEL_H__ */