File: osprinters.pas

package info (click to toggle)
lazarus 4.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 275,760 kB
  • sloc: pascal: 2,341,904; xml: 509,420; makefile: 348,726; cpp: 93,608; sh: 3,387; java: 609; perl: 297; sql: 222; ansic: 137
file content (107 lines) | stat: -rw-r--r-- 2,595 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
 ***************************************************************************
                                osprinters.pas
                                ------------
                               Printer object
                     Initial Revision  : 09 Mars 2005

 ***************************************************************************

 *****************************************************************************
  This file is part of the Printer4Lazarus package

  See the file COPYING.modifiedLGPL.txt, included in this distribution,
  for details about the license.
 *****************************************************************************

  Author: Olivier

  Abstract :
    Unit to centralize the implementation of Printer according to the target OS

  history
    09/03/2005 OG - Create
-----------------------------------------------------------------------------}
unit OSPrinters;

{$mode objfpc}{$H+}

interface

{$IFDEF WinCE}
{$FATAL This unit (and therefore the Printers4Lazarus package) cannot be built for WinCE}
{$ENDIF}

{$IFDEF UNIX}
  {$IFDEF DARWIN}
    {$IFDEF LCLCarbon}
      {$IFNDEF NativePrint}
        {$I cupsprinters_h.inc}
      {$ELSE}
        {$I carbonprinters_h.inc}
      {$ENDIF}
    {$ENDIF}
    {$IFDEF LCLCocoa}
      {$I cocoaprinters_h.inc}
    {$ENDIF}
    {$IF DEFINED(LCLQt) OR DEFINED(LCLQt5) OR DEFINED(LCLQt6)}
      {$I qtprinters_h.inc}
    {$ENDIF}
    {$IFDEF LCLGtk2}
      {$I cupsprinters_h.inc}
    {$ENDIF}
  {$ELSE}
    {$IF DEFINED(LCLQt) OR DEFINED(LCLQt5) OR DEFINED(LCLQt6)}
      {$I qtprinters_h.inc}
    {$ELSE}
      {$I cupsprinters_h.inc}
    {$ENDIF}
  {$ENDIF}
{$ENDIF}

{$IFDEF MSWindows}
  {$IF DEFINED(LCLQt) OR DEFINED(LCLQt5) OR DEFINED(LCLQt6)}
    {$I qtprinters_h.inc}
  {$ELSE}
    {$I winprinters_h.inc}
  {$ENDIF}
{$ENDIF}

implementation

{$IFDEF UNIX}
  {$IFDEF DARWIN}
    {$IFDEF LCLCarbon}
      {$IFNDEF NativePrint}
        {$I cupsprinters.inc}
      {$ELSE}
        {$I carbonprinters.inc}
      {$ENDIF}
    {$ENDIF}
    {$IFDEF LCLCocoa}
      {$I cocoaprinters.inc}
    {$ENDIF}
    {$IF DEFINED(LCLQt) OR DEFINED(LCLQt5) OR DEFINED(LCLQt6)}
      {$I qtprinters.inc}
    {$ENDIF}
    {$IFDEF LCLGtk2}
      {$I cupsprinters.inc}
    {$ENDIF}
  {$ELSE}
    {$IF DEFINED(LCLQt) OR DEFINED(LCLQt5) OR DEFINED(LCLQt6)}
      {$I qtprinters.inc}
    {$ELSE}
      {$I cupsprinters.inc}
    {$ENDIF}
  {$ENDIF}
{$ENDIF}

{$IFDEF MSWindows}
  {$IF DEFINED(LCLQt) OR DEFINED(LCLQt5) OR DEFINED(LCLQt6)}
    {$I qtprinters.inc}
  {$ELSE}
    {$I winprinters.inc}
  {$ENDIF}
{$ENDIF}

end.