Gtk2: implemented GetBkColor(). part of #14792.

git-svn-id: trunk@27391 -
This commit is contained in:
zeljko 2010-09-17 06:38:24 +00:00
parent bfc3350f00
commit dfbf7ae956
2 changed files with 10 additions and 2 deletions

View File

@ -3764,6 +3764,15 @@ begin
DebugLn('WARNING: [TGtk2WidgetSet.GetBitmapBits] invalid Bitmap!');
end;
function TGtk2WidgetSet.GetBkColor(DC: HDC): TColorRef;
var
DevCtx: TGtkDeviceContext absolute DC;
begin
Result := CLR_INVALID;
if IsValidDC(DC) then
Result := DevCtx.CurrentBackColor.ColorRef;
end;
{------------------------------------------------------------------------------
Function: GetCapture
Params: none
@ -7613,8 +7622,6 @@ end;
------------------------------------------------------------------------------}
function TGtk2WidgetSet.SetBKColor(DC: HDC; Color: TColorRef): TColorRef;
var
DevCtx: TGtkDeviceContext absolute DC;
begin
Assert(False, Format('trace:> [TGtk2WidgetSet.SetBKColor] DC: 0x%x Color: %8x', [Integer(DC), Color]));
Result := CLR_INVALID;

View File

@ -104,6 +104,7 @@ function HideCaret(hWnd: HWND): Boolean; override;
function GetActiveWindow : HWND; override;
function GetBitmapBits(Bitmap: HBITMAP; Count: Longint; Bits: Pointer): Longint; override;
function GetBkColor(DC: HDC): TColorRef; override;
function GetCapture: HWND; override;
function GetCaretPos(var lpPoint: TPoint): Boolean; override;
function GetCaretRespondToFocus(handle: HWND; var ShowHideOnFocus: boolean): Boolean; override;