26
25
* ***** END GPL LICENSE BLOCK *****
29
* @file GHOST_ModifierKeys.h
28
/** \file ghost/intern/GHOST_ModifierKeys.h
30
30
* Declaration of GHOST_ModifierKeys struct.
33
#ifndef _GHOST_MODIFIER_KEYS_H_
34
#define _GHOST_MODIFIER_KEYS_H_
33
#ifndef __GHOST_MODIFIERKEYS_H__
34
#define __GHOST_MODIFIERKEYS_H__
36
36
#include "GHOST_Types.h"
58
58
static GHOST_TKey getModifierKeyCode(GHOST_TModifierKeyMask mask);
62
* Returns the state of a single modifier key.
63
* @param mask. Key state to return.
64
* @return The state of the key (pressed == true).
66
virtual bool get(GHOST_TModifierKeyMask mask) const;
69
* Updates the state of a single modifier key.
70
* @param mask. Key state to update.
71
* @param down. The new state of the key.
73
virtual void set(GHOST_TModifierKeyMask mask, bool down);
76
* Sets the state of all modifier keys to up.
62
* Returns the state of a single modifier key.
63
* @param mask. Key state to return.
64
* @return The state of the key (pressed == true).
66
virtual bool get(GHOST_TModifierKeyMask mask) const;
69
* Updates the state of a single modifier key.
70
* @param mask. Key state to update.
71
* @param down. The new state of the key.
73
virtual void set(GHOST_TModifierKeyMask mask, bool down);
76
* Sets the state of all modifier keys to up.
81
81
* Determines whether to modifier key states are equal.
83
83
* @return Indication of equality.
85
85
virtual bool equals(const GHOST_ModifierKeys& keys) const;
87
/** Bitfield that stores the appropriate key state. */
88
GHOST_TUns8 m_LeftShift : 1;
89
/** Bitfield that stores the appropriate key state. */
90
GHOST_TUns8 m_RightShift : 1;
91
/** Bitfield that stores the appropriate key state. */
92
GHOST_TUns8 m_LeftAlt : 1;
93
/** Bitfield that stores the appropriate key state. */
94
GHOST_TUns8 m_RightAlt : 1;
95
/** Bitfield that stores the appropriate key state. */
96
GHOST_TUns8 m_LeftControl : 1;
97
/** Bitfield that stores the appropriate key state. */
98
GHOST_TUns8 m_RightControl : 1;
99
/** Bitfield that stores the appropriate key state. APPLE only! */
100
GHOST_TUns8 m_Command : 1;
87
/** Bitfield that stores the appropriate key state. */
88
GHOST_TUns8 m_LeftShift : 1;
89
/** Bitfield that stores the appropriate key state. */
90
GHOST_TUns8 m_RightShift : 1;
91
/** Bitfield that stores the appropriate key state. */
92
GHOST_TUns8 m_LeftAlt : 1;
93
/** Bitfield that stores the appropriate key state. */
94
GHOST_TUns8 m_RightAlt : 1;
95
/** Bitfield that stores the appropriate key state. */
96
GHOST_TUns8 m_LeftControl : 1;
97
/** Bitfield that stores the appropriate key state. */
98
GHOST_TUns8 m_RightControl : 1;
99
/** Bitfield that stores the appropriate key state. */
100
GHOST_TUns8 m_OS : 1;
103
#endif // _GHOST_MODIFIER_KEYS_H_
103
#endif // __GHOST_MODIFIERKEYS_H__