ReactOS  0.4.14-dev-998-g623dd26
graphics.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Console Server DLL
4  * FILE: win32ss/user/winsrv/consrv_new/frontends/gui/graphics.c
5  * PURPOSE: GUI Terminal Front-End - Support for graphics-mode screen-buffers
6  * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
7  */
8 
9 /* INCLUDES *******************************************************************/
10 
11 #include "consrv.h"
12 #include "include/conio.h"
13 #include "include/settings.h"
14 #include "guisettings.h"
15 
16 #define NDEBUG
17 #include <debug.h>
18 
19 
20 /* FUNCTIONS ******************************************************************/
21 
22 VOID
24 {
25  /*
26  * This function supposes that the system clipboard was opened.
27  */
28 
29  // PCONSOLE Console = Buffer->Header.Console;
30 
32 }
33 
34 VOID
36 {
37  /*
38  * This function supposes that the system clipboard was opened.
39  */
40 
41  // PCONSOLE Console = Buffer->Header.Console;
42 
44 }
45 
46 VOID
48  PGUI_CONSOLE_DATA GuiData,
49  HDC hDC,
50  PRECT rc)
51 {
52  if (Buffer->BitMap == NULL) return;
53 
54  /* Grab the mutex */
56 
57  /*
58  * The seventh parameter (YSrc) of SetDIBitsToDevice always designates
59  * the Y-coordinate of the "lower-left corner" of the image, be the DIB
60  * in bottom-up or top-down mode.
61  */
63  /* Coordinates / size of the repainted rectangle, in the view's frame */
64  rc->left,
65  rc->top,
66  rc->right - rc->left,
67  rc->bottom - rc->top,
68  /* Coordinates / size of the corresponding image portion, in the graphics screen-buffer's frame */
69  Buffer->ViewOrigin.X + rc->left,
70  Buffer->ViewOrigin.Y + rc->top,
71  0,
72  Buffer->ScreenBufferSize.Y, // == Buffer->BitMapInfo->bmiHeader.biHeight
73  Buffer->BitMap,
74  Buffer->BitMapInfo,
75  Buffer->BitMapUsage);
76 
77  /* Release the mutex */
78  NtReleaseMutant(Buffer->Mutex, NULL);
79 }
80 
81 /* EOF */
static HDC
Definition: imagelist.c:92
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
VOID GuiCopyFromGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: graphics.c:21
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
VOID GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData, PRECT rcView, PRECT rcFramebuffer)
Definition: graphics.c:124
static HDC hDC
Definition: 3dtext.c:33
int WINAPI SetDIBitsToDevice(_In_ HDC, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ int, _In_ int, _In_ UINT, _In_ UINT, _In_ CONST VOID *, _In_ CONST BITMAPINFO *, _In_ UINT)
#define UNIMPLEMENTED
Definition: debug.h:114
LONG bottom
Definition: windef.h:309
VOID GuiPasteToGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
Definition: graphics.c:111
NTSTATUS NTAPI NtReleaseMutant(IN HANDLE MutantHandle, IN PLONG PreviousCount OPTIONAL)
Definition: mutant.c:299
NTSYSAPI NTSTATUS NTAPI NtWaitForSingleObject(IN HANDLE hObject, IN BOOLEAN bAlertable, IN PLARGE_INTEGER Timeout)