~ubuntu-branches/ubuntu/karmic/sugar-toolkit/karmic

« back to all changes in this revision

Viewing changes to sugar/eggaccelerators.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-08-07 19:43:09 UTC
  • mfrom: (0.1.2 lenny) (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080807194309-03302c4lj0j0ipze
Tags: 0.82.0-1
* New upstream release.
* Unfuzz patch 2991.
* Add DEB_MAINTAINER_MODE in debian/rules (thanks to Romain Beauxis).
* Update copyright-hints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* eggaccelerators.h
2
 
 * Copyright (C) 2002  Red Hat, Inc.
3
 
 * Developed by Havoc Pennington
4
 
 *
5
 
 * This library is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU Library General Public
7
 
 * License as published by the Free Software Foundation; either
8
 
 * version 2 of the License, or (at your option) any later version.
9
 
 *
10
 
 * This library is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 
 * Library General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU Library General Public
16
 
 * License along with this library; if not, write to the
17
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
 
 * Boston, MA 02111-1307, USA.
19
 
 */
20
 
 
21
 
#ifndef __EGG_ACCELERATORS_H__
22
 
#define __EGG_ACCELERATORS_H__
23
 
 
24
 
#include <gtk/gtkaccelgroup.h>
25
 
#include <gdk/gdk.h>
26
 
 
27
 
G_BEGIN_DECLS
28
 
 
29
 
/* Where a value is also in GdkModifierType we coincide,
30
 
 * otherwise we don't overlap.
31
 
 */
32
 
typedef enum
33
 
{
34
 
  EGG_VIRTUAL_SHIFT_MASK    = 1 << 0,
35
 
  EGG_VIRTUAL_LOCK_MASK     = 1 << 1,
36
 
  EGG_VIRTUAL_CONTROL_MASK  = 1 << 2,
37
 
 
38
 
  EGG_VIRTUAL_ALT_MASK      = 1 << 3, /* fixed as Mod1 */
39
 
  
40
 
  EGG_VIRTUAL_MOD2_MASK     = 1 << 4,
41
 
  EGG_VIRTUAL_MOD3_MASK     = 1 << 5,
42
 
  EGG_VIRTUAL_MOD4_MASK     = 1 << 6,
43
 
  EGG_VIRTUAL_MOD5_MASK     = 1 << 7,
44
 
 
45
 
#if 0
46
 
  GDK_BUTTON1_MASK  = 1 << 8,
47
 
  GDK_BUTTON2_MASK  = 1 << 9,
48
 
  GDK_BUTTON3_MASK  = 1 << 10,
49
 
  GDK_BUTTON4_MASK  = 1 << 11,
50
 
  GDK_BUTTON5_MASK  = 1 << 12,
51
 
  /* 13, 14 are used by Xkb for the keyboard group */
52
 
#endif
53
 
  
54
 
  EGG_VIRTUAL_META_MASK = 1 << 24,
55
 
  EGG_VIRTUAL_SUPER_MASK = 1 << 25,
56
 
  EGG_VIRTUAL_HYPER_MASK = 1 << 26,
57
 
  EGG_VIRTUAL_MODE_SWITCH_MASK = 1 << 27, 
58
 
  EGG_VIRTUAL_NUM_LOCK_MASK = 1 << 28,
59
 
  EGG_VIRTUAL_SCROLL_LOCK_MASK = 1 << 29,
60
 
 
61
 
  /* Also in GdkModifierType */
62
 
  EGG_VIRTUAL_RELEASE_MASK  = 1 << 30,
63
 
 
64
 
  /*     28-31 24-27 20-23 16-19 12-15 8-11 4-7 0-3
65
 
   *       7     f     0     0     0    0    f   f
66
 
   */  
67
 
  EGG_VIRTUAL_MODIFIER_MASK = 0x7f0000ff
68
 
 
69
 
} EggVirtualModifierType;
70
 
 
71
 
gboolean egg_accelerator_parse_virtual        (const gchar            *accelerator,
72
 
                                               guint                  *accelerator_key,
73
 
                                               guint                  *keycode,
74
 
                                               EggVirtualModifierType *accelerator_mods);
75
 
void     egg_keymap_resolve_virtual_modifiers (GdkKeymap              *keymap,
76
 
                                               EggVirtualModifierType  virtual_mods,
77
 
                                               GdkModifierType        *concrete_mods);
78
 
void     egg_keymap_virtualize_modifiers      (GdkKeymap              *keymap,
79
 
                                               GdkModifierType         concrete_mods,
80
 
                                               EggVirtualModifierType *virtual_mods);
81
 
 
82
 
gchar* egg_virtual_accelerator_name (guint                  accelerator_key,
83
 
                                     guint                  keycode,
84
 
                                     EggVirtualModifierType accelerator_mods);
85
 
 
86
 
G_END_DECLS
87
 
 
88
 
 
89
 
#endif /* __EGG_ACCELERATORS_H__ */