TTY driver changes.
This commit is contained in:
parent
ab121e7838
commit
c6e6a9aff9
|
@ -7,9 +7,12 @@ MODULE = ttydrv
|
|||
|
||||
C_SRCS = \
|
||||
clipboard.c \
|
||||
desktop.c \
|
||||
event.c \
|
||||
init.c \
|
||||
keyboard.c \
|
||||
main.c \
|
||||
monitor.c \
|
||||
mouse.c \
|
||||
wnd.c
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
/*
|
||||
* TTY clipboard driver
|
||||
*
|
||||
* Copyright 1998 Patrik Stridvall
|
||||
* Copyright 1998-1999 Patrik Stridvall
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "heap.h"
|
||||
#include "ttydrv.h"
|
||||
#include "win.h"
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* TTY desktop driver
|
||||
*
|
||||
* Copyright 1998,1999 Patrik Stridvall
|
||||
*
|
||||
*/
|
||||
|
||||
#include "desktop.h"
|
||||
#include "monitor.h"
|
||||
#include "ttydrv.h"
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_DESKTOP_Initialize
|
||||
*/
|
||||
void TTYDRV_DESKTOP_Initialize(DESKTOP *pDesktop)
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_DESKTOP_Finalize
|
||||
*/
|
||||
void TTYDRV_DESKTOP_Finalize(DESKTOP *pDesktop)
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_DESKTOP_GetScreenWidth
|
||||
*
|
||||
* Return the width of the screen associated to the desktop.
|
||||
*/
|
||||
int TTYDRV_DESKTOP_GetScreenWidth(DESKTOP *pDesktop)
|
||||
{
|
||||
return MONITOR_GetWidth(pDesktop->pPrimaryMonitor);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_DESKTOP_GetScreenHeight
|
||||
*
|
||||
* Return the width of the screen associated to the desktop.
|
||||
*/
|
||||
int TTYDRV_DESKTOP_GetScreenHeight(DESKTOP *pDesktop)
|
||||
{
|
||||
return MONITOR_GetHeight(pDesktop->pPrimaryMonitor);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_DESKTOP_GetScreenDepth
|
||||
*
|
||||
* Return the depth of the screen associated to the desktop.
|
||||
*/
|
||||
int TTYDRV_DESKTOP_GetScreenDepth(DESKTOP *pDesktop)
|
||||
{
|
||||
return MONITOR_GetDepth(pDesktop->pPrimaryMonitor);
|
||||
}
|
|
@ -1,11 +1,9 @@
|
|||
/*
|
||||
* TTY event driver
|
||||
*
|
||||
* Copyright 1998 Patrik Stridvall
|
||||
* Copyright 1998-1999 Patrik Stridvall
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "ttydrv.h"
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -1,31 +1,17 @@
|
|||
/*
|
||||
* TTY driver
|
||||
*
|
||||
* Copyright 1998 Patrik Stridvall
|
||||
* Copyright 1998-1999 Patrik Stridvall
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "clipboard.h"
|
||||
#include "desktop.h"
|
||||
#include "display.h"
|
||||
#include "keyboard.h"
|
||||
#include "message.h"
|
||||
#include "monitor.h"
|
||||
#include "ttydrv.h"
|
||||
|
||||
#if 0
|
||||
WND_DRIVER TTYDRV_WND_Driver =
|
||||
{
|
||||
TTYDRV_WND_Initialize,
|
||||
TTYDRV_WND_Finalize,
|
||||
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,
|
||||
|
@ -34,16 +20,12 @@ CLIPBOARD_DRIVER TTYDRV_CLIPBOARD_Driver =
|
|||
TTYDRV_CLIPBOARD_ResetOwner
|
||||
};
|
||||
|
||||
KEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver =
|
||||
DESKTOP_DRIVER TTYDRV_DESKTOP_Driver =
|
||||
{
|
||||
TTYDRV_KEYBOARD_Init,
|
||||
TTYDRV_KEYBOARD_VkKeyScan,
|
||||
TTYDRV_KEYBOARD_MapVirtualKey,
|
||||
TTYDRV_KEYBOARD_GetKeyNameText,
|
||||
TTYDRV_KEYBOARD_ToAscii
|
||||
TTYDRV_DESKTOP_Initialize,
|
||||
TTYDRV_DESKTOP_Finalize
|
||||
};
|
||||
|
||||
#if 0
|
||||
EVENT_DRIVER TTYDRV_EVENT_Driver =
|
||||
{
|
||||
TTYDRV_EVENT_Init,
|
||||
|
@ -57,10 +39,48 @@ EVENT_DRIVER TTYDRV_EVENT_Driver =
|
|||
TTYDRV_EVENT_Pending,
|
||||
TTYDRV_EVENT_IsUserIdle
|
||||
};
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
KEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver =
|
||||
{
|
||||
TTYDRV_KEYBOARD_Init,
|
||||
TTYDRV_KEYBOARD_VkKeyScan,
|
||||
TTYDRV_KEYBOARD_MapVirtualKey,
|
||||
TTYDRV_KEYBOARD_GetKeyNameText,
|
||||
TTYDRV_KEYBOARD_ToAscii
|
||||
};
|
||||
|
||||
MONITOR_DRIVER TTYDRV_MONITOR_Driver =
|
||||
{
|
||||
TTYDRV_MONITOR_Initialize,
|
||||
TTYDRV_MONITOR_Finalize,
|
||||
TTYDRV_MONITOR_GetWidth,
|
||||
TTYDRV_MONITOR_GetHeight,
|
||||
TTYDRV_MONITOR_GetDepth
|
||||
};
|
||||
|
||||
MOUSE_DRIVER TTYDRV_MOUSE_Driver =
|
||||
{
|
||||
TTYDRV_MOUSE_SetCursor,
|
||||
TTYDRV_MOUSE_MoveCursor
|
||||
};
|
||||
#endif
|
||||
|
||||
WND_DRIVER TTYDRV_WND_Driver =
|
||||
{
|
||||
TTYDRV_WND_Initialize,
|
||||
TTYDRV_WND_Finalize,
|
||||
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,
|
||||
TTYDRV_WND_ScrollWindow,
|
||||
TTYDRV_WND_SetDrawable,
|
||||
TTYDRV_WND_IsSelfClipping
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
* Copyright 1998 Patrik Stridvall
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "keyboard.h"
|
||||
#include "ttydrv.h"
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* TTY main driver
|
||||
*
|
||||
* Copyright 1998 Patrik Stridvall
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ttydrv.h"
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MAIN_Initialize
|
||||
*/
|
||||
void TTYDRV_MAIN_Initialize()
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MAIN_Finalize
|
||||
*/
|
||||
void TTYDRV_MAIN_Finalize()
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MAIN_ParseOptions
|
||||
*/
|
||||
void TTYDRV_MAIN_ParseOptions(int *argc, char *argv[])
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MAIN_Create
|
||||
*/
|
||||
void TTYDRV_MAIN_Create()
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MAIN_SaveSetup
|
||||
*/
|
||||
void TTYDRV_MAIN_SaveSetup()
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MAIN_RestoreSetup
|
||||
*/
|
||||
void TTYDRV_MAIN_RestoreSetup()
|
||||
{
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* TTY monitor driver
|
||||
*
|
||||
* Copyright 1998,1999 Patrik Stridvall
|
||||
*
|
||||
*/
|
||||
|
||||
#include "heap.h"
|
||||
#include "monitor.h"
|
||||
#include "wintypes.h"
|
||||
#include "ttydrv.h"
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MONITOR_Initialize
|
||||
*/
|
||||
void TTYDRV_MONITOR_Initialize(MONITOR *pMonitor)
|
||||
{
|
||||
TTYDRV_MONITOR_DATA *pTTYMonitor = (TTYDRV_MONITOR_DATA *)
|
||||
HeapAlloc(SystemHeap, 0, sizeof(TTYDRV_MONITOR_DATA));
|
||||
|
||||
pMonitor->pDriverData = pTTYMonitor;
|
||||
|
||||
pTTYMonitor->width = 640; /* FIXME: Screen width in pixels */
|
||||
pTTYMonitor->height = 480; /* FIXME: Screen height in pixels */
|
||||
pTTYMonitor->depth = 1; /* FIXME: Screen depth */
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MONITOR_Finalize
|
||||
*/
|
||||
void TTYDRV_MONITOR_Finalize(MONITOR *pMonitor)
|
||||
{
|
||||
HeapFree(SystemHeap, 0, pMonitor->pDriverData);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MONITOR_GetWidth
|
||||
*
|
||||
* Return the width of the monitor
|
||||
*/
|
||||
int TTYDRV_MONITOR_GetWidth(MONITOR *pMonitor)
|
||||
{
|
||||
TTYDRV_MONITOR_DATA *pTTYMonitor =
|
||||
(TTYDRV_MONITOR_DATA *) pMonitor->pDriverData;
|
||||
|
||||
return pTTYMonitor->width;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MONITOR_GetHeight
|
||||
*
|
||||
* Return the height of the monitor
|
||||
*/
|
||||
int TTYDRV_MONITOR_GetHeight(MONITOR *pMonitor)
|
||||
{
|
||||
TTYDRV_MONITOR_DATA *pTTYMonitor =
|
||||
(TTYDRV_MONITOR_DATA *) pMonitor->pDriverData;
|
||||
|
||||
return pTTYMonitor->height;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MONITOR_GetDepth
|
||||
*
|
||||
* Return the depth of the monitor
|
||||
*/
|
||||
int TTYDRV_MONITOR_GetDepth(MONITOR *pMonitor)
|
||||
{
|
||||
TTYDRV_MONITOR_DATA *pTTYMonitor =
|
||||
(TTYDRV_MONITOR_DATA *) pMonitor->pDriverData;
|
||||
|
||||
return pTTYMonitor->depth;
|
||||
}
|
|
@ -1,9 +1,21 @@
|
|||
/*
|
||||
* TTY mouse driver
|
||||
*
|
||||
* Copyright 1998 Patrik Stridvall
|
||||
* Copyright 1998,1999 Patrik Stridvall
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "ttydrv.h"
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MOUSE_SetCursor
|
||||
*/
|
||||
void TTYDRV_MOUSE_SetCursor( CURSORICONINFO *lpCursor )
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_MOUSE_MoveCursor
|
||||
*/
|
||||
void TTYDRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1,9 +1,126 @@
|
|||
/*
|
||||
* TTY window driver
|
||||
*
|
||||
* Copyright 1998 Patrik Stridvall
|
||||
* Copyright 1998,1999 Patrik Stridvall
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "class.h"
|
||||
#include "dc.h"
|
||||
#include "ttydrv.h"
|
||||
#include "win.h"
|
||||
|
||||
/**********************************************************************
|
||||
* TTYDRV_WND_Initialize
|
||||
*/
|
||||
void TTYDRV_WND_Initialize(WND *wndPtr)
|
||||
{
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* TTYDRV_WND_Finalize
|
||||
*/
|
||||
void TTYDRV_WND_Finalize(WND *wndPtr)
|
||||
{
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* TTYDRV_WND_CreateDesktopWindow
|
||||
*/
|
||||
BOOL32 TTYDRV_WND_CreateDesktopWindow(WND *wndPtr, CLASS *classPtr, BOOL32 bUnicode)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* TTYDRV_WND_CreateWindow
|
||||
*/
|
||||
BOOL32 TTYDRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCT32A *cs, BOOL32 bUnicode)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_WND_DestroyWindow
|
||||
*/
|
||||
BOOL32 TTYDRV_WND_DestroyWindow(WND *wndPtr)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* X11DRV_WND_SetParent
|
||||
*/
|
||||
WND *TTYDRV_WND_SetParent(WND *wndPtr, WND *pWndParent)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_WND_ForceWindowRaise
|
||||
*/
|
||||
void TTYDRV_WND_ForceWindowRaise(WND *wndPtr)
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* WINPOS_SetXWindowPos
|
||||
*
|
||||
* SetWindowPos() for an X window. Used by the real SetWindowPos().
|
||||
*/
|
||||
void TTYDRV_WND_SetWindowPos(WND *wndPtr, const WINDOWPOS32 *winpos, BOOL32 bSMC_SETXPOS)
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* TTYDRV_WND_SetText
|
||||
*/
|
||||
void TTYDRV_WND_SetText(WND *wndPtr, LPCSTR text)
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* TTYDRV_WND_SetFocus
|
||||
*/
|
||||
void TTYDRV_WND_SetFocus(WND *wndPtr)
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* TTYDRV_WND_PreSizeMove
|
||||
*/
|
||||
void TTYDRV_WND_PreSizeMove(WND *wndPtr)
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* TTYDRV_WND_PostSizeMove
|
||||
*/
|
||||
void TTYDRV_WND_PostSizeMove(WND *wndPtr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* TTYDRV_WND_ScrollWindow
|
||||
*/
|
||||
void TTYDRV_WND_ScrollWindow(
|
||||
WND *wndPtr, DC *dcPtr, INT32 dx, INT32 dy,
|
||||
const RECT32 *clipRect, BOOL32 bUpdate)
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_WND_SetDrawable
|
||||
*/
|
||||
void TTYDRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL32 bSetClipOrigin)
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* TTYDRV_WND_IsSelfClipping
|
||||
*/
|
||||
BOOL32 TTYDRV_WND_IsSelfClipping(WND *wndPtr)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue