Libmacro  0.2
Libmacro is an extensible macro and hotkey library.
base.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_BASE_BASE_H_
25 #define MCR_BASE_BASE_H_
26 
27 #include "mcr/base/mod_flags.h"
28 #include "mcr/base/iregistry.h"
29 #include "mcr/base/isignal.h"
30 #include "mcr/base/signal.h"
31 #include "mcr/base/dispatch.h"
33 #include "mcr/base/itrigger.h"
34 #include "mcr/base/trigger.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
45 struct mcr_base {
53  struct {
59  };
64 };
65 
72 MCR_API int mcr_send(struct mcr_context *ctx, struct mcr_Signal *signalPt);
73 
75 MCR_API unsigned int *mcr_modifiers(struct mcr_context *ctx);
80 MCR_API void mcr_add_modifiers(struct mcr_context *ctx, unsigned int addMods);
85 MCR_API void mcr_remove_modifiers(struct mcr_context *ctx, unsigned int remMods);
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif
mcr_ITrigger - Interface for triggers
mtx_t dispatch_lock
Definition: base.h:52
mcr_AbsDispatcher
MCR_API unsigned int * mcr_modifiers(struct mcr_context *ctx)
size_t dispatcher_count
Definition: base.h:58
mcr_ISignal - Interface for signals.
mcr_IRegistry Register mcr_Interface instances as id, names, and a reference.
mcr_Signal - Signal to send or dispatch
Related to idispatcher.h.
struct mcr_IDispatcher * generic_dispatcher_pt
Definition: base.h:63
struct mcr_IRegistry * isignal_registry_pt
Definition: base.h:47
struct mcr_IRegistry * itrigger_registry_pt
Definition: base.h:49
mcr_Trigger - Receive dispatch and trigger actions.
MCR_API void mcr_remove_modifiers(struct mcr_context *ctx, unsigned int remMods)
MCR_API int mcr_send(struct mcr_context *ctx, struct mcr_Signal *signalPt)
bool generic_dispatcher_flag
Definition: base.h:61
struct mcr_IDispatcher ** dispatchers
Definition: base.h:55
MCR_API void mcr_add_modifiers(struct mcr_context *ctx, unsigned int addMods)
struct mcr_context * ctx
Definition: idispatcher.h:93
Definition: base.h:45
mcr_ModFlags - Flag enumeration for modifiers