metaaccellabel.h

Go to the documentation of this file.
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
00002 
00003 /* Metacity hacked-up GtkAccelLabel */
00004 /* Copyright (C) 2002 Red Hat, Inc. */
00005 /* GTK - The GIMP Toolkit
00006  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
00007  *
00008  * MetaAccelLabel: GtkLabel with accelerator monitoring facilities.
00009  * Copyright (C) 1998 Tim Janik
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Lesser General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this library; if not, write to the
00023  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00024  * Boston, MA 02111-1307, USA.
00025  */
00026 
00027 /*
00028  * Modified by the GTK+ Team and others 1997-2001.  See the AUTHORS
00029  * file for a list of people on the GTK+ Team.  See the ChangeLog
00030  * files for a list of changes.  These files are distributed with
00031  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
00032  */
00033 
00034 #ifndef __META_ACCEL_LABEL_H__
00035 #define __META_ACCEL_LABEL_H__
00036 
00037 #include <gtk/gtklabel.h>
00038 #include "common.h"
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif /* __cplusplus */
00043 
00044 
00045 #define META_TYPE_ACCEL_LABEL           (meta_accel_label_get_type ())
00046 #define META_ACCEL_LABEL(obj)           (GTK_CHECK_CAST ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabel))
00047 #define META_ACCEL_LABEL_CLASS(klass)   (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
00048 #define META_IS_ACCEL_LABEL(obj)         (GTK_CHECK_TYPE ((obj), META_TYPE_ACCEL_LABEL))
00049 #define META_IS_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_ACCEL_LABEL))
00050 #define META_ACCEL_LABEL_GET_CLASS(obj)  (GTK_CHECK_GET_CLASS ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
00051 
00052 
00053 typedef struct _MetaAccelLabel      MetaAccelLabel;
00054 typedef struct _MetaAccelLabelClass  MetaAccelLabelClass;
00055 
00056 struct _MetaAccelLabel
00057 {
00058   GtkLabel label;
00059 
00060   MetaVirtualModifier accel_mods;
00061   guint accel_key;
00062   guint accel_padding;
00063   gchar *accel_string;
00064   guint16 accel_string_width;
00065 };
00066 
00067 struct _MetaAccelLabelClass
00068 {
00069   GtkLabelClass  parent_class;
00070 
00071   gchar         *signal_quote1;
00072   gchar         *signal_quote2;
00073   gchar         *mod_name_shift;
00074   gchar         *mod_name_control;
00075   gchar         *mod_name_alt;
00076   gchar         *mod_name_meta;
00077   gchar         *mod_name_super;
00078   gchar         *mod_name_hyper;
00079   gchar         *mod_name_mod2;
00080   gchar         *mod_name_mod3;
00081   gchar         *mod_name_mod4;
00082   gchar         *mod_name_mod5;
00083   gchar         *mod_separator;
00084   gchar         *accel_seperator;
00085   guint          latin1_to_char : 1;
00086 
00087   /* Padding for future expansion */
00088   void (*_gtk_reserved1) (void);
00089   void (*_gtk_reserved2) (void);
00090   void (*_gtk_reserved3) (void);
00091   void (*_gtk_reserved4) (void);
00092 };
00093 
00094 GtkType    meta_accel_label_get_type          (void) G_GNUC_CONST;
00095 GtkWidget* meta_accel_label_new_with_mnemonic (const gchar            *string);
00096 void       meta_accel_label_set_accelerator   (MetaAccelLabel         *accel_label,
00097                                                guint                   accelerator_key,
00098                                                MetaVirtualModifier     accelerator_mods);
00099 
00100 
00101 #ifdef __cplusplus
00102 }
00103 #endif /* __cplusplus */
00104 
00105 
00106 #endif /* __META_ACCEL_LABEL_H__ */

Generated on Sat Aug 23 22:04:18 2008 for metacity by  doxygen 1.5.5