added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / workbench / prefs / input / prefs.h
blobb4cecf908ebd5e74863e69514d62516209a04b92
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id: prefs.h 24051 2007-09-30 12:00:00 olivieradam, dariusb $
5 Desc:
6 Lang: English
7 */
9 /*********************************************************************************************/
11 #include <aros/macros.h>
13 #include <stdio.h>
14 #include <string.h>
15 #include <stdlib.h>
17 #include "global.h"
19 /*********************************************************************************************/
21 #define ARRAY_TO_LONG(x) ( ((x)[0] << 24UL) + ((x)[1] << 16UL) + ((x)[2] << 8UL) + ((x)[3]) )
22 #define ARRAY_TO_WORD(x) ( ((x)[0] << 8UL) + ((x)[1]) )
24 #define LONG_TO_ARRAY(x,y) (y)[0] = (UBYTE)(ULONG)((x) >> 24UL); \
25 (y)[1] = (UBYTE)(ULONG)((x) >> 16UL); \
26 (y)[2] = (UBYTE)(ULONG)((x) >> 8UL); \
27 (y)[3] = (UBYTE)(ULONG)((x));
29 #define WORD_TO_ARRAY(x,y) (y)[0] = (UBYTE)(ULONG)((x) >> 8UL); \
30 (y)[1] = (UBYTE)(ULONG)((x));
32 /*********************************************************************************************/
34 struct FilePrefHeader
36 UBYTE ph_Version;
37 UBYTE ph_Type;
38 UBYTE ph_Flags[4];
41 struct FileInputPrefs
43 char ip_Keymap[16];
44 UBYTE ip_PointerTicks[2];
45 UBYTE ip_DoubleClick_secs[4];
46 UBYTE ip_DoubleClick_micro[4];
47 UBYTE ip_KeyRptDelay_secs[4];
48 UBYTE ip_KeyRptDelay_micro[4];
49 UBYTE ip_KeyRptSpeed_secs[4];
50 UBYTE ip_KeyRptSpeed_micro[4];
51 UBYTE ip_MouseAccel[2];
54 struct nameexp
56 STRPTR shortname;
57 STRPTR longname;
58 STRPTR flag;
62 struct ListviewEntry
64 struct Node node;
65 UBYTE layoutname[30];
66 UBYTE realname[30];
67 UBYTE flagname[30];
68 UBYTE displayname[128];
71 struct KeymapEntry
73 struct ListviewEntry lve;
76 /*********************************************************************************************/
78 void ScanDirectory(STRPTR pattern, struct List *list, LONG entrysize);
79 BOOL LoadPrefs(BPTR fh);
80 BOOL SavePrefs(BPTR fh);
81 void update_inputdev(void);
82 void try_setting_mousespeed(void);
83 void try_setting_test_keymap(void);
84 void kbd_cleanup(void);
85 void RestorePrefs(void);
86 BOOL DefaultPrefs(void);
87 void CopyPrefs(struct InputPrefs *s, struct InputPrefs *d);