![]() |
Libmacro
0.2
Libmacro is an extensible macro and hotkey library.
|
mcr_ModFlags - Flag enumeration for modifiers More...
#include "mcr/base/types.h"Go to the source code of this file.
Enumerations | |
| enum | mcr_ModFlags { MCR_MF_NONE = 0, MCR_ALT = 1, MCR_OPTION = 1, MCR_ALTGR = 1 << 1, MCR_AMIGA = 1 << 2, MCR_CMD = 1 << 3, MCR_CODE = 1 << 4, MCR_COMPOSE = 1 << 5, MCR_CTRL = 1 << 6, MCR_FN = 1 << 7, MCR_FRONT = 1 << 8, MCR_GRAPH = 1 << 9, MCR_HYPER = 1 << 10, MCR_META = 1 << 11, MCR_SHIFT = 1 << 12, MCR_SUPER = 1 << 13, MCR_SYMBOL = 1 << 14, MCR_TOP = 1 << 15, MCR_WIN = 1 << 16, MCR_MF_USER = MCR_WIN << 1 } |
Functions | |
| MCR_API unsigned int | mcr_ModFlags_combine (const unsigned int *modsArray, size_t length) |
| MCR_API unsigned int | mcr_ModFlags_add (unsigned int mods, unsigned int newMod) |
| MCR_API bool | mcr_ModFlags_has (unsigned int mods, unsigned int modVal) |
| MCR_API unsigned int | mcr_ModFlags_remove (unsigned int mods, unsigned int delMod) |
mcr_ModFlags - Flag enumeration for modifiers
Definition in file mod_flags.h.
| enum mcr_ModFlags |
Enumeration for known and historical modifiers.
To emulate how an operating system combines the names of some modifiers, the names of those modifiers will map to the same value.
Some of these are actually hardware switches, depending on the keyboard. If relying on keyboard or key codes to set modifiers, some may never be used.
These values may change. Other values may also be defined in other modules.
| Enumerator | |
|---|---|
| MCR_MF_NONE | Interpreted as no modifiers |
Definition at line 42 of file mod_flags.h.
| MCR_API unsigned int mcr_ModFlags_add | ( | unsigned int | mods, |
| unsigned int | newMod | ||
| ) |
Combine two flags
| mods | First set of flags |
| newMod | Additional set of flags |
| MCR_API unsigned int mcr_ModFlags_combine | ( | const unsigned int * | modsArray, |
| size_t | length | ||
| ) |
Combine an array of flags
| modsArray | opt Array of flags |
| length | Number of flags to combine |
| MCR_API bool mcr_ModFlags_has | ( | unsigned int | mods, |
| unsigned int | modVal | ||
| ) |
True if flags contain a set of other flags
| mods | Current set of flags |
| modVal | Flags to be contained or not |
| MCR_API unsigned int mcr_ModFlags_remove | ( | unsigned int | mods, |
| unsigned int | delMod | ||
| ) |
Remove one set of flags from another
| mods | Current set of flags |
| delMod | Flags to remove |