2009-11-04 22:07:29 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Build Tools [Keyboard Layout Compiler]
|
|
|
|
* LICENSE: BSD - See COPYING.BSD in the top level directory
|
|
|
|
* FILE: tools/kbdtool/kbdtool.h
|
|
|
|
* PURPOSE: Main Header File
|
|
|
|
* PROGRAMMERS: ReactOS Foundation
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES *******************************************************************/
|
|
|
|
|
2016-11-10 15:34:25 +00:00
|
|
|
#include <ctype.h>
|
2009-11-04 22:07:29 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2009-11-04 22:48:55 +00:00
|
|
|
#include <time.h>
|
2011-06-15 10:30:03 +00:00
|
|
|
#include <typedefs.h>
|
2009-11-04 22:07:29 +00:00
|
|
|
|
|
|
|
#define KEYWORD_COUNT 17
|
|
|
|
|
|
|
|
#define CHAR_NORMAL_KEY 0
|
|
|
|
#define CHAR_DEAD_KEY 1
|
|
|
|
#define CHAR_OTHER_KEY 2
|
|
|
|
#define CHAR_INVALID_KEY 3
|
|
|
|
#define CHAR_LIGATURE_KEY 4
|
|
|
|
|
|
|
|
typedef struct tagKEYNAME
|
|
|
|
{
|
|
|
|
ULONG Code;
|
|
|
|
PCHAR Name;
|
|
|
|
struct tagKEYNAME* Next;
|
|
|
|
} KEYNAME, *PKEYNAME;
|
|
|
|
|
|
|
|
typedef struct tagSCVK
|
|
|
|
{
|
|
|
|
USHORT ScanCode;
|
|
|
|
USHORT VirtualKey;
|
|
|
|
PCHAR Name;
|
|
|
|
BOOLEAN Processed;
|
|
|
|
} SCVK, *PSCVK;
|
|
|
|
|
|
|
|
typedef struct tagVKNAME
|
|
|
|
{
|
|
|
|
ULONG VirtualKey;
|
|
|
|
PCHAR Name;
|
|
|
|
} VKNAME, *PVKNAME;
|
|
|
|
|
|
|
|
typedef struct tagLAYOUTENTRY
|
|
|
|
{
|
|
|
|
USHORT ScanCode;
|
|
|
|
UCHAR VirtualKey;
|
|
|
|
UCHAR OriginalVirtualKey;
|
|
|
|
ULONG Cap;
|
|
|
|
ULONG StateCount;
|
|
|
|
ULONG CharData[8];
|
|
|
|
ULONG DeadCharData[8];
|
2009-11-06 22:42:26 +00:00
|
|
|
UCHAR LigatureCharData[8];
|
2009-11-04 22:07:29 +00:00
|
|
|
ULONG OtherCharData[8];
|
|
|
|
struct LAYOUTENTRY* CapData;
|
|
|
|
PCHAR Name;
|
|
|
|
ULONG Processed;
|
|
|
|
ULONG LineCount;
|
|
|
|
} LAYOUTENTRY, *PLAYOUTENTRY;
|
|
|
|
|
|
|
|
typedef struct tagLAYOUT
|
|
|
|
{
|
|
|
|
LAYOUTENTRY Entry[110];
|
|
|
|
} LAYOUT, *PLAYOUT;
|
|
|
|
|
2016-11-10 15:34:25 +00:00
|
|
|
ULONG
|
|
|
|
DoOutput(
|
|
|
|
IN ULONG StateCount,
|
|
|
|
IN PULONG ShiftStates,
|
|
|
|
IN PKEYNAME DescriptionData,
|
|
|
|
IN PKEYNAME LanguageData,
|
|
|
|
IN PVOID AttributeData,
|
|
|
|
IN PVOID DeadKeyData,
|
|
|
|
IN PVOID LigatureData,
|
|
|
|
IN PKEYNAME KeyNameData,
|
|
|
|
IN PKEYNAME KeyNameExtData,
|
|
|
|
IN PKEYNAME KeyNameDeadData
|
|
|
|
);
|
|
|
|
|
2009-11-04 22:48:55 +00:00
|
|
|
PCHAR
|
|
|
|
getVKName(
|
|
|
|
IN ULONG VirtualKey,
|
|
|
|
IN BOOLEAN Prefix
|
|
|
|
);
|
|
|
|
|
2016-11-10 15:34:25 +00:00
|
|
|
ULONG
|
|
|
|
DoParsing(
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2009-11-04 22:07:29 +00:00
|
|
|
extern BOOLEAN Verbose, UnicodeFile, SanityCheck, FallbackDriver;
|
|
|
|
extern PCHAR gpszFileName;
|
|
|
|
extern FILE* gfpInput;
|
|
|
|
extern VKNAME VKName[];
|
2009-11-05 19:24:47 +00:00
|
|
|
extern VKNAME Modifiers[];
|
2009-11-04 22:07:29 +00:00
|
|
|
extern SCVK ScVk[];
|
2009-11-06 00:37:06 +00:00
|
|
|
extern PCHAR StateLabel[];
|
|
|
|
extern PCHAR CapState[];
|
2009-11-04 22:07:29 +00:00
|
|
|
extern LAYOUT g_Layout;
|
2009-11-04 22:48:55 +00:00
|
|
|
extern CHAR gVKeyName[32];
|
|
|
|
extern CHAR gKBDName[10];
|
|
|
|
extern CHAR gCopyright[256];
|
|
|
|
extern CHAR gDescription[256];
|
2009-11-05 01:57:08 +00:00
|
|
|
extern CHAR gCompany[256];
|
|
|
|
extern CHAR gLocaleName[256];
|
2009-11-04 22:48:55 +00:00
|
|
|
extern ULONG gVersion, gSubVersion;
|
2009-11-04 22:07:29 +00:00
|
|
|
|
|
|
|
/* EOF */
|