00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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,
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