gdiconsoled.inc 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. {
  2. Free Pascal port of the OpenPTC C++ library.
  3. Copyright (C) 2001-2003 Nikolay Nikolov ([email protected])
  4. Original C++ version by Glenn Fiedler ([email protected])
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. }
  17. Type
  18. TGDIConsole = Class(TPTCBaseConsole)
  19. Private
  20. FWindow : TWin32Window;
  21. FWin32DIB : TWin32DIB;
  22. FKeyboard : TWin32Keyboard;
  23. FMouse : TWin32Mouse;
  24. FCopy : TPTCCopy;
  25. FClear : TPTCClear;
  26. FEventQueue : TEventQueue;
  27. FArea : TPTCArea;
  28. FClip : TPTCArea;
  29. FPalette : TPTCPalette;
  30. FOpen : Boolean;
  31. FLocked : Boolean;
  32. FTitle : String;
  33. FDefaultWidth : Integer;
  34. FDefaultHeight : Integer;
  35. FDefaultFormat : TPTCFormat;
  36. Function GetWidth : Integer; Override;
  37. Function GetHeight : Integer; Override;
  38. Function GetPitch : Integer; Override;
  39. Function GetArea : TPTCArea; Override;
  40. Function GetFormat : TPTCFormat; Override;
  41. Function GetPages : Integer; Override;
  42. Function GetName : String; Override;
  43. Function GetTitle : String; Override;
  44. Function GetInformation : String; Override;
  45. Procedure CheckOpen( AMessage : String);
  46. Procedure CheckUnlocked(AMessage : String);
  47. Public
  48. Constructor Create; Override;
  49. Destructor Destroy; Override;
  50. Procedure Open(Const ATitle : String; APages : Integer = 0); Overload; Override;
  51. Procedure Open(Const ATitle : String; Const AFormat : TPTCFormat;
  52. APages : Integer = 0); Overload; Override;
  53. Procedure Open(Const ATitle : String; AWidth, AHeight : Integer;
  54. Const AFormat : TPTCFormat; APages : Integer = 0); Overload; Override;
  55. Procedure Open(Const ATitle : String; Const AMode : TPTCMode;
  56. APages : Integer = 0); Overload; Override;
  57. Procedure Close; Override;
  58. Procedure Copy(Var ASurface : TPTCBaseSurface); Override;
  59. Procedure Copy(Var ASurface : TPTCBaseSurface;
  60. Const ASource, ADestination : TPTCArea); Override;
  61. Procedure Load(Const APixels : Pointer;
  62. AWidth, AHeight, APitch : Integer;
  63. Const AFormat : TPTCFormat;
  64. Const APalette : TPTCPalette); Override;
  65. Procedure Load(Const APixels : Pointer;
  66. AWidth, AHeight, APitch : Integer;
  67. Const AFormat : TPTCFormat;
  68. Const APalette : TPTCPalette;
  69. Const ASource, ADestination : TPTCArea); Override;
  70. Procedure Save(APixels : Pointer;
  71. AWidth, AHeight, APitch : Integer;
  72. Const AFormat : TPTCFormat;
  73. Const APalette : TPTCPalette); Override;
  74. Procedure Save(APixels : Pointer;
  75. AWidth, AHeight, APitch : Integer;
  76. Const AFormat : TPTCFormat;
  77. Const APalette : TPTCPalette;
  78. Const ASource, ADestination : TPTCArea); Override;
  79. Function Lock : Pointer; Override;
  80. Procedure Unlock; Override;
  81. Procedure Clear; Override;
  82. Procedure Clear(Const AColor : TPTCColor); Override;
  83. Procedure Clear(Const AColor : TPTCColor;
  84. Const AArea : TPTCArea); Override;
  85. Procedure Configure(Const AFileName : String); Override;
  86. Function Option(Const AOption : String) : Boolean; Override;
  87. Procedure Palette(Const APalette : TPTCPalette); Override;
  88. Procedure Clip(Const AArea : TPTCArea); Override;
  89. Function Clip : TPTCArea; Override;
  90. Function Palette : TPTCPalette; Override;
  91. Function Modes : PPTCMode; Override;
  92. Procedure Flush; Override;
  93. Procedure Finish; Override;
  94. Procedure Update; Override;
  95. Procedure Update(Const AArea : TPTCArea); Override;
  96. Function NextEvent(Var AEvent : TPTCEvent; AWait : Boolean; Const AEventMask : TPTCEventMask) : Boolean; Override;
  97. Function PeekEvent(AWait : Boolean; Const AEventMask : TPTCEventMask) : TPTCEvent; Override;
  98. End;