consoled.inc 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. { setup }
  2. Function ptc_console_create : TPTC_CONSOLE;
  3. Procedure ptc_console_destroy(obj : TPTC_CONSOLE);
  4. { console configuration }
  5. Procedure ptc_console_configure(obj : TPTC_CONSOLE; _file : String);
  6. { console option string }
  7. Function ptc_console_option(obj : TPTC_CONSOLE; _option : String) : Boolean;
  8. { console modes }
  9. Function ptc_console_mode(obj : TPTC_CONSOLE; index : Integer) : TPTC_MODE;
  10. { console management }
  11. Procedure ptc_console_open(obj : TPTC_CONSOLE; title : String; pages : Integer);
  12. Procedure ptc_console_open_format(obj : TPTC_CONSOLE; title : String; format : TPTC_FORMAT; pages : Integer);
  13. Procedure ptc_console_open_resolution(obj : TPTC_CONSOLE; title : String; width, height : Integer; format : TPTC_FORMAT; pages : Integer);
  14. Procedure ptc_console_open_mode(obj : TPTC_CONSOLE; title : String; mode : TPTC_MODE; pages : Integer);
  15. Procedure ptc_console_close(obj : TPTC_CONSOLE);
  16. { synchronization }
  17. Procedure ptc_console_flush(obj : TPTC_CONSOLE);
  18. Procedure ptc_console_finish(obj : TPTC_CONSOLE);
  19. Procedure ptc_console_update(obj : TPTC_CONSOLE);
  20. Procedure ptc_console_update_area(obj : TPTC_CONSOLE; area : TPTC_AREA);
  21. { keyboard input }
  22. Function ptc_console_key(obj : TPTC_CONSOLE) : Boolean;
  23. Procedure ptc_console_read(obj : TPTC_CONSOLE; key : TPTC_KEY);
  24. { copy to surface }
  25. Procedure ptc_console_copy(obj : TPTC_CONSOLE; surface : TPTC_SURFACE);
  26. Procedure ptc_console_copy_area(obj : TPTC_CONSOLE; surface : TPTC_SURFACE; source, destination : TPTC_AREA);
  27. { memory access }
  28. Function ptc_console_lock(obj : TPTC_CONSOLE) : Pointer;
  29. Procedure ptc_console_unlock(obj : TPTC_CONSOLE);
  30. { load pixels to console }
  31. Procedure ptc_console_load(obj : TPTC_CONSOLE; pixels : Pointer; width, height, pitch : Integer; format : TPTC_FORMAT; palette : TPTC_PALETTE);
  32. Procedure ptc_console_load_area(obj : TPTC_CONSOLE; pixels : Pointer; width, height, pitch : Integer; format : TPTC_FORMAT; palette : TPTC_PALETTE; source, destination : TPTC_AREA);
  33. { save console pixels }
  34. Procedure ptc_console_save(obj : TPTC_CONSOLE; pixels : Pointer; width, height, pitch : Integer; format : TPTC_FORMAT; palette : TPTC_PALETTE);
  35. Procedure ptc_console_save_area(obj : TPTC_CONSOLE; pixels : Pointer; width, height, pitch : Integer; format : TPTC_FORMAT; palette : TPTC_PALETTE; source, destination : TPTC_AREA);
  36. { clear console }
  37. Procedure ptc_console_clear(obj : TPTC_CONSOLE);
  38. Procedure ptc_console_clear_color(obj : TPTC_CONSOLE; color : TPTC_COLOR);
  39. Procedure ptc_console_clear_color_area(obj : TPTC_CONSOLE; color : TPTC_COLOR; area : TPTC_AREA);
  40. { console palette }
  41. Procedure ptc_console_palette_set(obj : TPTC_CONSOLE; palette : TPTC_PALETTE);
  42. Function ptc_console_palette_get(obj : TPTC_CONSOLE) : TPTC_PALETTE;
  43. { console clip area }
  44. Procedure ptc_console_clip_set(obj : TPTC_CONSOLE; area : TPTC_AREA);
  45. { data access }
  46. Function ptc_console_width(obj : TPTC_CONSOLE) : Integer;
  47. Function ptc_console_height(obj : TPTC_CONSOLE) : Integer;
  48. Function ptc_console_pages(obj : TPTC_CONSOLE) : Integer;
  49. Function ptc_console_pitch(obj : TPTC_CONSOLE) : Integer;
  50. Function ptc_console_area(obj : TPTC_CONSOLE) : TPTC_AREA;
  51. Function ptc_console_clip(obj : TPTC_CONSOLE) : TPTC_AREA;
  52. Function ptc_console_format(obj : TPTC_CONSOLE) : TPTC_FORMAT;
  53. Function ptc_console_name(obj : TPTC_CONSOLE) : String;
  54. Function ptc_console_title(obj : TPTC_CONSOLE) : String;
  55. Function ptc_console_information(obj : TPTC_CONSOLE) : String;
  56. { extension functions }
  57. {#ifdef __PTC_WIN32_EXTENSIONS__
  58. CAPI void PTCAPI ptc_console_open_window(PTC_CONSOLE object,HWND window,int pages);
  59. CAPI void PTCAPI ptc_console_open_window_format(PTC_CONSOLE object,HWND window,PTC_FORMAT format,int pages);
  60. CAPI void PTCAPI ptc_console_open_window_resolution(PTC_CONSOLE object,HWND window,int width,int height,PTC_FORMAT format,int pages);
  61. CAPI void PTCAPI ptc_console_open_window_mode(PTC_CONSOLE object,HWND window,PTC_MODE mode,int pages);
  62. CAPI HWND PTCAPI ptc_console_window(PTC_CONSOLE object);
  63. CAPI LPDIRECTDRAW PTCAPI ptc_console_lpDD(PTC_CONSOLE object);
  64. CAPI LPDIRECTDRAW2 PTCAPI ptc_console_lpDD2(PTC_CONSOLE object);
  65. CAPI LPDIRECTDRAWSURFACE PTCAPI ptc_console_lpDDS(PTC_CONSOLE object);
  66. CAPI LPDIRECTDRAWSURFACE PTCAPI ptc_console_lpDDS_primary(PTC_CONSOLE object);
  67. CAPI LPDIRECTDRAWSURFACE PTCAPI ptc_console_lpDDS_secondary(PTC_CONSOLE object);
  68. #endif}