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