~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to demo/macos/HelloMac.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{$MODE MACPAS}
 
2
{$APPTYPE GUI}
 
3
 
 
4
program HelloMac;
 
5
 
 
6
{Demo of a simple program which uses the classic Macintosh Toolbox.
 
7
 It also shows how to include a mac style resource file.}
 
8
 
 
9
USES
 
10
        MacOS;
 
11
        
 
12
{$R HelloMac.r}
 
13
 
 
14
var
 
15
        window: WindowPtr;
 
16
 
 
17
begin
 
18
        InitGraf(@qd.thePort);
 
19
        InitFonts;
 
20
        InitWindows;
 
21
        InitMenus;
 
22
        TEInit;
 
23
        InitDialogs(nil);
 
24
        InitCursor;
 
25
 
 
26
        window:= GetNewWindow(128, nil, WindowPtr(-1));
 
27
        if window <> nil then
 
28
                begin
 
29
                        SetPort(window);
 
30
                        MoveTo(20,20);
 
31
                        DrawString('Hello Free Pascal on the Mac :-)');
 
32
 
 
33
                        repeat
 
34
                        until Button;
 
35
                end;
 
36
                
 
37
end.