2 * Copyright 2004-2010, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
7 * Axel Dörfler, axeld@pinc-software.de.
15 #ifdef HAIKU_TARGET_PLATFORM_HAIKU
16 # include <TextView.h>
26 class Keymap
: public BKeymap
{
31 status_t
LoadSource(const char* name
);
32 status_t
LoadSource(FILE* file
);
33 status_t
SaveAsCurrent();
34 status_t
Save(const char* name
);
35 status_t
SaveAsSource(const char* name
);
36 status_t
SaveAsSource(FILE* file
);
37 status_t
SaveAsCppHeader(const char* name
,
42 void RestoreSystemDefault();
44 static bool GetKey(const char* chars
, int32 offset
,
45 char* buffer
, size_t bufferSize
);
48 #ifdef HAIKU_TARGET_PLATFORM_HAIKU
49 void _SaveSourceText(FILE* file
,
50 text_run_array
** _textRuns
= NULL
);
52 void _SaveSourceText(FILE* file
);
54 void _ComputeChars(const char* buffer
,
55 struct re_registers
& regs
, int i
,
57 void _ComputeTables(const char* buffer
,
58 struct re_registers
& regs
, uint32
& table
);
61 #define KEYMAP_ERROR_UNKNOWN_VERSION (B_ERRORS_END + 1)