1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
3
* Copyright (C) 2008 Jens Granseuer <jensgr@gmx.net>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program 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
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
#ifndef __GSD_COMMON_KEYGRAB_H
21
#define __GSD_COMMON_KEYGRAB_H
26
#include <X11/keysym.h>
27
#include <X11/extensions/XInput2.h>
36
GSD_KEYGRAB_NORMAL = 0,
37
GSD_KEYGRAB_ALLOW_UNMODIFIED = 1 << 0,
38
GSD_KEYGRAB_SYNCHRONOUS = 1 << 1
41
void grab_key_unsafe (Key *key,
42
GsdKeygrabFlags flags,
45
void ungrab_key_unsafe (Key *key,
48
gboolean match_xi2_key (Key *key,
49
XIDeviceEvent *event);
51
gboolean key_uses_keycode (const Key *key,
54
Key * parse_key (const char *str);
55
void free_key (Key *key);
57
void grab_button (int deviceid,
63
#endif /* __GSD_COMMON_KEYGRAB_H */