1 #ifndef PIANO_MCC_H 2 #define PIANO_MCC_H 3 4 /* 5 * Piano.mcc 6 * 7 * Copyright © 2015 Antoine Dubourg <tcheko@no-log.org> 8 * All rights reserved. 9 * 10 * $Id: Piano_mcc.h,v 1.1 2015/10/31 10:31:49 tcheko Exp $ 11 */ 12 13 #ifndef EXEC_TYPES_H 14 #include <exec/types.h> 15 #endif 16 17 #pragma pack(2) 18 19 #define MUIC_Piano "Piano.mcc" 20 #define PianoObject MUI_NewObject(MUIC_Piano 21 22 /* Attributes */ 23 24 #define MUIA_Piano_ReadOnly 0xFED90000 + 0 /* [ISG] BOOL set to true to discard user interactions */ 25 #define MUIA_Piano_KeyColor 0xFED90000 + 1 /* [ISG] LONG Color 0x00RRGGBB */ 26 #define MUIA_Piano_Octaves 0xFED90000 + 3 /* [ISG] LONG valid values range from 1 to 11 */ 27 #define MUIA_Piano_OctaveBeginAt 0xFED90000 + 4 /* [ISG] LONG valid values range from 0 to 10 */ 28 29 /* Values */ 30 31 #define MUIV_Piano_KeyColor -2 /* Use the default color defined with Piano.mcp */ 32 33 #define MUIV_Piano_KeyEvent_Down 1 /* status value set when a key is pressed */ 34 #define MUIV_Piano_KeyEvent_Up 0 /* status value set when a key is released */ 35 36 /* Methods */ 37 38 #define MUIM_Piano_KeyEvent 0xFED90000 + 1 /* Subclass this method for handling user event with keyboard */ 39 #define MUIM_Piano_KeyClear 0xFED90000 + 2 /* Clears all the selected keys in one go */ 40 41 /* Method Structure Messages */ 42 43 struct MUIP_Piano_KeyEvent 44 { 45 ULONG methodid; 46 LONG key; /* value ranging from 0 to 127 included. */ 47 LONG status; /* Set to 1 when key is pressed, 0 when key is released */ 48 }; 49 50 #pragma pack() 51 52 #endif /* PIANO_MCC_H */