mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[TEXTDDI] Add a display driver for text mode (graphics mostly working, text not working in ReactOS)
This commit is contained in:
parent
636f2e3241
commit
f1440f15ea
5 changed files with 1325 additions and 0 deletions
14
win32ss/drivers/displays/textddi/CMakeLists.txt
Normal file
14
win32ss/drivers/displays/textddi/CMakeLists.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
list(APPEND SOURCE
|
||||
enable.c
|
||||
textddi.h)
|
||||
|
||||
add_library(textddi MODULE
|
||||
${SOURCE}
|
||||
textddi.rc)
|
||||
|
||||
set_module_type(textddi kerneldll ENTRYPOINT DrvEnableDriver 12)
|
||||
add_pch(textddi textddi.h SOURCE)
|
||||
target_link_libraries(textddi libcntpr)
|
||||
add_importlibs(textddi win32k)
|
||||
add_dependencies(textddi psdk)
|
||||
add_cd_file(TARGET textddi DESTINATION reactos/system32 FOR all)
|
52
win32ss/drivers/displays/textddi/cursor.h
Normal file
52
win32ss/drivers/displays/textddi/cursor.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
typedef struct tagCURSOR
|
||||
{
|
||||
BOOLEAN Visible;
|
||||
DWORD x, y;
|
||||
} CURSOR;
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
CURSOR_vInit(
|
||||
OUT CURSOR *pcur)
|
||||
{
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
CURSOR_Paint(
|
||||
IN CURSOR *pcur)
|
||||
{
|
||||
return;
|
||||
if (pcur->Visible)
|
||||
DPRINT("CURSOR_Paint: x=%u y=%u\n", pcur->x, pcur->y);
|
||||
else
|
||||
DPRINT("CURSOR_Paint: hide cursor\n");
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
CURSOR_SetVisible(
|
||||
IN CURSOR *pcur,
|
||||
IN BOOLEAN bVisible)
|
||||
{
|
||||
if (pcur->Visible ^ bVisible)
|
||||
{
|
||||
pcur->Visible = bVisible;
|
||||
CURSOR_Paint(pcur);
|
||||
}
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
CURSOR_SetPosition(
|
||||
IN CURSOR *pcur,
|
||||
IN DWORD x,
|
||||
IN DWORD y)
|
||||
{
|
||||
if (pcur->Visible && (x != pcur->x || y != pcur->y))
|
||||
{
|
||||
pcur->x = x;
|
||||
pcur->y = y;
|
||||
CURSOR_Paint(pcur);
|
||||
}
|
||||
}
|
1246
win32ss/drivers/displays/textddi/enable.c
Normal file
1246
win32ss/drivers/displays/textddi/enable.c
Normal file
File diff suppressed because it is too large
Load diff
7
win32ss/drivers/displays/textddi/textddi.h
Normal file
7
win32ss/drivers/displays/textddi/textddi.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <windef.h>
|
||||
#include <wingdi.h>
|
||||
#include <winddi.h>
|
||||
#include <winioctl.h>
|
||||
#include <ntddvdeo.h>
|
||||
|
||||
#define TAG 'DTXT'
|
6
win32ss/drivers/displays/textddi/textddi.rc
Normal file
6
win32ss/drivers/displays/textddi/textddi.rc
Normal file
|
@ -0,0 +1,6 @@
|
|||
#define REACTOS_VERSION_DLL
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "Generic / Text-only display driver"
|
||||
#define REACTOS_STR_INTERNAL_NAME "textddi"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "textddi.dll"
|
||||
#include <reactos/version.rc>
|
||||
|
Loading…
Reference in a new issue