74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSKbd.h,v 1.3 2003/02/17 15:11:55 dawes Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Copyright (c) 2002 by The XFree86 Project, Inc.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Author: Ivan Pascal.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#include "xf86Xinput.h"
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncBool ATScancode(InputInfoPtr pInfo, int *scanCode);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* Public interface to OS-specific keyboard support. */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef int (*KbdInitProc)(InputInfoPtr pInfo, int what);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef int (*KbdOnProc)(InputInfoPtr pInfo, int what);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef int (*KbdOffProc)(InputInfoPtr pInfo, int what);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*BellProc)(InputInfoPtr pInfo,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int loudness, int pitch, int duration);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*SetLedsProc)(InputInfoPtr pInfo, int leds);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef int (*GetLedsProc)(InputInfoPtr pInfo);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*SetKbdRepeatProc)(InputInfoPtr pInfo, char rad);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*KbdGetMappingProc)(InputInfoPtr pInfo,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KeySymsPtr pKeySyms, CARD8* pModMap);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef int (*GetSpecialKeyProc)(InputInfoPtr pInfo, int scanCode);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef Bool (*SpecialKeyProc)(InputInfoPtr pInfo,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int key, Bool down, int modifiers);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef int (*RemapScanCodeProc)(InputInfoPtr pInfo, int *scanCode);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef Bool (*OpenKeyboardProc)(InputInfoPtr pInfo);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*PostEventProc)(InputInfoPtr pInfo,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int key, Bool down);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int begin;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int end;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char *map;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} TransMapRec, *TransMapPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KbdInitProc KbdInit;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KbdOnProc KbdOn;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KbdOffProc KbdOff;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync BellProc Bell;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync SetLedsProc SetLeds;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync GetLedsProc GetLeds;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync SetKbdRepeatProc SetKbdRepeat;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KbdGetMappingProc KbdGetMapping;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync RemapScanCodeProc RemapScanCode;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync GetSpecialKeyProc GetSpecialKey;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync SpecialKeyProc SpecialKey;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync OpenKeyboardProc OpenKeyboard;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync PostEventProc PostEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int rate;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int delay;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int bell_pitch;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int bell_duration;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool autoRepeat;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long leds;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long xledsMask;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long keyLeds;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int scanPrefix;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool vtSwitchSupported;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool CustomKeycodes;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool noXkb;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool isConsole;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync TransMapPtr scancodeMap;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync TransMapPtr specialMap;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync /* os specific */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync pointer private;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int kbdType;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int consType;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int wsKbdType;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool sunKbd;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool Panix106;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} KbdDevRec, *KbdDevPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef enum {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync PROT_STD,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync PROT_XQUEUE,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync PROT_WSCONS,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync PROT_USB,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync PROT_UNKNOWN
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} KbdProtocolId;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync const char *name;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KbdProtocolId id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} KbdProtocolRec;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncBool xf86OSKbdPreInit(InputInfoPtr pInfo);