Libmacro  0.2
Libmacro is an extensible macro and hotkey library.
key.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 
23 #ifndef MCR_STANDARD_KEY_H_
24 #define MCR_STANDARD_KEY_H_
25 
26 #include "mcr/base/base.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
38 struct mcr_Key {
40  int key;
43 };
44 
51 MCR_API int mcr_Key_send(struct mcr_Signal *signalPt);
57 MCR_API int mcr_Key_send_member(struct mcr_Key *dataPt, struct mcr_context *ctx);
58 /* Default allocate, deallocate, init, deinit, compare, and copy */
60 MCR_API int mcr_Key_compare(const void *lhsPt, const void *rhsPt);
61 
63 MCR_API struct mcr_ISignal *mcr_iKey(struct mcr_context *ctx);
65 #define mcr_Key_data(sigPt) \
66 mcr_castpt(struct mcr_Key, mcr_Signal_data(sigPt))
67 
70 //MCR_API unsigned int mcr_Key_modifier(struct mcr_context *ctx, int key);
72 //MCR_API int mcr_Key_modifier_key(struct mcr_context *ctx,
73 // unsigned int modifier);
75 //MCR_API size_t mcr_Key_modifier_count(struct mcr_context *ctx);
77 //MCR_API size_t mcr_Key_modifier_key_count(struct mcr_context *ctx);
79 //MCR_API void mcr_Key_modifier_all(struct mcr_context *ctx,
80 // unsigned int *modBuffer, size_t bufferLength);
82 //MCR_API void mcr_Key_modifier_key_all(struct mcr_context *ctx,
83 // int *keyBuffer, size_t bufferLength);
85 //MCR_API void mcr_Key_modifier_clear(struct mcr_context *ctx);
87 //MCR_API int mcr_Key_modifier_set_key(struct mcr_context *ctx,
88 // unsigned int modifiers, int key);
90 //MCR_API int mcr_Key_modifier_add(struct mcr_context *ctx,
91 // unsigned int modifiers,
92 // int key);
94 //MCR_API int mcr_Key_modifier_map(struct mcr_context *ctx,
95 // unsigned int modifiers,
96 // int key, int *addKeys, size_t bufferLen);
98 //MCR_API int mcr_Key_modifier_rekey(struct mcr_context *ctx, int oldKey,
99 // int newKey);
101 //MCR_API int mcr_Key_modifier_remod(struct mcr_context *ctx,
102 // unsigned int modifiers, unsigned int newMods);
104 //MCR_API void mcr_Key_modifier_trim(struct mcr_context *ctx);
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif
enum mcr_ApplyType apply
Definition: key.h:42
int key
Definition: key.h:40
Definition: key.h:38
MCR_API int mcr_Key_send_member(struct mcr_Key *dataPt, struct mcr_context *ctx)
MCR_API struct mcr_ISignal * mcr_iKey(struct mcr_context *ctx)
MCR_API int mcr_Key_compare(const void *lhsPt, const void *rhsPt)
MCR_API int mcr_Key_send(struct mcr_Signal *signalPt)
Simulate keyboard keys.
Base module implements mcr_base - Libmacro first module.
mcr_ApplyType
Definition: types.h:160