~muktupavels/metacity/adwaita-icon-theme-lp-1414613

« back to all changes in this revision

Viewing changes to src/metaaccellabel.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-10-03 22:44:28 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20051003224428-ft31gkmz12qpzohj
Tags: 1:2.12.1-0ubuntu1
* New upstream release:
  - Thanks to Ray Strode, Havoc Pennington, and Elijah Newren for
    improvements in this release.
  - Truncate ridiculously long titles to avoid crashing or letting the
    pager crash (Ray, Havoc, Elijah) [#315070] (Ubuntu: #15995)
  - Get the tabbing window outline to work with gtk+ 2.8.4 again
    (Elijah) [#317528] (Ubuntu: #16589)
  - Translations: Mahay Alam Khan (bn), Francisco Javier F. Serrador (es), 
    Ivar Smolin (et), I\uffffaki Larra\uffffaga Murgoitio (eu), Luca 
    Ferretti (it), Christian Rose (sv), Clytie Siddall (vi), Funda 
    Wang (zh_CN)
* debian/control.in:
  - Bumped Standards-Version.
* debian/patches/003_bordersdrawingfix.patch:
  - dropped, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
5
 *
 
6
 * MetaAccelLabel: GtkLabel with accelerator monitoring facilities.
 
7
 * Copyright (C) 1998 Tim Janik
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 *
 
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.
 
23
 */
 
24
 
 
25
/*
 
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/.
 
30
 */
 
31
 
 
32
#ifndef __META_ACCEL_LABEL_H__
 
33
#define __META_ACCEL_LABEL_H__
 
34
 
 
35
#include <gtk/gtklabel.h>
 
36
#include "common.h"
 
37
 
 
38
#ifdef __cplusplus
 
39
extern "C" {
 
40
#endif /* __cplusplus */
 
41
 
 
42
 
 
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))
 
49
 
 
50
 
 
51
typedef struct _MetaAccelLabel      MetaAccelLabel;
 
52
typedef struct _MetaAccelLabelClass  MetaAccelLabelClass;
 
53
 
 
54
struct _MetaAccelLabel
 
55
{
 
56
  GtkLabel label;
 
57
 
 
58
  MetaVirtualModifier accel_mods;
 
59
  guint accel_key;
 
60
  guint accel_padding;
 
61
  gchar *accel_string;
 
62
  guint16 accel_string_width;
 
63
};
 
64
 
 
65
struct _MetaAccelLabelClass
 
66
{
 
67
  GtkLabelClass  parent_class;
 
68
 
 
69
  gchar         *signal_quote1;
 
70
  gchar         *signal_quote2;
 
71
  gchar         *mod_name_shift;
 
72
  gchar         *mod_name_control;
 
73
  gchar         *mod_name_alt;
 
74
  gchar         *mod_name_meta;
 
75
  gchar         *mod_name_super;
 
76
  gchar         *mod_name_hyper;
 
77
  gchar         *mod_name_mod2;
 
78
  gchar         *mod_name_mod3;
 
79
  gchar         *mod_name_mod4;
 
80
  gchar         *mod_name_mod5;
 
81
  gchar         *mod_separator;
 
82
  gchar         *accel_seperator;
 
83
  guint          latin1_to_char : 1;
 
84
 
 
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);
 
90
};
 
91
 
 
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);
 
97
 
 
98
 
 
99
#ifdef __cplusplus
 
100
}
 
101
#endif /* __cplusplus */
 
102
 
 
103
 
 
104
#endif /* __META_ACCEL_LABEL_H__ */