grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / classes / zune / betterstring / mcc / hotkeystring / private.h
blob5176c727e696a95d5c4c29c2932d0d5c6291c1cf
1 /***************************************************************************
3 BetterString.mcc - A better String gadget MUI Custom Class
4 Copyright (C) 1997-2000 Allan Odgaard
5 Copyright (C) 2005-2013 by BetterString.mcc Open Source Team
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 BetterString class Support Site: http://www.sf.net/projects/bstring-mcc/
19 $Id$
21 ***************************************************************************/
23 #ifndef HOTKEYSTRING_MCC_PRIV_H
24 #define HOTKEYSTRING_MCC_PRIV_H
26 #include <libraries/mui.h>
28 #include <muiextra.h>
29 #include <mcc_common.h>
31 #include <mui/HotkeyString_mcc.h>
32 #include <mui/BetterString_mcc.h>
33 #include "Debug.h"
35 struct InstData
37 ULONG Flags;
38 struct MUI_EventHandlerNode EventNode;
41 #define FLG_Active (1<<0)
42 #define FLG_Backspace (1<<1)
43 #define FLG_Snoop (1<<2)
45 // proper RAWKEY_ defines were first introduced in OS4 and MorphOS
46 // and unfortunately they are also a bit different, so lets
47 // prepare an alternate table for it
48 #if defined(__amigaos4__)
49 #include <proto/keymap.h>
51 #define RAWKEY_SCRLOCK RAWKEY_MENU
52 #define RAWKEY_NUMLOCK 0x79
54 #elif defined(__MORPHOS__)
55 #include <devices/rawkeycodes.h>
57 #define RAWKEY_CRSRUP RAWKEY_UP
58 #define RAWKEY_CRSRDOWN RAWKEY_DOWN
59 #define RAWKEY_CRSRRIGHT RAWKEY_RIGHT
60 #define RAWKEY_CRSRLEFT RAWKEY_LEFT
61 #define RAWKEY_PRINTSCR RAWKEY_PRTSCREEN
62 #define RAWKEY_BREAK RAWKEY_PAUSE
64 #define RAWKEY_AUD_STOP RAWKEY_CDTV_STOP
65 #define RAWKEY_AUD_PLAY_PAUSE RAWKEY_CDTV_PLAY
66 #define RAWKEY_AUD_PREV_TRACK RAWKEY_CDTV_PREV
67 #define RAWKEY_AUD_NEXT_TRACK RAWKEY_CDTV_NEXT
68 #define RAWKEY_AUD_SHUFFLE RAWKEY_CDTV_REW
69 #define RAWKEY_AUD_REPEAT RAWKEY_CDTV_FF
71 #else
73 #define RAWKEY_BACKSPACE 0x41
74 #define RAWKEY_TAB 0x42
75 #define RAWKEY_DEL 0x46
76 #define RAWKEY_INSERT 0x47 /* Not on classic keyboards */
77 #define RAWKEY_PAGEUP 0x48 /* Not on classic keyboards */
78 #define RAWKEY_PAGEDOWN 0x49 /* Not on classic keyboards */
79 #define RAWKEY_F11 0x4B /* Not on classic keyboards */
80 #define RAWKEY_CRSRUP 0x4C
81 #define RAWKEY_CRSRDOWN 0x4D
82 #define RAWKEY_CRSRRIGHT 0x4E
83 #define RAWKEY_CRSRLEFT 0x4F
84 #define RAWKEY_F1 0x50
85 #define RAWKEY_F2 0x51
86 #define RAWKEY_F3 0x52
87 #define RAWKEY_F4 0x53
88 #define RAWKEY_F5 0x54
89 #define RAWKEY_F6 0x55
90 #define RAWKEY_F7 0x56
91 #define RAWKEY_F8 0x57
92 #define RAWKEY_F9 0x58
93 #define RAWKEY_F10 0x59
94 #define RAWKEY_HELP 0x5F
95 #define RAWKEY_SCRLOCK 0x6B /* Not on classic keyboards */
96 #define RAWKEY_PRINTSCR 0x6D /* Not on classic keyboards */
97 #define RAWKEY_BREAK 0x6E /* Not on classic keyboards */
98 #define RAWKEY_F12 0x6F /* Not on classic keyboards */
99 #define RAWKEY_HOME 0x70 /* Not on classic keyboards */
100 #define RAWKEY_END 0x71 /* Not on classic keyboards */
102 #define RAWKEY_AUD_STOP 0x72
103 #define RAWKEY_AUD_PLAY_PAUSE 0x73
104 #define RAWKEY_AUD_PREV_TRACK 0x74
105 #define RAWKEY_AUD_NEXT_TRACK 0x75
106 #define RAWKEY_AUD_SHUFFLE 0x76
107 #define RAWKEY_AUD_REPEAT 0x77
109 #define RAWKEY_NUMLOCK 0x79
111 #endif
113 // prototypes
114 IPTR HandleInput(struct IClass *cl, Object *obj, struct MUIP_HandleEvent *msg);
116 #define setFlag(mask, flag) (mask) |= (flag)
117 #define clearFlag(mask, flag) (mask) &= ~(flag)
118 #define isFlagSet(mask, flag) (((mask) & (flag)) == (flag))
119 #define isFlagClear(mask, flag) (((mask) & (flag)) == 0)
121 #endif /* HOTKEYSTRING_MCC_PRIV_H */