#define NDEBUG
#include <debug.h>
+#include "guiterm.h"
+
/* FUNCTIONS ******************************************************************/
VOID
* This function supposes that the system clipboard was opened.
*/
- PCONSOLE Console = Buffer->Header.Console;
-
HDC hMemDC;
HBITMAP hBitmapTarget, hBitmapOld;
HPALETTE hPalette, hPaletteOld;
if (Buffer->BitMap == NULL) return;
- selWidth = Console->Selection.srSelection.Right - Console->Selection.srSelection.Left + 1;
- selHeight = Console->Selection.srSelection.Bottom - Console->Selection.srSelection.Top + 1;
- DPRINT1("Selection is (%d|%d) to (%d|%d)\n",
- Console->Selection.srSelection.Left,
- Console->Selection.srSelection.Top,
- Console->Selection.srSelection.Right,
- Console->Selection.srSelection.Bottom);
+ selWidth = GuiData->Selection.srSelection.Right - GuiData->Selection.srSelection.Left + 1;
+ selHeight = GuiData->Selection.srSelection.Bottom - GuiData->Selection.srSelection.Top + 1;
+ DPRINT("Selection is (%d|%d) to (%d|%d)\n",
+ GuiData->Selection.srSelection.Left,
+ GuiData->Selection.srSelection.Top,
+ GuiData->Selection.srSelection.Right,
+ GuiData->Selection.srSelection.Bottom);
hMemDC = CreateCompatibleDC(GuiData->hMemDC);
if (hMemDC == NULL) return;
StretchDIBits(hMemDC,
0, 0,
selWidth, selHeight,
- Console->Selection.srSelection.Left,
- Console->Selection.srSelection.Top,
+ GuiData->Selection.srSelection.Left,
+ GuiData->Selection.srSelection.Top,
selWidth, selHeight,
Buffer->BitMap,
Buffer->BitMapInfo,
0, 0,
selWidth, selHeight,
/* Coordinates / size of the corresponding image portion, in the graphics screen-buffer's frame */
- Console->Selection.srSelection.Left,
- Console->Selection.srSelection.Top,
+ GuiData->Selection.srSelection.Left,
+ GuiData->Selection.srSelection.Top,
0,
Buffer->ScreenBufferSize.Y, // == Buffer->BitMapInfo->bmiHeader.biHeight
Buffer->BitMap,
* This function supposes that the system clipboard was opened.
*/
- // PCONSOLE Console = Buffer->Header.Console;
+ // PCONSRV_CONSOLE Console = Buffer->Header.Console;
UNIMPLEMENTED;
}
PRECT rcView,
PRECT rcFramebuffer)
{
+ PCONSRV_CONSOLE Console = Buffer->Header.Console;
+ // ASSERT(Console == GuiData->Console);
+
if (Buffer->BitMap == NULL) return;
+ if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return;
+
rcFramebuffer->left = Buffer->ViewOrigin.X * 1 + rcView->left;
rcFramebuffer->top = Buffer->ViewOrigin.Y * 1 + rcView->top;
rcFramebuffer->right = Buffer->ViewOrigin.X * 1 + rcView->right;
/* Release the mutex */
NtReleaseMutant(Buffer->Mutex, NULL);
+
+ LeaveCriticalSection(&Console->Lock);
}
/* EOF */