[CONSOLE.CPL-KERNEL32]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 29 May 2013 00:29:07 +0000 (00:29 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 29 May 2013 00:29:07 +0000 (00:29 +0000)
commit7c2b0668105b7445dadbe1d4f4b23fefcb500c8f
treef0fbd738a4be78b543bcf69286de527ca5294d1c
parent7791dc4bd9be7f509b64522006e6df919dc5039e
[CONSOLE.CPL-KERNEL32]
Fix some compilation warnings with MSVC.

[KERNEL32-CONSRV]
- Implement console graphics screen buffers, as described in http://blog.airesoft.co.uk/2012/10/things-ms-can-do-that-they-dont-tell-you-about-console-graphics/ .
  The idea is that the console server creates a memory shared section to be shared with the client console application (it increases performance). A mutex is used to "say" to the console server that he can repaint the screen. The function InvalidateConsoleDIBits is implemented too. The definition of the structure CONSOLE_GRAPHICS_BUFFER_INFO comes directly from the site.
- CreateConsoleScreenBuffer was modified to be able to create such buffers.
This is needed for a working NTVDM-like application.

[CONSRV]
- Rework the console buffer structures so that text-mode buffers and graphics-mode buffers can "inherit" from an "abstract" structure, CONSOLE_SCREEN_BUFFER. Add few helper functions for manipulating them.
- Reorganize the output code in "graphics.c" and "text.c" files to separate text-mode only code from graphics-mode only code, both in the console server and in the GUI front-end.

Other fixes:
- Fix mouse handling (left and right clicks when one goes away from the "Selection" mode); do not handle mouse signal when we reactivate the GUI front-end window by a click.
- Fix GetLargestConsoleWindowSize API in console server side. Now pressing Alt+F9 in Far Manager to "change" the "video" mode works correctly.

Finally:
- Start to implement a (fake, i.e. not using directly a VGA driver) console fullscreen mode. Currently Alt-Enter key presses call a stub which just alternates DPRINTing between "switch to fullscreen mode" and "switch to windowed mode".

Images here:
- Example of an application (a 16-bit emulator by Mysoft) which uses the console graphics screen-buffer functionality: http://img577.imageshack.us/img577/1693/mysoftemulatorargon.png
- A potpourri of console applications which use graphics screen-buffers: http://img571.imageshack.us/img571/6526/consoledelirium.png

Enjoy :)

svn path=/trunk/; revision=59099
30 files changed:
reactos/dll/cpl/console/console.c
reactos/dll/cpl/console/layout.c
reactos/dll/cpl/console/options.c
reactos/dll/win32/kernel32/client/console/console.c
reactos/dll/win32/kernel32/client/console/history.c
reactos/include/psdk/winbase.h
reactos/include/psdk/wincon.h
reactos/include/reactos/subsys/win/conmsg.h
reactos/win32ss/user/consrv/CMakeLists.txt
reactos/win32ss/user/consrv/api.h
reactos/win32ss/user/consrv/coninput.c
reactos/win32ss/user/consrv/conio.h
reactos/win32ss/user/consrv/conoutput.c
reactos/win32ss/user/consrv/conoutput.h
reactos/win32ss/user/consrv/console.c
reactos/win32ss/user/consrv/consrv.h
reactos/win32ss/user/consrv/frontends/gui/graphics.c [new file with mode: 0644]
reactos/win32ss/user/consrv/frontends/gui/guisettings.c
reactos/win32ss/user/consrv/frontends/gui/guisettings.h
reactos/win32ss/user/consrv/frontends/gui/guiterm.c
reactos/win32ss/user/consrv/frontends/gui/text.c [new file with mode: 0644]
reactos/win32ss/user/consrv/frontends/tui/tuiterm.c
reactos/win32ss/user/consrv/graphics.c [new file with mode: 0644]
reactos/win32ss/user/consrv/handle.c
reactos/win32ss/user/consrv/include/conio.h
reactos/win32ss/user/consrv/include/settings.h
reactos/win32ss/user/consrv/init.c
reactos/win32ss/user/consrv/lineinput.c
reactos/win32ss/user/consrv/settings.c
reactos/win32ss/user/consrv/text.c [new file with mode: 0644]