~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to packages/extra/ptc/win32/directx/displayd.inc

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
    Free Pascal port of the OpenPTC C++ library.
 
3
    Copyright (C) 2001-2003  Nikolay Nikolov (nickysn@users.sourceforge.net)
 
4
    Original C++ version by Glenn Fiedler (ptc@gaffer.org)
 
5
 
 
6
    This library is free software; you can redistribute it and/or
 
7
    modify it under the terms of the GNU Lesser General Public
 
8
    License as published by the Free Software Foundation; either
 
9
    version 2.1 of the License, or (at your option) any later version.
 
10
 
 
11
    This library is distributed in the hope that it will be useful,
 
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
    Lesser General Public License for more details.
 
15
 
 
16
    You should have received a copy of the GNU Lesser General Public
 
17
    License along with this library; if not, write to the Free Software
 
18
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
}
 
20
 
 
21
Type
 
22
  TDirectXDisplay = Class(TObject)
 
23
  Private
 
24
    Procedure internal_open(Const _mode : TPTCMode; exact : Boolean; frequency : Integer);
 
25
    Procedure internal_open_nearest(Const _mode : TPTCMode; exact : Boolean; frequency : Integer);
 
26
    Procedure internal_dispose_modes;
 
27
    Procedure internal_dispose_resolutions;
 
28
    m_open : Boolean;
 
29
    m_fullscreen : Boolean;
 
30
    m_mode : TPTCMode;
 
31
    m_window : HWND;
 
32
    m_ddraw : LPDIRECTDRAW2;
 
33
    m_modes_count : Integer;
 
34
    m_resolutions_count : Integer;
 
35
    m_modes : Array[0..255] Of TPTCMode;
 
36
    m_resolutions : Array[0..255] Of TPTCMode;
 
37
    m_information : String;
 
38
 
 
39
    m_cursorsaved : Boolean;
 
40
    m_cursorX, m_cursorY : Integer;
 
41
{    m_foreground : HWND;
 
42
    m_foreground_rect : RECT;
 
43
    m_foreground_placement : WINDOWPLACEMENT;}
 
44
  Public
 
45
    Constructor Create;
 
46
    Destructor Destroy; Override;
 
47
    Procedure setup(ddraw : LPDIRECTDRAW2);
 
48
    Function modes : PPTCMode;
 
49
    Function test(Const _mode : TPTCMode; exact : Boolean) : Boolean;
 
50
    Procedure cooperative(window : HWND; _fullscreen : Boolean);
 
51
    Procedure open;
 
52
    Procedure open(Const _mode : TPTCMode; exact : Boolean; frequency : Integer);
 
53
    Procedure close;
 
54
    Procedure save;
 
55
    Procedure restore;
 
56
    Function mode : TPTCMode;
 
57
    Function fullscreen : Boolean;
 
58
    Function information : String;
 
59
  End;