Main Page | Directories | File List | File Members

hn-keys.h

00001 /* 
00002  * This file is part of maemo-af-desktop
00003  *
00004  * Copyright (C) 2006 Nokia Corporation.
00005  *
00006  * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * version 2.1 as published by the Free Software Foundation.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00020  * 02110-1301 USA
00021  *
00022  */
00023 
00024 
00025 #include "hn-wm.h"
00026 
00027 #ifndef HILDON_NAVIGATOR_KEYS_H
00028 #define HILDON_NAVIGATOR_KEYS_H
00029 
00030 #include <gconf/gconf-client.h>
00031 #include <gdk/gdkx.h>
00032 
00033 typedef enum HNKeyAction
00034 {
00035   HN_KEY_ACTION_UNKOWN = 0,
00036   HN_KEY_ACTION_CLOSE,
00037   HN_KEY_ACTION_MINIMIZE,
00038   HN_KEY_ACTION_TASK_SWITCHER,
00039   HN_KEY_ACTION_TASK_LAUNCHER,
00040   HN_KEY_ACTION_POWER,
00041   HN_KEY_ACTION_HOME,           /* Desktop Toggle */
00042   HN_KEY_ACTION_MENU,
00043   HN_KEY_ACTION_FULLSCREEN,
00044   HN_KEY_ACTION_ZOOM_IN,
00045   HN_KEY_ACTION_ZOOM_OUT,
00046 }
00047 HNKeyAction;
00048 
00049 typedef struct HNKeysConfig
00050 {
00051   GConfClient *gconf_client;
00052   gint32       meta_mask, hyper_mask, super_mask, alt_mask, 
00053                mode_mask, numlock_mask, scrolllock_mask, lock_mask;
00054 
00055   GSList      *shortcuts;
00056 } 
00057 HNKeysConfig;
00058 
00059 typedef void (*HNKeysActionFunc) (HNKeysConfig *keys, gpointer *user_data);
00060 
00061 typedef struct HNKeyShortcut
00062 {
00063   HNKeyAction       action;
00064   KeySym            keysym;
00065   KeyCode           keycode;
00066   gint              mod_mask;
00067   gint              index;
00068   HNKeysActionFunc  action_func;
00069   gpointer          action_func_data;
00070 } 
00071 HNKeyShortcut;
00072 
00073 #define HN_KEYS_GCONF_PATH "/system/osso/af/keybindings"
00074 
00075 HNKeysConfig*
00076 hn_keys_init (void);
00077 
00078 void
00079 hn_keys_reload (GdkKeymap *keymap, HNKeysConfig *keys);
00080 
00081 HNKeyShortcut *
00082 hn_keys_handle_keypress (HNKeysConfig *keys, 
00083              KeyCode       keycode, 
00084              guint32       mod_mask);
00085 #endif

Generated on Thu Dec 21 11:26:51 2006 for maemo-af-desktop-documentation by  doxygen 1.4.2