summaryrefslogtreecommitdiff
path: root/gfx/fpgfx.pas
blob: 2ad6051111b6a49ab7016987f91a89c6f00d3b73 (plain)
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
{
    fpGUI  -  Free Pascal GUI Library
    
    fpGFX  -  Main unit for the core drawing engine of fpGUI
    
    Copyright (C) 2006 - 2007 See the file AUTHORS.txt, included in this
    distribution, for details of the copyright.

    See the file COPYING.modifiedLGPL, included in this distribution,
    for details about redistributing fpGUI.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
}
unit fpgfx;

{$ifdef fpc}
  {$mode objfpc}{$H+}
{$endif}

interface

uses
  Classes, SysUtils,
  gfxinterface;

type

  { TFFont }

  TFFont = class(TDefFont)
  end;

  { TFCanvas }

  TFCanvas = class(TDefCanvas)
  end;

  { TFBitmap }

  TFBitmap = class(TDefBitmap)
  end;

  { TFScreen }

  TFScreen = class(TDefScreen)
  end;

  { TFWindow }

  TFWindow = class(TDefWindow)
  end;

  { TFApplication }

  TFApplication = class(TDefApplication)
  public
//    procedure   CreateForm(InstanceClass: TComponentClass; var Reference);
  end;

{ Using the singleton pattern to hide instance variables and
  only instantiate them when they are referred to for the first time. }
function GFScreen: TFScreen;
function GFApplication: TFApplication;


implementation


var
  uScreen: TFScreen;
  uApplication: TFApplication;


function GFScreen: TFScreen;
begin
  if uScreen = nil then
    uScreen := TFScreen.Create;
  result := uScreen;
end;

function GFApplication: TFApplication;
begin
  if uApplication = nil then
    uApplication := TFApplication.Create;
  result := uApplication;
end;


initialization
  uScreen := nil;
  uApplication := nil;

finalization
  uApplication.Free;
  uScreen.Free;

end.