From 5491cb4d9920ba577a88b7b08256f5b8763ec9f7 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Thu, 2 Feb 2012 08:42:35 +0000 Subject: [PATCH] blitter prerequisite git-svn-id: svn://kolibrios.org@2341 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/peload.inc | 1 + kernel/trunk/gui/window.inc | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/kernel/trunk/core/peload.inc b/kernel/trunk/core/peload.inc index 882854c39a..e2583f0f9f 100644 --- a/kernel/trunk/core/peload.inc +++ b/kernel/trunk/core/peload.inc @@ -306,6 +306,7 @@ __exports: \ get_display, 'GetDisplay', \ set_screen, 'SetScreen', \ + window._.get_rect, 'GetWindowRect', \ ; gcc fastcall pci_api_drv, 'PciApi', \ pci_read8, 'PciRead8', \ ; stdcall pci_read16, 'PciRead16', \ ; stdcall diff --git a/kernel/trunk/gui/window.inc b/kernel/trunk/gui/window.inc index 8b376ae6cb..c664aa2a8c 100644 --- a/kernel/trunk/gui/window.inc +++ b/kernel/trunk/gui/window.inc @@ -2190,3 +2190,28 @@ window._.end_moving__box: ;////////////////////////////////////////////////// push eax ebx esi xor esi, esi jmp window._.draw_negative_box.1 + + +;------------------------------------------------------------------------------ +window._.get_rect: ;///////////////////////////////////////////////////// +;------------------------------------------------------------------------------ +;? void __fastcall get_window_rect(struct RECT* rc); +;------------------------------------------------------------------------------ +;> ecx = pointer to RECT +;------------------------------------------------------------------------------ + mov eax, [TASK_BASE] + + mov edx, [eax-twdw + WDATA.box.left] + mov [ecx+RECT.left], edx + + add edx, [eax-twdw + WDATA.box.width] + mov [ecx+RECT.right], edx + + mov edx, [eax-twdw + WDATA.box.top] + mov [ecx+RECT.top], edx + + add edx, [eax-twdw + WDATA.box.height] + mov [ecx+RECT.bottom], edx + + ret +