Libmacro  0.2
Libmacro is an extensible macro and hotkey library.
p_intercept.h
Go to the documentation of this file.
1 /* Libmacro - A multi-platform, extendable macro and hotkey C library
2  Copyright (C) 2013 Jonathan Pelletier, New Paradigm Software
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
24 #ifndef MCR_INTERCEPT_LINUX_P_INTERCEPT_H_
25 #define MCR_INTERCEPT_LINUX_P_INTERCEPT_H_
26 
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
37  struct {
40  size_t grabber_count;
41  };
42  struct {
44  const char * const*grab_paths;
45  size_t grab_path_count;
46  };
47  struct {
49  const struct mcr_MapElement *key_echos[2];
50  size_t key_echo_count[2];
51  };
55  char bit_retrieval[MCR_EVENTINDEX(KEY_CNT) + 1];
56 };
57 
58 /* Use MCR_STANDARD_ECHO_EVENT_DEFAULT_COUNT */
59 #define MCR_INTERCEPT_KEY_ECHO_DEFAULT_COUNT (MCR_STANDARD_ECHO_EVENT_DEFAULT_COUNT / 2)
60 extern MCR_API const struct mcr_MapElement *const mcr_intercept_key_echo_defaults[2];
61 
62 /* All use /dev/input/eventX files to read from */
63 MCR_API int mcr_intercept_set_grabs(struct mcr_context *ctx, const char *const*allGrabPaths, size_t pathCount);
64 MCR_API void mcr_intercept_set_key_echo_map(struct mcr_context *ctx, const struct mcr_MapElement *keyEchos, size_t count, enum mcr_ApplyType applyType);
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif
const char *const * grab_paths
Definition: p_intercept.h:44
char bit_retrieval[MCR_EVENTINDEX(KEY_CNT)+1]
Definition: p_intercept.h:55
Grabber - Take exclusive access to a /dev/input event.
struct mcr_Grabber * grabbers
Definition: p_intercept.h:39
mcr_ApplyType
Definition: types.h:160
const struct mcr_MapElement * key_echos[2]
Definition: p_intercept.h:49