Commit f638aef5 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Added the new TTY driver.

parent e35d6366
......@@ -57,7 +57,8 @@ LIBSUBDIRS = \
scheduler \
server \
win32 \
windows
windows \
windows/ttydrv
X11SUBDIRS = \
graphics/x11drv \
......@@ -119,7 +120,8 @@ LIBOBJS = \
scheduler/scheduler.o \
server/server.o \
win32/win32.o \
windows/windows.o
windows/windows.o \
windows/ttydrv/ttydrv.o
X11OBJS = \
graphics/x11drv/x11drv.o \
......
......@@ -25,7 +25,7 @@ ac_help="$ac_help
ac_help="$ac_help
--with-ncurses compile in the ncurses terminal"
ac_help="$ac_help
--without-reentrant-x Compile for use with non-reentrant X libraries"
--without-reentrant-x compile for use with non-reentrant X libraries"
ac_help="$ac_help
--with-x use the X Window System"
......@@ -3752,6 +3752,7 @@ tools/wrc/Makefile
tsx11/Makefile
win32/Makefile
windows/Makefile
windows/ttydrv/Makefile
windows/x11drv/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
......@@ -3902,6 +3903,7 @@ tools/wrc/Makefile
tsx11/Makefile
win32/Makefile
windows/Makefile
windows/ttydrv/Makefile
windows/x11drv/Makefile "}
EOF
cat >> $CONFIG_STATUS <<\EOF
......
......@@ -558,6 +558,7 @@ tools/wrc/Makefile
tsx11/Makefile
win32/Makefile
windows/Makefile
windows/ttydrv/Makefile
windows/x11drv/Makefile ])
if test "$wine_cv_libc_reentrant" = "no"
......
/*
* TTY driver definitions
*/
#ifndef __WINE_TTYDRV_H
#define __WINE_TTYDRV_H
#include "clipboard.h"
#include "keyboard.h"
#include "message.h"
/* TTY clipboard driver */
extern CLIPBOARD_DRIVER TTYDRV_CLIPBOARD_Driver;
extern void TTYDRV_CLIPBOARD_EmptyClipboard();
extern void TTYDRV_CLIPBOARD_SetClipboardData(UINT32 wFormat);
extern BOOL32 TTYDRV_CLIPBOARD_RequestSelection();
extern void TTYDRV_CLIPBOARD_ResetOwner(WND *pWnd);
/* TTY event driver */
extern EVENT_DRIVER TTYDRV_EVENT_Driver;
extern BOOL32 TTYDRV_EVENT_Init(void);
extern void TTYDRV_EVENT_AddIO(int fd, unsigned flag);
extern void TTYDRV_EVENT_DeleteIO(int fd, unsigned flag);
extern BOOL32 TTYDRV_EVENT_WaitNetEvent(BOOL32 sleep, BOOL32 peek);
extern void TTYDRV_EVENT_Synchronize(void);
extern BOOL32 TTYDRV_EVENT_CheckFocus( void );
extern BOOL32 TTYDRV_EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state);
extern void TTYDRV_EVENT_DummyMotionNotify(void);
extern BOOL32 TTYDRV_EVENT_Pending(void);
extern BOOL16 TTYDRV_EVENT_IsUserIdle(void);
/* TTY keyboard driver */
extern KEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver;
extern void TTYDRV_KEYBOARD_Init(void);
extern WORD TTYDRV_KEYBOARD_VkKeyScan(CHAR cChar);
extern UINT16 TTYDRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType);
extern INT16 TTYDRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize);
extern INT16 TTYDRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags);
#endif /* !defined(__WINE_TTYDRV_H) */
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = ttydrv
C_SRCS = \
clipboard.c \
event.c \
init.c \
keyboard.c \
mouse.c \
wnd.c
all: $(MODULE).o
@MAKE_RULES@
### Dependencies:
/*
* TTY clipboard driver
*
* Copyright 1998 Patrik Stridvall
*/
#include "config.h"
#include "heap.h"
#include "ttydrv.h"
/**********************************************************************/
char *TTYDRV_CLIPBOARD_szSelection = NULL;
/***********************************************************************
* TTYDRV_CLIPBOARD_EmptyClipboard
*/
void TTYDRV_CLIPBOARD_EmptyClipboard()
{
if(TTYDRV_CLIPBOARD_szSelection)
{
HeapFree(SystemHeap, 0, TTYDRV_CLIPBOARD_szSelection);
TTYDRV_CLIPBOARD_szSelection = NULL;
}
}
/***********************************************************************
* TTYDRV_CLIPBOARD_SetClipboardData
*/
void TTYDRV_CLIPBOARD_SetClipboardData(UINT32 wFormat)
{
}
/***********************************************************************
* TTYDRV_CLIPBOARD_RequestSelection
*/
BOOL32 TTYDRV_CLIPBOARD_RequestSelection()
{
return FALSE;
}
/***********************************************************************
* TTYDRV_CLIPBOARD_ResetOwner
*/
void TTYDRV_CLIPBOARD_ResetOwner(WND *pWnd)
{
}
/*
* TTY event driver
*
* Copyright 1998 Patrik Stridvall
*/
#include "config.h"
#include "ttydrv.h"
/***********************************************************************
* TTYDRV_EVENT_Init
*/
BOOL32 TTYDRV_EVENT_Init(void)
{
return TRUE;
}
/***********************************************************************
* TTYDRV_EVENT_AddIO
*/
void TTYDRV_EVENT_AddIO(int fd, unsigned flag)
{
}
/***********************************************************************
* TTYDRV_EVENT_DeleteIO
*/
void TTYDRV_EVENT_DeleteIO(int fd, unsigned flag)
{
}
/***********************************************************************
* TTYDRV_EVENT_WaitNetEvent
*/
BOOL32 TTYDRV_EVENT_WaitNetEvent(BOOL32 sleep, BOOL32 peek)
{
return TRUE;
}
/***********************************************************************
* TTYDRV_EVENT_Synchronize
*/
void TTYDRV_EVENT_Synchronize(void)
{
}
/***********************************************************************
* TTYDRV_EVENT_CheckFocus
*/
BOOL32 TTYDRV_EVENT_CheckFocus(void)
{
return TRUE;
}
/***********************************************************************
* TTYDRV_EVENT_QueryPointer
*/
BOOL32 TTYDRV_EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state)
{
if(posX)
*posX = 0;
if(posY)
*posY = 0;
if(state)
*state = 0;
}
/***********************************************************************
* TTYDRV_EVENT_DummyMotionNotify
*/
void TTYDRV_EVENT_DummyMotionNotify(void)
{
}
/***********************************************************************
* TTYDRV_EVENT_Pending
*/
BOOL32 TTYDRV_EVENT_Pending(void)
{
return FALSE;
}
/***********************************************************************
* TTYDRV_EVENT_IsUserIdle
*/
BOOL16 TTYDRV_EVENT_IsUserIdle(void)
{
return TRUE;
}
/*
* TTY driver
*
* Copyright 1998 Patrik Stridvall
*/
#include "config.h"
#include "ttydrv.h"
#if 0
WND_DRIVER TTYDRV_WND_Driver =
{
TTYDRV_WND_CreateDesktopWindow,
TTYDRV_WND_CreateWindow,
TTYDRV_WND_DestroyWindow,
TTYDRV_WND_SetParent,
TTYDRV_WND_ForceWindowRaise,
TTYDRV_WND_SetWindowPos,
TTYDRV_WND_SetText,
TTYDRV_WND_SetFocus,
TTYDRV_WND_PreSizeMove,
TTYDRV_WND_PostSizeMove
};
#endif
CLIPBOARD_DRIVER TTYDRV_CLIPBOARD_Driver =
{
TTYDRV_CLIPBOARD_EmptyClipboard,
TTYDRV_CLIPBOARD_SetClipboardData,
TTYDRV_CLIPBOARD_RequestSelection,
TTYDRV_CLIPBOARD_ResetOwner
};
KEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver =
{
TTYDRV_KEYBOARD_Init,
TTYDRV_KEYBOARD_VkKeyScan,
TTYDRV_KEYBOARD_MapVirtualKey,
TTYDRV_KEYBOARD_GetKeyNameText,
TTYDRV_KEYBOARD_ToAscii
};
#if 0
EVENT_DRIVER TTYDRV_EVENT_Driver =
{
TTYDRV_EVENT_Init,
TTYDRV_EVENT_AddIO,
TTYDRV_EVENT_DeleteIO,
TTYDRV_EVENT_WaitNetEvent,
TTYDRV_EVENT_Synchronize,
TTYDRV_EVENT_CheckFocus,
TTYDRV_EVENT_QueryPointer,
TTYDRV_EVENT_DummyMotionNotify,
TTYDRV_EVENT_Pending,
TTYDRV_EVENT_IsUserIdle
};
#endif
#if 0
MOUSE_DRIVER TTYDRV_MOUSE_Driver =
{
};
#endif
/*
* TTY keyboard driver
*
* Copyright 1998 Patrik Stridvall
*/
#include "config.h"
#include "keyboard.h"
#include "ttydrv.h"
/***********************************************************************
* TTYDRV_KEYBOARD_Init
*/
void TTYDRV_KEYBOARD_Init(void)
{
}
/***********************************************************************
* TTYDRV_KEYBOARD_VkKeyScan
*/
WORD TTYDRV_KEYBOARD_VkKeyScan(CHAR cChar)
{
return 0;
}
/***********************************************************************
* TTYDRV_KEYBOARD_MapVirtualKey
*/
UINT16 TTYDRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
{
return 0;
}
/***********************************************************************
* TTYDRV_KEYBOARD_GetKeyNameText
*/
INT16 TTYDRV_KEYBOARD_GetKeyNameText(
LONG lParam, LPSTR lpBuffer, INT16 nSize)
{
if(lpBuffer && nSize)
{
*lpBuffer = 0;
}
return 0;
}
/***********************************************************************
* TTYDRV_KEYBOARD_ToAscii
*/
INT16 TTYDRV_KEYBOARD_ToAscii(
UINT16 virtKey, UINT16 scanCode,
LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags)
{
return 0;
}
/*
* TTY mouse driver
*
* Copyright 1998 Patrik Stridvall
*/
#include "config.h"
#include "ttydrv.h"
/*
* TTY window driver
*
* Copyright 1998 Patrik Stridvall
*/
#include "config.h"
#include "ttydrv.h"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment