mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:59:08 +02:00
lcl: darwin: allow link under mac os x 10.5, issue #33672
git-svn-id: trunk@57792 -
This commit is contained in:
parent
d70ed14246
commit
e18cac9559
@ -527,7 +527,9 @@ begin
|
|||||||
|
|
||||||
{ Get's a screenshot }
|
{ Get's a screenshot }
|
||||||
displayID := CGMainDisplayID();
|
displayID := CGMainDisplayID();
|
||||||
|
{$IF not defined(MAC_OS_X_VERSION_MIN_REQUIRED) or (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)}
|
||||||
ScreenImage := CGDisplayCreateImage(displayID);
|
ScreenImage := CGDisplayCreateImage(displayID);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{ Fills the image description }
|
{ Fills the image description }
|
||||||
ARawImage.Init;
|
ARawImage.Init;
|
||||||
|
@ -396,6 +396,7 @@ begin
|
|||||||
|
|
||||||
lDataType := ccdtNonStandard;
|
lDataType := ccdtNonStandard;
|
||||||
// See PredefinedClipboardMimeTypes for the most common mime-types
|
// See PredefinedClipboardMimeTypes for the most common mime-types
|
||||||
|
{$IF not defined(MAC_OS_X_VERSION_MIN_REQUIRED) or (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)}
|
||||||
case AMimeType of
|
case AMimeType of
|
||||||
'text/plain':
|
'text/plain':
|
||||||
begin
|
begin
|
||||||
@ -415,6 +416,9 @@ begin
|
|||||||
lDataType := ccdtBitmap;
|
lDataType := ccdtBitmap;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
|
{$ELSE}
|
||||||
|
begin
|
||||||
|
{$ENDIF}
|
||||||
lNSStr := NSStringUtf8(AMimeType);
|
lNSStr := NSStringUtf8(AMimeType);
|
||||||
lDataType := ccdtNonStandard;
|
lDataType := ccdtNonStandard;
|
||||||
end;
|
end;
|
||||||
|
@ -168,7 +168,9 @@ begin
|
|||||||
ARawImage.Description.Init_BPP32_A8R8G8B8_BIO_TTB(ScreenBitmapWidth, ScreenBitmapHeight);
|
ARawImage.Description.Init_BPP32_A8R8G8B8_BIO_TTB(ScreenBitmapWidth, ScreenBitmapHeight);
|
||||||
|
|
||||||
// Take the screenshot
|
// Take the screenshot
|
||||||
|
{$IF not defined(MAC_OS_X_VERSION_MIN_REQUIRED) or (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)}
|
||||||
screenshotImage := CGDisplayCreateImage(CGMainDisplayID()); // Requires 10.6+
|
screenshotImage := CGDisplayCreateImage(CGMainDisplayID()); // Requires 10.6+
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
// Draw it to our screen bitmap
|
// Draw it to our screen bitmap
|
||||||
lRect := CGRectMake(0, 0, ScreenBitmapWidth, ScreenBitmapHeight);
|
lRect := CGRectMake(0, 0, ScreenBitmapWidth, ScreenBitmapHeight);
|
||||||
|
Loading…
Reference in New Issue
Block a user