1
// vi:ts=4:shiftwidth=4:expandtab
2
/***************************************************************************
3
inputmanager.h - description
6
copyright : (C) 2001 by ejoy
7
email : ejoy@users.sourceforge.net
8
***************************************************************************/
10
/***************************************************************************
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
17
***************************************************************************/
19
#ifndef INPUTMANAGER_H
20
#define INPUTMANAGER_H
29
#include <sys/types.h>
32
#if defined(__FreeBSD__)
45
typedef struct InputEvt_t {
46
enum Oper {Nothing, SetEnco, AutoEncoSwitch};
52
friend class ConfigServer;
54
enum InputStyle {NativeBar,OverSpot};
55
InputManager(Console * pCon, InputStyle style,
56
string& OverSpotColors, string& NativeBarColors);
58
static void SetTty(int confd, int ttyno, int ttyfd);
59
void Process(InputEvt &evt);
61
void LoadImmInfo(ConfigFile& f);
67
void ProcessKey(char c, InputEvt &evt);
69
bool ProcessSysKey(char c, InputEvt &evt);
70
bool ProcessInputKey(char c);
73
void WriteClient(char c);
74
void WriteClient(string & s);
80
bool LoadImm(ImmInfo& rInfo);
87
void KDInputRestore();
88
void ChangeStyle(InputStyle style);
92
static int mConFd, mConNo, mTtyFd;
95
char mInputBuf[BUFSIZE];
96
char mOutputBuf[BUFSIZE];
101
unsigned char mTable;
102
unsigned char mIndex;
103
unsigned short mOldValue;
104
unsigned short mNewValue;
106
static KeyMap mKDSysMap[];
107
static KeyMap mKDInputMap[];
108
#elif defined(__FreeBSD__)
109
static keymap_t mKDSysOld, mKDSysNew;
110
static keymap_t mKDInputOld, mKDInputNew;
112
static bool mKDSysSaved;
113
static bool mKDInputSaved;
116
InputServer *mpInputServer;
117
InputClient *mpInputClient;
122
vector < ImmInfo > mImmTable;
124
string msOverSpotColors;
125
string msNativeBarColors;