1 2{ 3 Carbon Interface 4 5 Dummy implementation. Not tested. 6 Waiting for someone with a Mac to implement it 7} 8 9type 10 TTimerList = class 11 end; 12 13var 14 FTimerList: TTimerList; 15 16function CF_UNICODETEXT: TClipboardFormat; 17begin 18 //todo 19 Result := TClipboardFormat(0); 20end; 21 22{ 23 Only a few functions are necessary to compile VirtualTreeView: 24 BitBlt 25 GetCurrentObject 26 Set/KillTimer (Look at Qt/Gtk implementation) 27} 28 29{$define HAS_GETCURRENTOBJECT} 30{.$define HAS_MAPMODEFUNCTIONS} 31{.$define HAS_GETTEXTEXTENTEXPOINT} 32{.$define HAS_GETDOUBLECLICKTIME} 33{.$define HAS_GETTEXTALIGN} 34{.$define HAS_GETWINDOWDC} 35{.$define HAS_INVERTRECT} 36{.$define HAS_OFFSETRGN} 37{.$define HAS_REDRAWWINDOW} 38{.$define HAS_SCROLLWINDOW} 39{.$define HAS_SETBRUSHORGEX} 40 41 42{$i ../generic/stubs.inc} 43{$i ../generic/independentfunctions.inc} 44{$i ../generic/unicodefunctions.inc} 45 46 47function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, 48 YSrc: Integer; Rop: DWORD): Boolean; 49begin 50 Result := StretchMaskBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, 51 Width, Height, 0, 0, 0, Rop); 52end; 53 54function GetCurrentObject(hdc: HDC; uObjectType: UINT): HGDIOBJ; 55var 56 CarbonDC: TCarbonDeviceContext absolute hdc; 57begin 58 Result := 0; 59 with CarbonDC do 60 begin 61 case uObjectType of 62 OBJ_BITMAP: 63 begin 64 if CarbonDC is TCarbonBitmapContext then 65 Result := HGDIOBJ(TCarbonBitmapContext(CarbonDC).Bitmap); 66 end; 67 OBJ_BRUSH: Result := HGDIOBJ(CurrentBrush); 68 OBJ_FONT: Result := HGDIOBJ(CurrentFont); 69 OBJ_PEN: Result := HGDIOBJ(CurrentPen); 70 end; 71 end; 72end; 73 74function KillTimer(hWnd: THandle; nIDEvent: UINT_PTR):Boolean; 75begin 76 Result := LCLIntf.KillTimer(hWnd, nIDEvent); 77end; 78 79function SetTimer(hWnd: THandle; nIDEvent: UINT_PTR; uElapse: LongWord; lpTimerFunc: TTimerNotify): UINT_PTR; 80begin 81 Result := LCLIntf.SetTimer(hWnd, nIDEvent, uElapse, nil{lpTimerFunc}); 82end; 83