vtv: Fixes compilation in Mac OS X - Cocoa

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3536 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat
2014-09-10 13:00:09 +00:00
parent cbcff73171
commit 762033eb3b
8 changed files with 1757 additions and 0 deletions

View File

@@ -5246,7 +5246,11 @@ begin
// For the drag image a fast MMX blend routine is used. We have to make sure MMX is available.
MMXAvailable := HasMMX;
{$ifdef Windows}
IsWinVistaOrAbove := (Win32MajorVersion >= 6);
{$else}
IsWinVistaOrAbove := False;
{$endif}
{$ifdef EnableOLE}
// Initialize OLE subsystem for drag'n drop and clipboard operations.
@@ -8010,7 +8014,11 @@ begin
if FHeader.Treeview.VclStyleEnabled then
begin
SetTextColor(DC, ColorToRGB(FHeader.Treeview.FColors.HeaderFontColor));
{$ifdef Windows}
Windows.DrawTextW(DC, PWideChar(Caption), Length(Caption), Bounds, DrawFormat);
{$else}
LCLIntf.DrawText(DC, PChar(Caption), Length(Caption), Bounds, DrawFormat);
{$endif}
end
else
begin

View File

@@ -0,0 +1,2 @@
{$i ../dummyolemethods.inc}

View File

@@ -0,0 +1,23 @@
//todo: properly implement
procedure AlphaBlend(Source, Destination: HDC; const R: TRect; const Target: TPoint; Mode: TBlendMode; ConstantAlpha, Bias: Integer);
begin
case Mode of
bmConstantAlpha,
bmPerPixelAlpha,
bmMasterAlpha,
bmConstantAlphaAndColor:
begin
BitBlt(Destination, Target.X, Target.Y, R.Right - R.Left, R.Bottom - R.Top, Source, R.Left, R.Right, SRCCOPY);
end;
end;
end;
function CalculateScanline(Bits: Pointer; Width, Height, Row: Integer): Pointer;
begin
Result := nil;
end;
function GetBitmapBitsFromBitmap(Bitmap: HBITMAP): Pointer;
begin
Result := nil;
end;

View File

@@ -0,0 +1,2 @@
{$i ../dummydragmanager.inc}

View File

@@ -0,0 +1,3 @@
unit FakeActiveX;
{$i ../dummyactivex.inc}

View File

@@ -0,0 +1,38 @@
unit fakemmsystem;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Types;
function timeBeginPeriod(x1: DWord): DWord;
function timeEndPeriod(x1: DWord): DWord;
function timeGetTime: DWORD;
implementation
function timeBeginPeriod(x1: DWord): DWord;
begin
end;
function timeEndPeriod(x1: DWord): DWord;
begin
end;
function timeGetTime: DWORD;
var
ATime: TSystemTime;
begin
//todo: properly implement
GetLocalTime(ATime);
Result := ATime.MilliSecond;
end;
end.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,58 @@
unit virtualpanningwindow;
{$mode objfpc}{$H+}
interface
uses
LCLType, Graphics, Classes, SysUtils;
type
{ TVirtualPanningWindow }
TVirtualPanningWindow = class
private
FHandle: THandle;
FOwnerHandle: THandle;
FImage: TBitmap;
procedure HandlePaintMessage;
public
procedure Start(OwnerHandle: THandle; const Position: TPoint);
procedure Stop;
procedure Show(ClipRegion: HRGN);
property Image: TBitmap read FImage;
property Handle: THandle read FHandle;
end;
implementation
{$ifdef DEBUG_VTV}
uses
vtlogger;
{$endif}
{ TVirtualPanningWindow }
procedure TVirtualPanningWindow.HandlePaintMessage;
begin
end;
procedure TVirtualPanningWindow.Start(OwnerHandle: THandle; const Position: TPoint);
begin
FImage := TBitmap.Create;
end;
procedure TVirtualPanningWindow.Stop;
begin
FImage.Free;
FImage := nil;
end;
procedure TVirtualPanningWindow.Show(ClipRegion: HRGN);
begin
{$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif}
end;
end.