wlxplugin.pas 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. HWND = type THandle;
  59. { Function prototypes: Functions need to be defined exactly like this!}
  60. (*
  61. function ListLoad(ParentWin:thandle;FileToLoad:pchar;ShowFlags:integer):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  62. function ListLoadW(ParentWin:thandle;FileToLoad:pwidechar;ShowFlags:integer):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  63. function ListLoadNext(ParentWin,PluginWin:thandle;FileToLoad:pchar;ShowFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  64. function ListLoadNextW(ParentWin,PluginWin:thandle;FileToLoad:pwidechar;ShowFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  65. procedure ListCloseWindow(ListWin:thandle); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  66. procedure ListGetDetectString(DetectString:pchar;maxlen:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  67. function ListSearchText(ListWin:thandle;SearchString:pchar; SearchParameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  68. function ListSearchTextW(ListWin:thandle;SearchString:pwidechar; SearchParameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  69. function ListSearchDialog(ListWin:thandle;FindNext:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  70. function ListSendCommand(ListWin:thandle;Command,Parameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  71. function ListPrint(ListWin:thandle;FileToPrint,DefPrinter:pchar; PrintFlags:integer;var Margins:trect):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  72. function ListPrintW(ListWin:thandle;FileToPrint,DefPrinter:pwidechar; PrintFlags:integer;var Margins:trect):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  73. function ListNotificationReceived(ListWin:thandle;Message,wParam,lParam:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  74. procedure ListSetDefaultParams(dps:pListDefaultParamStruct); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  75. function ListGetPreviewBitmap(FileToLoad:pchar;width,height:integer; contentbuf:pchar;contentbuflen:integer):hbitmap; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  76. function ListGetPreviewBitmapW(FileToLoad:pwidechar;width,height:integer; contentbuf:pchar;contentbuflen:integer):hbitmap; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  77. *)
  78. implementation
  79. end.