wlxplugin.pas 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // Lister API definitions.
  2. // This unit is written by Christian Ghisler, it's from Total Commander
  3. // Lister API Guide, which can be found at http://ghisler.com.
  4. // Version: 2.0.
  5. unit WlxPlugin;
  6. interface
  7. const
  8. lc_copy=1;
  9. lc_newparams=2;
  10. lc_selectall=3;
  11. lc_setpercent=4;
  12. lcp_wraptext=1;
  13. lcp_fittowindow=2;
  14. lcp_ansi=4;
  15. lcp_ascii=8;
  16. lcp_variable=12;
  17. lcp_forceshow=16;
  18. lcp_fitlargeronly=32;
  19. lcp_center=64;
  20. lcp_darkmode=128;
  21. lcp_darkmodenative=256;
  22. lcs_findfirst=1;
  23. lcs_matchcase=2;
  24. lcs_wholewords=4;
  25. lcs_backwards=8;
  26. itm_percent=$FFFE;
  27. itm_fontstyle=$FFFD;
  28. itm_wrap=$FFFC;
  29. itm_fit=$FFFB;
  30. itm_next=$FFFA;
  31. itm_center=$FFF9;
  32. LISTPLUGIN_OK=0;
  33. LISTPLUGIN_ERROR=1;
  34. const
  35. MAX_PATH=32000;
  36. type
  37. { Unsigned integer with pointer size }
  38. THandle = {$IFDEF CPU64}QWord{$ELSE}LongWord{$ENDIF};
  39. const
  40. wlxInvalidHandle: THandle = THandle(0);
  41. type
  42. tListDefaultParamStruct=record
  43. size,
  44. PluginInterfaceVersionLow,
  45. PluginInterfaceVersionHi:longint;
  46. DefaultIniName:array[0..MAX_PATH-1] of char;
  47. end;
  48. pListDefaultParamStruct=^tListDefaultParamStruct;
  49. type tdateformat=record
  50. wYear,wMonth,wDay:word;
  51. end;
  52. pdateformat=^tdateformat;
  53. type ttimeformat=record
  54. wHour,wMinute,wSecond:word;
  55. end;
  56. ptimeformat=^ttimeformat;
  57. type HBITMAP = type THandle;
  58. { Function prototypes: Functions need to be defined exactly like this!}
  59. (*
  60. function ListLoad(ParentWin:thandle;FileToLoad:pchar;ShowFlags:integer):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  61. function ListLoadW(ParentWin:thandle;FileToLoad:pwidechar;ShowFlags:integer):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  62. function ListLoadNext(ParentWin,PluginWin:thandle;FileToLoad:pchar;ShowFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  63. function ListLoadNextW(ParentWin,PluginWin:thandle;FileToLoad:pwidechar;ShowFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  64. procedure ListCloseWindow(ListWin:thandle); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  65. procedure ListGetDetectString(DetectString:pchar;maxlen:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  66. function ListSearchText(ListWin:thandle;SearchString:pchar; SearchParameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  67. function ListSearchTextW(ListWin:thandle;SearchString:pwidechar; SearchParameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  68. function ListSearchDialog(ListWin:thandle;FindNext:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  69. function ListSendCommand(ListWin:thandle;Command,Parameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  70. function ListPrint(ListWin:thandle;FileToPrint,DefPrinter:pchar; PrintFlags:integer;var Margins:trect):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  71. function ListPrintW(ListWin:thandle;FileToPrint,DefPrinter:pwidechar; PrintFlags:integer;var Margins:trect):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  72. function ListNotificationReceived(ListWin:thandle;Message,wParam,lParam:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  73. procedure ListSetDefaultParams(dps:pListDefaultParamStruct); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  74. function ListGetPreviewBitmap(FileToLoad:pchar;width,height:integer; contentbuf:pchar;contentbuflen:integer):hbitmap; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  75. function ListGetPreviewBitmapW(FileToLoad:pwidechar;width,height:integer; contentbuf:pchar;contentbuflen:integer):hbitmap; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  76. *)
  77. implementation
  78. end.