Commit 09ddb591 authored by Alexandre Julliard's avatar Alexandre Julliard

Make USER and GDI separate dlls.

parent ae50941a
...@@ -39,16 +39,11 @@ LIBRARIES = \ ...@@ -39,16 +39,11 @@ LIBRARIES = \
# Sub-directories to run make depend/clean into # Sub-directories to run make depend/clean into
SUBDIRS = \ SUBDIRS = \
console \ console \
controls \
debugger \ debugger \
dlls \ dlls \
dlls/ntdll \ dlls/ntdll \
documentation \ documentation \
files \ files \
graphics \
graphics/enhmetafiledrv \
graphics/metafiledrv \
graphics/win16drv \
if1632 \ if1632 \
include \ include \
library \ library \
...@@ -60,7 +55,6 @@ SUBDIRS = \ ...@@ -60,7 +55,6 @@ SUBDIRS = \
misc \ misc \
miscemu \ miscemu \
msdos \ msdos \
objects \
ole \ ole \
programs \ programs \
relay32 \ relay32 \
...@@ -69,8 +63,7 @@ SUBDIRS = \ ...@@ -69,8 +63,7 @@ SUBDIRS = \
server \ server \
tools \ tools \
unicode \ unicode \
win32 \ win32
windows
# Sub-directories to run make install into # Sub-directories to run make install into
INSTALLSUBDIRS = \ INSTALLSUBDIRS = \
...@@ -83,14 +76,9 @@ INSTALLSUBDIRS = \ ...@@ -83,14 +76,9 @@ INSTALLSUBDIRS = \
unicode unicode
LIBOBJS = \ LIBOBJS = \
controls/controls.o \
console/console.o \ console/console.o \
dlls/ntdll/ntdll.o \ dlls/ntdll/ntdll.o \
files/files.o \ files/files.o \
graphics/graphics.o \
graphics/enhmetafiledrv/enhmetafiledrv.o \
graphics/metafiledrv/metafiledrv.o \
graphics/win16drv/win16drv.o \
if1632/if1632.o \ if1632/if1632.o \
loader/loader.o \ loader/loader.o \
loader/ne/ne.o \ loader/ne/ne.o \
...@@ -98,13 +86,11 @@ LIBOBJS = \ ...@@ -98,13 +86,11 @@ LIBOBJS = \
memory/memory.o \ memory/memory.o \
misc/misc.o \ misc/misc.o \
msdos/msdos.o \ msdos/msdos.o \
objects/objects.o \
ole/ole.o \ ole/ole.o \
relay32/relay32.o \ relay32/relay32.o \
resources/resources.o \ resources/resources.o \
scheduler/scheduler.o \ scheduler/scheduler.o \
win32/win32.o \ win32/win32.o
windows/windows.o
EMUOBJS = \ EMUOBJS = \
miscemu/miscemu.o miscemu/miscemu.o
......
...@@ -2,4 +2,5 @@ ...@@ -2,4 +2,5 @@
*.spec.glue.s *.spec.glue.s
Makefile Makefile
libgdi32.so.1.0 libgdi32.so.1.0
printdrv.glue.c
thunk.glue.c thunk.glue.c
...@@ -9,12 +9,30 @@ ALTNAMES = gdi dispdib wing ...@@ -9,12 +9,30 @@ ALTNAMES = gdi dispdib wing
C_SRCS = \ C_SRCS = \
bidi16.c \ bidi16.c \
gdi_main.c \ gdi_main.c \
printdrv.c \
thunk.c \ thunk.c \
wing.c wing.c
GLUE = thunk.c GLUE = printdrv.c thunk.c
EXTRA_OBJS = \
$(TOPOBJDIR)/graphics/graphics.o \
$(TOPOBJDIR)/graphics/enhmetafiledrv/enhmetafiledrv.o \
$(TOPOBJDIR)/graphics/metafiledrv/metafiledrv.o \
$(TOPOBJDIR)/graphics/win16drv/win16drv.o \
$(TOPOBJDIR)/objects/objects.o
SUBDIRS = \
$(TOPOBJDIR)/graphics \
$(TOPOBJDIR)/graphics/enhmetafiledrv \
$(TOPOBJDIR)/graphics/metafiledrv \
$(TOPOBJDIR)/graphics/win16drv \
$(TOPOBJDIR)/objects
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
$(EXTRA_OBJS): $(TOOLSUBDIRS) dummy
@cd `dirname $@` && $(MAKE) `basename $@`
### Dependencies: ### Dependencies:
...@@ -21,8 +21,11 @@ owner kernel32 ...@@ -21,8 +21,11 @@ owner kernel32
66 pascal16 StackTraceFirst(ptr word) StackTraceFirst16 66 pascal16 StackTraceFirst(ptr word) StackTraceFirst16
67 pascal16 StackTraceCSIPFirst(ptr word word word word) StackTraceCSIPFirst16 67 pascal16 StackTraceCSIPFirst(ptr word word word word) StackTraceCSIPFirst16
68 pascal16 StackTraceNext(ptr) StackTraceNext16 68 pascal16 StackTraceNext(ptr) StackTraceNext16
69 pascal16 ClassFirst(ptr) ClassFirst16 #69 pascal16 ClassFirst(ptr) ClassFirst16
70 pascal16 ClassNext(ptr) ClassNext16 #70 pascal16 ClassNext(ptr) ClassNext16
#FIXME: window classes are USER objects
69 stub ClassFirst
70 stub ClassNext
71 pascal16 SystemHeapInfo(ptr) SystemHeapInfo16 71 pascal16 SystemHeapInfo(ptr) SystemHeapInfo16
72 pascal16 MemManInfo(ptr) MemManInfo16 72 pascal16 MemManInfo(ptr) MemManInfo16
73 pascal16 NotifyRegister(word segptr word) NotifyRegister16 73 pascal16 NotifyRegister(word segptr word) NotifyRegister16
......
...@@ -24,7 +24,18 @@ RC_SRCS = \ ...@@ -24,7 +24,18 @@ RC_SRCS = \
GLUE = thunk.c GLUE = thunk.c
EXTRA_OBJS = \
$(TOPOBJDIR)/controls/controls.o \
$(TOPOBJDIR)/windows/windows.o
SUBDIRS = \
$(TOPOBJDIR)/controls \
$(TOPOBJDIR)/windows
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
$(EXTRA_OBJS): $(TOOLSUBDIRS) dummy
@cd `dirname $@` && $(MAKE) `basename $@`
### Dependencies: ### Dependencies:
...@@ -17,15 +17,12 @@ C_SRCS = \ ...@@ -17,15 +17,12 @@ C_SRCS = \
main.c \ main.c \
options.c \ options.c \
port.c \ port.c \
printdrv.c \
registry.c \ registry.c \
system.c \ system.c \
tweak.c \ tweak.c \
version.c \ version.c \
wsprintf.c wsprintf.c
GLUE = printdrv.c
all: $(MODULE).o all: $(MODULE).o
@MAKE_RULES@ @MAKE_RULES@
......
...@@ -28,7 +28,6 @@ typedef struct { ...@@ -28,7 +28,6 @@ typedef struct {
void WINAPI INT_Int09Handler( CONTEXT86 *context ) void WINAPI INT_Int09Handler( CONTEXT86 *context )
{ {
BYTE ascii, scan = INT_Int09ReadScan(&ascii); BYTE ascii, scan = INT_Int09ReadScan(&ascii);
UINT vkey = MapVirtualKeyA(scan&0x7f, 1);
BYTE ch[2]; BYTE ch[2];
int cnt, c2; int cnt, c2;
...@@ -39,8 +38,13 @@ void WINAPI INT_Int09Handler( CONTEXT86 *context ) ...@@ -39,8 +38,13 @@ void WINAPI INT_Int09Handler( CONTEXT86 *context )
ch[0] = ascii; ch[0] = ascii;
cnt = 1; cnt = 1;
} else { } else {
#if 0 /* FIXME: cannot call USER functions here */
UINT vkey = MapVirtualKeyA(scan&0x7f, 1);
/* as in TranslateMessage, windows/input.c */ /* as in TranslateMessage, windows/input.c */
cnt = ToAscii(vkey, scan, QueueKeyStateTable, (LPWORD)ch, 0); cnt = ToAscii(vkey, scan, QueueKeyStateTable, (LPWORD)ch, 0);
#else
cnt = 0;
#endif
} }
if (cnt>0) { if (cnt>0) {
for (c2=0; c2<cnt; c2++) for (c2=0; c2<cnt; c2++)
......
...@@ -58,6 +58,7 @@ void WINAPI INT_Int16Handler( CONTEXT86 *context ) ...@@ -58,6 +58,7 @@ void WINAPI INT_Int16Handler( CONTEXT86 *context )
case 0x02: /* Get Shift Flags */ case 0x02: /* Get Shift Flags */
AL_reg(context) = 0; AL_reg(context) = 0;
#if 0 /* FIXME: cannot call USER functions here */
if (GetAsyncKeyState(VK_RSHIFT)) if (GetAsyncKeyState(VK_RSHIFT))
AL_reg(context) |= 0x01; AL_reg(context) |= 0x01;
if (GetAsyncKeyState(VK_LSHIFT)) if (GetAsyncKeyState(VK_LSHIFT))
...@@ -74,6 +75,7 @@ void WINAPI INT_Int16Handler( CONTEXT86 *context ) ...@@ -74,6 +75,7 @@ void WINAPI INT_Int16Handler( CONTEXT86 *context )
AL_reg(context) |= 0x40; AL_reg(context) |= 0x40;
if (GetAsyncKeyState(VK_INSERT)) if (GetAsyncKeyState(VK_INSERT))
AL_reg(context) |= 0x80; AL_reg(context) |= 0x80;
#endif
TRACE("Get Shift Flags: returning 0x%02x\n", AL_reg(context)); TRACE("Get Shift Flags: returning 0x%02x\n", AL_reg(context));
break; break;
......
...@@ -765,6 +765,7 @@ BOOL WINAPI AttachThreadInput( ...@@ -765,6 +765,7 @@ BOOL WINAPI AttachThreadInput(
DWORD idAttachTo, /* [in] Thread to attach to */ DWORD idAttachTo, /* [in] Thread to attach to */
BOOL fAttach) /* [in] Attach or detach */ BOOL fAttach) /* [in] Attach or detach */
{ {
#if 0 /* FIXME: cannot call USER functions here */
MESSAGEQUEUE *pSrcMsgQ = 0, *pTgtMsgQ = 0; MESSAGEQUEUE *pSrcMsgQ = 0, *pTgtMsgQ = 0;
BOOL16 bRet = 0; BOOL16 bRet = 0;
...@@ -829,6 +830,10 @@ CLEANUP: ...@@ -829,6 +830,10 @@ CLEANUP:
QUEUE_Unlock( pTgtMsgQ ); QUEUE_Unlock( pTgtMsgQ );
return bRet; return bRet;
#endif
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
FIXME( "broken for now\n" );
return FALSE;
} }
/********************************************************************** /**********************************************************************
......
...@@ -97,6 +97,7 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) { ...@@ -97,6 +97,7 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) {
ir.Event.KeyEvent.dwControlKeyState|=LEFT_ALT_PRESSED; ir.Event.KeyEvent.dwControlKeyState|=LEFT_ALT_PRESSED;
inchar &= ~0x80; inchar &= ~0x80;
} }
#if 0 /* FIXME: cannot call USER functions here */
ir.Event.KeyEvent.wVirtualKeyCode = VkKeyScan16(inchar); ir.Event.KeyEvent.wVirtualKeyCode = VkKeyScan16(inchar);
if (ir.Event.KeyEvent.wVirtualKeyCode & 0x0100) if (ir.Event.KeyEvent.wVirtualKeyCode & 0x0100)
ir.Event.KeyEvent.dwControlKeyState|=SHIFT_PRESSED; ir.Event.KeyEvent.dwControlKeyState|=SHIFT_PRESSED;
...@@ -108,6 +109,10 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) { ...@@ -108,6 +109,10 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) {
ir.Event.KeyEvent.wVirtualKeyCode & 0x00ff, ir.Event.KeyEvent.wVirtualKeyCode & 0x00ff,
0 /* VirtualKeyCodes to ScanCode */ 0 /* VirtualKeyCodes to ScanCode */
); );
#else
ir.Event.KeyEvent.wVirtualKeyCode = 0;
ir.Event.KeyEvent.wVirtualScanCode = 0;
#endif
ir.Event.KeyEvent.uChar.AsciiChar = inchar; ir.Event.KeyEvent.uChar.AsciiChar = inchar;
if ((inchar==127)||(inchar=='\b')) { /* backspace */ if ((inchar==127)||(inchar=='\b')) { /* backspace */
...@@ -140,10 +145,15 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) { ...@@ -140,10 +145,15 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) {
ir.Event.KeyEvent.bKeyDown = 1; ir.Event.KeyEvent.bKeyDown = 1;
ir.Event.KeyEvent.wRepeatCount = 0; ir.Event.KeyEvent.wRepeatCount = 0;
#if 0 /* FIXME: cannot call USER functions here */
ir.Event.KeyEvent.wVirtualKeyCode = VkKeyScan16(27); ir.Event.KeyEvent.wVirtualKeyCode = VkKeyScan16(27);
ir.Event.KeyEvent.wVirtualScanCode = MapVirtualKey16( ir.Event.KeyEvent.wVirtualScanCode = MapVirtualKey16(
ir.Event.KeyEvent.wVirtualKeyCode,0 ir.Event.KeyEvent.wVirtualKeyCode,0
); );
#else
ir.Event.KeyEvent.wVirtualKeyCode = VK_ESCAPE;
ir.Event.KeyEvent.wVirtualScanCode = 1;
#endif
ir.Event.KeyEvent.dwControlKeyState = 0; ir.Event.KeyEvent.dwControlKeyState = 0;
ir.Event.KeyEvent.uChar.AsciiChar = 27; ir.Event.KeyEvent.uChar.AsciiChar = 27;
assert(WriteConsoleInputA( hConsoleInput, &ir, 1, &junk )); assert(WriteConsoleInputA( hConsoleInput, &ir, 1, &junk ));
...@@ -225,7 +235,11 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) { ...@@ -225,7 +235,11 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) {
} }
if (scancode) { if (scancode) {
ir.Event.KeyEvent.wVirtualScanCode = scancode; ir.Event.KeyEvent.wVirtualScanCode = scancode;
#if 0 /* FIXME: cannot call USER functions here */
ir.Event.KeyEvent.wVirtualKeyCode = MapVirtualKey16(scancode,1); ir.Event.KeyEvent.wVirtualKeyCode = MapVirtualKey16(scancode,1);
#else
ir.Event.KeyEvent.wVirtualKeyCode = 0;
#endif
assert(WriteConsoleInputA( hConsoleInput, &ir, 1, &junk )); assert(WriteConsoleInputA( hConsoleInput, &ir, 1, &junk ));
ir.Event.KeyEvent.bKeyDown = 0; ir.Event.KeyEvent.bKeyDown = 0;
assert(WriteConsoleInputA( hConsoleInput, &ir, 1, &junk )); assert(WriteConsoleInputA( hConsoleInput, &ir, 1, &junk ));
......
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