consoled.inc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. TPTCConsole=Class(TPTCBaseConsole)
  19. Private
  20. Function ConsoleCreate(index : Integer) : TPTCBaseConsole;
  21. Function ConsoleCreate(Const _name : String) : TPTCBaseConsole;
  22. Procedure check;
  23. console : TPTCBaseConsole;
  24. m_modes : Array[0..1023] Of TPTCMode;
  25. hacky_option_console_flag : Boolean;
  26. Protected
  27. Procedure internal_ReadKey(k : TPTCKey); Override;
  28. Function internal_PeekKey(k : TPTCKey) : Boolean; Override;
  29. Public
  30. Constructor Create;
  31. Destructor Destroy; Override;
  32. Procedure configure(Const _file : String); Override;
  33. Function option(Const _option : String) : Boolean; Override;
  34. Function modes : PPTCMode; Override;
  35. Procedure open(Const _title : String; _pages : Integer); Overload; Override;
  36. Procedure open(Const _title : String; Const _format : TPTCFormat;
  37. _pages : Integer); Overload; Override;
  38. Procedure open(Const _title : String; _width, _height : Integer;
  39. Const _format : TPTCFormat; _pages : Integer); Overload; Override;
  40. Procedure open(Const _title : String; Const _mode : TPTCMode;
  41. _pages : Integer); Overload; Override;
  42. {$WARNING this should be removed for fpc 1.1}
  43. {pages=0}
  44. Procedure open(Const _title : String); Overload; Override;
  45. Procedure open(Const _title : String; Const _format : TPTCFormat); Overload; Override;
  46. Procedure open(Const _title : String; _width, _height : Integer;
  47. Const _format : TPTCFormat); Overload; Override;
  48. Procedure open(Const _title : String; Const _mode : TPTCMode); Overload; Override;
  49. {/pages=0}
  50. Procedure close; Override;
  51. Procedure flush; Override;
  52. Procedure finish; Override;
  53. Procedure update; Override;
  54. Procedure update(Const _area : TPTCArea); Override;
  55. Procedure copy(Var surface : TPTCBaseSurface); Override;
  56. Procedure copy(Var surface : TPTCBaseSurface;
  57. Const source, destination : TPTCArea); Override;
  58. Function lock : Pointer; Override;
  59. Procedure unlock; Override;
  60. Procedure load(Const pixels : Pointer;
  61. _width, _height, _pitch : Integer;
  62. Const _format : TPTCFormat;
  63. Const _palette : TPTCPalette); Override;
  64. Procedure load(Const pixels : Pointer;
  65. _width, _height, _pitch : Integer;
  66. Const _format : TPTCFormat;
  67. Const _palette : TPTCPalette;
  68. Const source, destination : TPTCArea); Override;
  69. Procedure save(pixels : Pointer;
  70. _width, _height, _pitch : Integer;
  71. Const _format : TPTCFormat;
  72. Const _palette : TPTCPalette); Override;
  73. Procedure save(pixels : Pointer;
  74. _width, _height, _pitch : Integer;
  75. Const _format : TPTCFormat;
  76. Const _palette : TPTCPalette;
  77. Const source, destination : TPTCArea); Override;
  78. Procedure clear; Override;
  79. Procedure clear(Const color : TPTCColor); Override;
  80. Procedure clear(Const color : TPTCColor;
  81. Const _area : TPTCArea); Override;
  82. Procedure palette(Const _palette : TPTCPalette); Override;
  83. Function palette : TPTCPalette; Override;
  84. Procedure clip(Const _area : TPTCArea); Override;
  85. Function width : Integer; Override;
  86. Function height : Integer; Override;
  87. Function pitch : Integer; Override;
  88. Function pages : Integer; Override;
  89. Function area : TPTCArea; Override;
  90. Function clip : TPTCArea; Override;
  91. Function format : TPTCFormat; Override;
  92. Function name : String; Override;
  93. Function title : String; Override;
  94. Function information : String; Override;
  95. End;