revert between 56095 -> 55830 in arch
[AROS.git] / workbench / tools / Edit / Macros.h
blob7b95c7424bddc1831850e2d7fd74cb8a7d715670
1 /**************************************************************
2 **** Macros.h : Datatypes for recording keystroke sequence ****
3 **** Free software under GNU license, started on 15/8/2001 ****
4 **** © T.Pierron, C.Guillaume. ****
5 **************************************************************/
7 #ifndef MACROS_H
8 #define MACROS_H
10 /* Size of one chunk for record */
11 #define SZ_MACRO 256
12 #define MAX_MAC 10
14 /** Structure holding keystrokes **/
15 typedef struct _Macro
17 struct _Macro *next;
18 UWORD usage; /* Nb. of bytes in the array data */
19 UBYTE data[ SZ_MACRO ]; /* Buffer for keystroke record */
20 } *Macro;
22 typedef struct /* Character added to the buffer */
24 UBYTE Type, Char; /* MAC_ACT_ADD_CHAR, character added */
25 } *ActChar;
27 typedef struct /* Menu command */
29 UBYTE Type; /* MAC_ACT_COM_MENU */
30 UWORD Qual, Code; /* Menu code and qualifier */
31 } *ActMenu;
33 typedef ActMenu ActShortcut;
35 /** Possible values for `Type' field **/
36 #define MAC_ACT_ADD_CHAR 0
37 #define MAC_ACT_COM_MENU 1
38 #define MAC_ACT_SHORTCUT 2
40 /** Public functions associated **/
41 void free_macros ( void );
42 void init_macros ( void );
43 void start_macro ( void );
44 void stop_macro ( void );
45 void play_macro ( int );
46 void reg_act_addchar ( UBYTE code );
47 void reg_act_com ( UBYTE type, UWORD code, UWORD qual );
48 void new_slot ( BYTE dir );
49 void repeat_macro( Project p );
51 #endif