mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 19:19:31 +01:00
Printers, removed cabonprinting unit from C. Western, issue #15861
git-svn-id: trunk@24017 -
This commit is contained in:
parent
1f0338e1d3
commit
dd7a6d6209
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1641,7 +1641,6 @@ components/printers/Makefile svneol=native#text/plain
|
||||
components/printers/Makefile.fpc svneol=native#text/plain
|
||||
components/printers/carbon/carbonprinters.inc svneol=native#text/pascal
|
||||
components/printers/carbon/carbonprinters_h.inc svneol=native#text/pascal
|
||||
components/printers/carbon/carbonprinting.pas svneol=native#text/pascal
|
||||
components/printers/carbon/carbonprndialogs.inc svneol=native#text/pascal
|
||||
components/printers/carbon/issues.xml svneol=native#text/xml
|
||||
components/printers/design/Makefile svneol=native#text/plain
|
||||
|
||||
@ -529,9 +529,12 @@ begin
|
||||
end;
|
||||
|
||||
function TCarbonPrinter.GetPrinterType: TPrinterType;
|
||||
var
|
||||
IsRemote: Boolean;
|
||||
begin
|
||||
Result := ptLocal;
|
||||
if PMPrinterIsRemote(GetCurrentPrinter) then Result := ptNetwork
|
||||
OSError(PMPrinterIsRemote(GetCurrentPrinter,IsRemote), Self, 'GetPrinterType', 'PMPrinterIsRemote');
|
||||
if IsRemote then Result := ptNetwork
|
||||
end;
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ uses
|
||||
{$else}
|
||||
MacOSAll,
|
||||
{$endif}
|
||||
Classes, SysUtils, Printers, LCLType, CarbonCanvas, CarbonPrinting;
|
||||
Classes, SysUtils, Printers, LCLType, CarbonCanvas;
|
||||
|
||||
type
|
||||
{ TCarbonPrinterContext }
|
||||
|
||||
@ -1,48 +0,0 @@
|
||||
unit CarbonPrinting;
|
||||
|
||||
{$mode macpas}
|
||||
{$packenum 1}
|
||||
{$macro on}
|
||||
{$inline on}
|
||||
{$CALLING MWPASCAL}
|
||||
{$ALIGN MAC68K}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
{$ifdef ver2_2_0}
|
||||
FPCMacOSAll;
|
||||
{$else}
|
||||
MacOSAll;
|
||||
{$endif}
|
||||
|
||||
// functions missing in MacOSAll
|
||||
type
|
||||
PMPaper = ^SInt32; { an opaque 32-bit type }
|
||||
PMPaperPtr = ^PMPaper; { when a var xx:PMPaper parameter can be nil, it is changed to xx: PMPaperPtr }
|
||||
PMServer = ^SInt32; { an opaque 32-bit type }
|
||||
|
||||
function PMPaperGetName(paper: PMPaper; var paperName: CFStringRef): OSStatus; external name '_PMPaperGetName';
|
||||
|
||||
function PMServerCreatePrinterList(server: PMServer; var printerList: CFArrayRef): OSStatus; external name '_PMServerCreatePrinterList';
|
||||
|
||||
function PMPrinterGetName(printer: PMPrinter): CFStringRef; external name '_PMPrinterGetName';
|
||||
function PMPrinterGetState(printer: PMPrinter; var state: PMPrinterState): OSStatus; external name '_PMPrinterGetState';
|
||||
function PMPrinterIsDefault(printer: PMPrinter): Boolean; external name '_PMPrinterIsDefault';
|
||||
function PMPrinterIsRemote(printer: PMPrinter): Boolean; external name '_PMPrinterIsRemote';
|
||||
function PMPrinterGetPaperList(printer: PMPrinter; var paperList: CFArrayRef): OSStatus; external name '_PMPrinterGetPaperList';
|
||||
|
||||
function PMCreatePageFormatWithPMPaper(var pageFormat: PMPageFormat; paper: PMPaper): OSStatus; external name '_PMCreatePageFormatWithPMPaper';
|
||||
function PMGetPageFormatPaper(pageFormat: PMPageFormat; var paper: PMPaper): OSStatus; external name '_PMGetPageFormatPaper';
|
||||
|
||||
function PMSessionBeginCGDocument(printSession: PMPrintSession; printSettings: PMPrintSettings;
|
||||
pageFormat: PMPageFormat): OSStatus; external name '_PMSessionBeginCGDocument';
|
||||
function PMSessionSetCurrentPMPrinter(session: PMPrintSession; printer: PMPrinter): OSStatus; external name '_PMSessionSetCurrentPMPrinter';
|
||||
function PMSessionGetCGGraphicsContext(session: PMPrintSession; var context: CGContextRef): OSStatus; external name '_PMSessionGetCGGraphicsContext';
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user