mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Set svn:eol-style property for all source files.
This commit is contained in:
parent
47aec6b94c
commit
60abbb7462
244 changed files with 53958 additions and 53958 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{$MACRO ON}
|
||||
{$IFDEF MSWINDOWS}
|
||||
{$DEFINE dcpcall:=stdcall}
|
||||
{$ELSE}
|
||||
{$DEFINE dcpcall:=cdecl}
|
||||
{$ENDIF}
|
||||
{$MACRO ON}
|
||||
{$IFDEF MSWINDOWS}
|
||||
{$DEFINE dcpcall:=stdcall}
|
||||
{$ELSE}
|
||||
{$DEFINE dcpcall:=cdecl}
|
||||
{$ENDIF}
|
||||
|
|
|
|||
118
sdk/common.h
118
sdk/common.h
|
|
@ -1,60 +1,60 @@
|
|||
#ifdef __GNUC__
|
||||
|
||||
#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN64)
|
||||
#define DCPCALL __attribute__((stdcall))
|
||||
#else
|
||||
#define DCPCALL __attribute__((cdecl))
|
||||
#endif
|
||||
|
||||
#define MAX_PATH 260
|
||||
|
||||
typedef unsigned long DWORD;
|
||||
typedef unsigned short WORD;
|
||||
typedef void *HANDLE;
|
||||
typedef HANDLE HICON;
|
||||
typedef HANDLE HBITMAP;
|
||||
typedef HANDLE HWND;
|
||||
typedef int BOOL;
|
||||
typedef char CHAR;
|
||||
typedef wchar_t WCHAR;
|
||||
|
||||
typedef struct _FILETIME {
|
||||
DWORD dwLowDateTime;
|
||||
DWORD dwHighDateTime;
|
||||
} FILETIME,*PFILETIME,*LPFILETIME;
|
||||
|
||||
typedef struct _WIN32_FIND_DATAA {
|
||||
DWORD dwFileAttributes;
|
||||
FILETIME ftCreationTime;
|
||||
FILETIME ftLastAccessTime;
|
||||
FILETIME ftLastWriteTime;
|
||||
DWORD nFileSizeHigh;
|
||||
DWORD nFileSizeLow;
|
||||
DWORD dwReserved0;
|
||||
DWORD dwReserved1;
|
||||
CHAR cFileName[MAX_PATH];
|
||||
CHAR cAlternateFileName[14];
|
||||
} WIN32_FIND_DATAA,*LPWIN32_FIND_DATAA;
|
||||
|
||||
typedef struct _WIN32_FIND_DATAW {
|
||||
DWORD dwFileAttributes;
|
||||
FILETIME ftCreationTime;
|
||||
FILETIME ftLastAccessTime;
|
||||
FILETIME ftLastWriteTime;
|
||||
DWORD nFileSizeHigh;
|
||||
DWORD nFileSizeLow;
|
||||
DWORD dwReserved0;
|
||||
DWORD dwReserved1;
|
||||
WCHAR cFileName[MAX_PATH];
|
||||
WCHAR cAlternateFileName[14];
|
||||
} WIN32_FIND_DATAW,*LPWIN32_FIND_DATAW;
|
||||
|
||||
#else
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define DCPCALL __stdcall
|
||||
#else
|
||||
#define DCPCALL __cdecl
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN64)
|
||||
#define DCPCALL __attribute__((stdcall))
|
||||
#else
|
||||
#define DCPCALL __attribute__((cdecl))
|
||||
#endif
|
||||
|
||||
#define MAX_PATH 260
|
||||
|
||||
typedef unsigned long DWORD;
|
||||
typedef unsigned short WORD;
|
||||
typedef void *HANDLE;
|
||||
typedef HANDLE HICON;
|
||||
typedef HANDLE HBITMAP;
|
||||
typedef HANDLE HWND;
|
||||
typedef int BOOL;
|
||||
typedef char CHAR;
|
||||
typedef wchar_t WCHAR;
|
||||
|
||||
typedef struct _FILETIME {
|
||||
DWORD dwLowDateTime;
|
||||
DWORD dwHighDateTime;
|
||||
} FILETIME,*PFILETIME,*LPFILETIME;
|
||||
|
||||
typedef struct _WIN32_FIND_DATAA {
|
||||
DWORD dwFileAttributes;
|
||||
FILETIME ftCreationTime;
|
||||
FILETIME ftLastAccessTime;
|
||||
FILETIME ftLastWriteTime;
|
||||
DWORD nFileSizeHigh;
|
||||
DWORD nFileSizeLow;
|
||||
DWORD dwReserved0;
|
||||
DWORD dwReserved1;
|
||||
CHAR cFileName[MAX_PATH];
|
||||
CHAR cAlternateFileName[14];
|
||||
} WIN32_FIND_DATAA,*LPWIN32_FIND_DATAA;
|
||||
|
||||
typedef struct _WIN32_FIND_DATAW {
|
||||
DWORD dwFileAttributes;
|
||||
FILETIME ftCreationTime;
|
||||
FILETIME ftLastAccessTime;
|
||||
FILETIME ftLastWriteTime;
|
||||
DWORD nFileSizeHigh;
|
||||
DWORD nFileSizeLow;
|
||||
DWORD dwReserved0;
|
||||
DWORD dwReserved1;
|
||||
WCHAR cFileName[MAX_PATH];
|
||||
WCHAR cAlternateFileName[14];
|
||||
} WIN32_FIND_DATAW,*LPWIN32_FIND_DATAW;
|
||||
|
||||
#else
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define DCPCALL __stdcall
|
||||
#else
|
||||
#define DCPCALL __cdecl
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
sdk/extension.h
190
sdk/extension.h
|
|
@ -1,95 +1,95 @@
|
|||
#include "common.h"
|
||||
|
||||
/* dialog messages */
|
||||
#define DM_FIRST 0
|
||||
#define DM_CLOSE DM_FIRST+1 /* A signal that the dialog is about to close */
|
||||
#define DM_ENABLE DM_FIRST+2
|
||||
#define DM_GETDLGDATA DM_FIRST+3
|
||||
#define DM_GETDLGBOUNDS DM_FIRST+4
|
||||
#define DM_GETITEMBOUNDS DM_FIRST+5
|
||||
#define DM_GETTEXT DM_FIRST+6 /* Retrieve the text of an edit string or the caption of an item */
|
||||
#define DM_KEYDOWN DM_FIRST+7
|
||||
#define DM_KEYUP DM_FIRST+8
|
||||
#define DM_SETDLGDATA DM_FIRST+9
|
||||
#define DM_SETFOCUS DM_FIRST+10 /* Set the keyboard focus to the given dialog item */
|
||||
#define DM_REDRAW DM_FIRST+11 /* Redraw the whole dialog */
|
||||
#define DM_SETTEXT DM_FIRST+12 /* Set a new string value for an edit line or a new caption for an item */
|
||||
#define DM_SETMAXTEXTLENGTH DM_FIRST+13 /* Set the maximum length of an edit string */
|
||||
#define DM_SHOWDIALOG DM_FIRST+14 /* Show/hide the dialog window */
|
||||
#define DM_SHOWITEM DM_FIRST+15 /* Show/hide a dialog item */
|
||||
#define DM_GETCHECK DM_FIRST+16 /* Retrieve the state of TCheckBox or TRadioButton items */
|
||||
#define DM_SETCHECK DM_FIRST+17 /* Change the state of TCheckBox and TRadioButton items */
|
||||
#define DM_LISTGETITEM DM_FIRST+18 /* Retrieve a list item */
|
||||
#define DM_LISTGETITEMINDEX DM_FIRST+19 /* Get current item index in a list */
|
||||
#define DM_LISTSETITEMINDEX DM_FIRST+20 /* Set current item index in a list */
|
||||
#define DM_LISTDELETE DM_FIRST+21
|
||||
#define DM_LISTADD DM_FIRST+22
|
||||
#define DM_LISTADDSTR DM_FIRST+23
|
||||
#define DM_LISTUPDATE DM_FIRST+24
|
||||
#define DM_LISTINSERT DM_FIRST+25
|
||||
#define DM_LISTINDEXOF DM_FIRST+26
|
||||
#define DM_LISTGETCOUNT DM_FIRST+27
|
||||
#define DM_LISTGETDATA DM_FIRST+28
|
||||
#define DM_LISTSETDATA DM_FIRST+29
|
||||
#define DM_SETDLGBOUNDS DM_FIRST+30
|
||||
#define DM_SETITEMBOUNDS DM_FIRST+31
|
||||
#define DM_GETDROPPEDDOWN DM_FIRST+32
|
||||
#define DM_SETDROPPEDDOWN DM_FIRST+33
|
||||
#define DM_GETITEMDATA DM_FIRST+34
|
||||
#define DM_SETITEMDATA DM_FIRST+35
|
||||
#define DM_LISTSET DM_FIRST+36
|
||||
|
||||
/* events messages */
|
||||
#define DN_FIRST 0x1000
|
||||
#define DN_CLICK DN_FIRST+1 /* Sent after mouse click */
|
||||
#define DN_DBLCLICK DN_FIRST+2 /* Sent after mouse double click */
|
||||
#define DN_CHANGE DN_FIRST+3 /* Sent after the dialog item is changed */
|
||||
#define DN_GOTFOCUS DN_FIRST+4 /* Sent when the dialog item gets input focus */
|
||||
#define DN_INITDIALOG DN_FIRST+5 /* Sent before showing the dialog */
|
||||
#define DN_KILLFOCUS DN_FIRST+6 /* Sent before a dialog item loses the input focus */
|
||||
|
||||
#define DN_KEYDOWN DM_KEYDOWN
|
||||
#define DN_KEYUP DM_KEYUP
|
||||
#define DN_CLOSE DM_CLOSE /* Sent before the dialog is closed */
|
||||
|
||||
#define DM_USER 0x4000 /* Starting value for user defined messages */
|
||||
|
||||
/* other */
|
||||
#define EXT_MAX_PATH 16384 /* 16 Kb */
|
||||
|
||||
/* Dialog window callback function */
|
||||
typedef intptr_t (DCPCALL *tDlgProc)(uintptr_t pDlg, char* DlgItemName, intptr_t Msg, intptr_t wParam, intptr_t lParam);
|
||||
/* Definition of callback functions called by the DLL */
|
||||
typedef BOOL (DCPCALL *tInputBoxProc)(char* Caption, char* Prompt, BOOL MaskInput, char* Value, int ValueMaxLen);
|
||||
typedef int (DCPCALL *tMessageBoxProc)(char* Text, char* Caption, long Flags);
|
||||
typedef BOOL (DCPCALL *tDialogBoxLFMProc)(intptr_t LFMData, unsigned long DataSize, tDlgProc DlgProc);
|
||||
typedef BOOL (DCPCALL *tDialogBoxLRSProc)(intptr_t LRSData, unsigned long DataSize, tDlgProc DlgProc);
|
||||
typedef BOOL (DCPCALL *tDialogBoxLFMFileProc)(char* LFMFileName, tDlgProc DlgProc);
|
||||
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
unsigned long StructSize;
|
||||
char PluginDir[EXT_MAX_PATH];
|
||||
char PluginConfDir[EXT_MAX_PATH];
|
||||
tInputBoxProc InputBox;
|
||||
tMessageBoxProc MessageBox;
|
||||
tDialogBoxLFMProc DialogBoxLFM;
|
||||
tDialogBoxLRSProc DialogBoxLRS;
|
||||
tDialogBoxLFMFileProc DialogBoxLFMFile;
|
||||
tDlgProc SendDlgMsg;
|
||||
unsigned char Reserved[4096 * sizeof(void *)];
|
||||
} tExtensionStartupInfo;
|
||||
#pragma pack(pop)
|
||||
|
||||
typedef void (DCPCALL tExtensionInitializeProc)(tExtensionStartupInfo* StartupInfo);
|
||||
typedef void (DCPCALL tExtensionFinalizeProc)(void* Reserved);
|
||||
|
||||
/* Plugin must implement this function for working with Extension API
|
||||
|
||||
void DCPCALL ExtensionInitialize(tExtensionStartupInfo* StartupInfo);
|
||||
|
||||
void DCPCALL ExtensionFinalize(void* Reserved);
|
||||
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
/* dialog messages */
|
||||
#define DM_FIRST 0
|
||||
#define DM_CLOSE DM_FIRST+1 /* A signal that the dialog is about to close */
|
||||
#define DM_ENABLE DM_FIRST+2
|
||||
#define DM_GETDLGDATA DM_FIRST+3
|
||||
#define DM_GETDLGBOUNDS DM_FIRST+4
|
||||
#define DM_GETITEMBOUNDS DM_FIRST+5
|
||||
#define DM_GETTEXT DM_FIRST+6 /* Retrieve the text of an edit string or the caption of an item */
|
||||
#define DM_KEYDOWN DM_FIRST+7
|
||||
#define DM_KEYUP DM_FIRST+8
|
||||
#define DM_SETDLGDATA DM_FIRST+9
|
||||
#define DM_SETFOCUS DM_FIRST+10 /* Set the keyboard focus to the given dialog item */
|
||||
#define DM_REDRAW DM_FIRST+11 /* Redraw the whole dialog */
|
||||
#define DM_SETTEXT DM_FIRST+12 /* Set a new string value for an edit line or a new caption for an item */
|
||||
#define DM_SETMAXTEXTLENGTH DM_FIRST+13 /* Set the maximum length of an edit string */
|
||||
#define DM_SHOWDIALOG DM_FIRST+14 /* Show/hide the dialog window */
|
||||
#define DM_SHOWITEM DM_FIRST+15 /* Show/hide a dialog item */
|
||||
#define DM_GETCHECK DM_FIRST+16 /* Retrieve the state of TCheckBox or TRadioButton items */
|
||||
#define DM_SETCHECK DM_FIRST+17 /* Change the state of TCheckBox and TRadioButton items */
|
||||
#define DM_LISTGETITEM DM_FIRST+18 /* Retrieve a list item */
|
||||
#define DM_LISTGETITEMINDEX DM_FIRST+19 /* Get current item index in a list */
|
||||
#define DM_LISTSETITEMINDEX DM_FIRST+20 /* Set current item index in a list */
|
||||
#define DM_LISTDELETE DM_FIRST+21
|
||||
#define DM_LISTADD DM_FIRST+22
|
||||
#define DM_LISTADDSTR DM_FIRST+23
|
||||
#define DM_LISTUPDATE DM_FIRST+24
|
||||
#define DM_LISTINSERT DM_FIRST+25
|
||||
#define DM_LISTINDEXOF DM_FIRST+26
|
||||
#define DM_LISTGETCOUNT DM_FIRST+27
|
||||
#define DM_LISTGETDATA DM_FIRST+28
|
||||
#define DM_LISTSETDATA DM_FIRST+29
|
||||
#define DM_SETDLGBOUNDS DM_FIRST+30
|
||||
#define DM_SETITEMBOUNDS DM_FIRST+31
|
||||
#define DM_GETDROPPEDDOWN DM_FIRST+32
|
||||
#define DM_SETDROPPEDDOWN DM_FIRST+33
|
||||
#define DM_GETITEMDATA DM_FIRST+34
|
||||
#define DM_SETITEMDATA DM_FIRST+35
|
||||
#define DM_LISTSET DM_FIRST+36
|
||||
|
||||
/* events messages */
|
||||
#define DN_FIRST 0x1000
|
||||
#define DN_CLICK DN_FIRST+1 /* Sent after mouse click */
|
||||
#define DN_DBLCLICK DN_FIRST+2 /* Sent after mouse double click */
|
||||
#define DN_CHANGE DN_FIRST+3 /* Sent after the dialog item is changed */
|
||||
#define DN_GOTFOCUS DN_FIRST+4 /* Sent when the dialog item gets input focus */
|
||||
#define DN_INITDIALOG DN_FIRST+5 /* Sent before showing the dialog */
|
||||
#define DN_KILLFOCUS DN_FIRST+6 /* Sent before a dialog item loses the input focus */
|
||||
|
||||
#define DN_KEYDOWN DM_KEYDOWN
|
||||
#define DN_KEYUP DM_KEYUP
|
||||
#define DN_CLOSE DM_CLOSE /* Sent before the dialog is closed */
|
||||
|
||||
#define DM_USER 0x4000 /* Starting value for user defined messages */
|
||||
|
||||
/* other */
|
||||
#define EXT_MAX_PATH 16384 /* 16 Kb */
|
||||
|
||||
/* Dialog window callback function */
|
||||
typedef intptr_t (DCPCALL *tDlgProc)(uintptr_t pDlg, char* DlgItemName, intptr_t Msg, intptr_t wParam, intptr_t lParam);
|
||||
/* Definition of callback functions called by the DLL */
|
||||
typedef BOOL (DCPCALL *tInputBoxProc)(char* Caption, char* Prompt, BOOL MaskInput, char* Value, int ValueMaxLen);
|
||||
typedef int (DCPCALL *tMessageBoxProc)(char* Text, char* Caption, long Flags);
|
||||
typedef BOOL (DCPCALL *tDialogBoxLFMProc)(intptr_t LFMData, unsigned long DataSize, tDlgProc DlgProc);
|
||||
typedef BOOL (DCPCALL *tDialogBoxLRSProc)(intptr_t LRSData, unsigned long DataSize, tDlgProc DlgProc);
|
||||
typedef BOOL (DCPCALL *tDialogBoxLFMFileProc)(char* LFMFileName, tDlgProc DlgProc);
|
||||
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
unsigned long StructSize;
|
||||
char PluginDir[EXT_MAX_PATH];
|
||||
char PluginConfDir[EXT_MAX_PATH];
|
||||
tInputBoxProc InputBox;
|
||||
tMessageBoxProc MessageBox;
|
||||
tDialogBoxLFMProc DialogBoxLFM;
|
||||
tDialogBoxLRSProc DialogBoxLRS;
|
||||
tDialogBoxLFMFileProc DialogBoxLFMFile;
|
||||
tDlgProc SendDlgMsg;
|
||||
unsigned char Reserved[4096 * sizeof(void *)];
|
||||
} tExtensionStartupInfo;
|
||||
#pragma pack(pop)
|
||||
|
||||
typedef void (DCPCALL tExtensionInitializeProc)(tExtensionStartupInfo* StartupInfo);
|
||||
typedef void (DCPCALL tExtensionFinalizeProc)(void* Reserved);
|
||||
|
||||
/* Plugin must implement this function for working with Extension API
|
||||
|
||||
void DCPCALL ExtensionInitialize(tExtensionStartupInfo* StartupInfo);
|
||||
|
||||
void DCPCALL ExtensionFinalize(void* Reserved);
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,143 +1,143 @@
|
|||
unit Extension;
|
||||
|
||||
interface
|
||||
|
||||
const
|
||||
// dialog messages
|
||||
DM_FIRST = 0;
|
||||
DM_CLOSE = DM_FIRST+1; // A signal that the dialog is about to close
|
||||
DM_ENABLE = DM_FIRST+2;
|
||||
DM_GETDLGDATA = DM_FIRST+3;
|
||||
DM_GETDLGBOUNDS = DM_FIRST+4;
|
||||
DM_GETITEMBOUNDS = DM_FIRST+5;
|
||||
DM_GETTEXT = DM_FIRST+6; // Retrieve the text of an edit string or the caption of an item
|
||||
DM_KEYDOWN = DM_FIRST+7;
|
||||
DM_KEYUP = DM_FIRST+8;
|
||||
DM_SETDLGDATA = DM_FIRST+9;
|
||||
DM_SETFOCUS = DM_FIRST+10; // Set the keyboard focus to the given dialog item
|
||||
DM_REDRAW = DM_FIRST+11; // Redraw the whole dialog
|
||||
DM_SETTEXT = DM_FIRST+12; // Set a new string value for an edit line or a new caption for an item
|
||||
DM_SETMAXTEXTLENGTH = DM_FIRST+13; // Set the maximum length of an edit string
|
||||
DM_SHOWDIALOG = DM_FIRST+14; // Show/hide the dialog window
|
||||
DM_SHOWITEM = DM_FIRST+15; // Show/hide a dialog item
|
||||
DM_GETCHECK = DM_FIRST+16; // Retrieve the state of TCheckBox or TRadioButton items
|
||||
DM_SETCHECK = DM_FIRST+17; // Change the state of TCheckBox and TRadioButton items
|
||||
DM_LISTGETITEM = DM_FIRST+18; // Retrieve a list item
|
||||
DM_LISTGETITEMINDEX = DM_FIRST+19; // Get current item index in a list
|
||||
DM_LISTSETITEMINDEX = DM_FIRST+20; // Set current item index in a list
|
||||
DM_LISTDELETE = DM_FIRST+21;
|
||||
DM_LISTADD = DM_FIRST+22;
|
||||
DM_LISTADDSTR = DM_FIRST+23;
|
||||
DM_LISTUPDATE = DM_FIRST+24;
|
||||
DM_LISTINSERT = DM_FIRST+25;
|
||||
DM_LISTINDEXOF = DM_FIRST+26;
|
||||
DM_LISTGETCOUNT = DM_FIRST+27;
|
||||
DM_LISTGETDATA = DM_FIRST+28;
|
||||
DM_LISTSETDATA = DM_FIRST+29;
|
||||
DM_SETDLGBOUNDS = DM_FIRST+30;
|
||||
DM_SETITEMBOUNDS = DM_FIRST+31;
|
||||
DM_GETDROPPEDDOWN = DM_FIRST+32;
|
||||
DM_SETDROPPEDDOWN = DM_FIRST+33;
|
||||
DM_GETITEMDATA = DM_FIRST+34;
|
||||
DM_SETITEMDATA = DM_FIRST+35;
|
||||
DM_LISTSET = DM_FIRST+36;
|
||||
|
||||
// events messages
|
||||
DN_FIRST = $1000;
|
||||
DN_CLICK = DN_FIRST+1; // Sent after mouse click
|
||||
DN_DBLCLICK = DN_FIRST+2; // Sent after mouse double click
|
||||
DN_CHANGE = DN_FIRST+3; // Sent after the dialog item is changed
|
||||
DN_GOTFOCUS = DN_FIRST+4; // Sent when the dialog item gets input focus
|
||||
DN_INITDIALOG = DN_FIRST+5; // Sent before showing the dialog
|
||||
DN_KILLFOCUS = DN_FIRST+6; // Sent before a dialog item loses the input focus
|
||||
|
||||
DN_KEYDOWN = DM_KEYDOWN;
|
||||
DN_KEYUP = DM_KEYUP;
|
||||
DN_CLOSE = DM_CLOSE; // Sent before the dialog is closed
|
||||
|
||||
DM_USER = $4000; // Starting value for user defined messages
|
||||
|
||||
const
|
||||
// MessageBox: To indicate the buttons displayed in the message box,
|
||||
// specify one of the following values.
|
||||
MB_OK = $00000000;
|
||||
MB_OKCANCEL = $00000001;
|
||||
MB_ABORTRETRYIGNORE = $00000002;
|
||||
MB_YESNOCANCEL = $00000003;
|
||||
MB_YESNO = $00000004;
|
||||
MB_RETRYCANCEL = $00000005;
|
||||
MB_ICONHAND = $00000010;
|
||||
MB_ICONQUESTION = $00000020;
|
||||
MB_ICONEXCLAMATION = $00000030;
|
||||
MB_ICONASTERICK = $00000040;
|
||||
MB_ICONWARNING = MB_ICONEXCLAMATION;
|
||||
MB_ICONERROR = MB_ICONHAND;
|
||||
MB_ICONSTOP = MB_ICONHAND;
|
||||
MB_ICONINFORMATION = MB_ICONASTERICK;
|
||||
// MessageBox: To indicate the default button, specify one of the following values.
|
||||
MB_DEFBUTTON1 = $00000000;
|
||||
MB_DEFBUTTON2 = $00000100;
|
||||
MB_DEFBUTTON3 = $00000200;
|
||||
MB_DEFBUTTON4 = $00000300;
|
||||
// MessageBox: Return values
|
||||
ID_OK = 1;
|
||||
ID_CANCEL = 2;
|
||||
ID_ABORT = 3;
|
||||
ID_RETRY = 4;
|
||||
ID_IGNORE = 5;
|
||||
ID_YES = 6;
|
||||
ID_NO = 7;
|
||||
ID_CLOSE = 8;
|
||||
ID_HELP = 9;
|
||||
|
||||
const
|
||||
EXT_MAX_PATH = 16384; // 16 Kb
|
||||
|
||||
{ For compatibility with Delphi use $IFDEF's to set calling convention }
|
||||
|
||||
type
|
||||
{ Dialog window callback function }
|
||||
TDlgProc = function(pDlg: PtrUInt; DlgItemName: PAnsiChar; Msg, wParam, lParam: PtrInt): PtrInt; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{ Definition of callback functions called by the DLL }
|
||||
TInputBoxProc = function(Caption, Prompt: PAnsiChar; MaskInput: LongBool; Value: PAnsiChar; ValueMaxLen: Integer): LongBool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TMessageBoxProc = function(Text, Caption: PAnsiChar; Flags: Longint): Integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TDialogBoxLFMProc = function(LFMData: Pointer; DataSize: LongWord; DlgProc: TDlgProc): LongBool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TDialogBoxLRSProc = function(LRSData: Pointer; DataSize: LongWord; DlgProc: TDlgProc): LongBool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TDialogBoxLFMFileProc = function(lfmFileName: PAnsiChar; DlgProc: TDlgProc): LongBool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
type
|
||||
PExtensionStartupInfo = ^TExtensionStartupInfo;
|
||||
TExtensionStartupInfo = packed record
|
||||
// The size of the structure, in bytes
|
||||
StructSize: LongWord;
|
||||
// Directory where plugin is located (UTF-8 encoded)
|
||||
PluginDir: packed array [0..Pred(EXT_MAX_PATH)] of AnsiChar;
|
||||
// Directory where plugin configuration file must be located (UTF-8 encoded)
|
||||
PluginConfDir: packed array [0..Pred(EXT_MAX_PATH)] of AnsiChar;
|
||||
// Dialog API
|
||||
InputBox: TInputBoxProc;
|
||||
MessageBox: TMessageBoxProc;
|
||||
DialogBoxLFM: TDialogBoxLFMProc;
|
||||
DialogBoxLRS: TDialogBoxLRSProc;
|
||||
DialogBoxLFMFile: TDialogBoxLFMFileProc;
|
||||
SendDlgMsg: TDlgProc;
|
||||
// Reserved for future API extension
|
||||
Reserved: packed array [0..Pred(4096 * SizeOf(Pointer))] of Byte;
|
||||
end;
|
||||
|
||||
type
|
||||
TExtensionInitializeProc = procedure(StartupInfo: PExtensionStartupInfo); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TExtensionFinalizeProc = procedure(Reserved: Pointer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
implementation
|
||||
|
||||
(* Plugin must implement this function for working with Extension API
|
||||
|
||||
procedure ExtensionInitialize(StartupInfo: PExtensionStartupInfo); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
procedure ExtensionFinalize(Reserved: Pointer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
*)
|
||||
|
||||
end.
|
||||
|
||||
unit Extension;
|
||||
|
||||
interface
|
||||
|
||||
const
|
||||
// dialog messages
|
||||
DM_FIRST = 0;
|
||||
DM_CLOSE = DM_FIRST+1; // A signal that the dialog is about to close
|
||||
DM_ENABLE = DM_FIRST+2;
|
||||
DM_GETDLGDATA = DM_FIRST+3;
|
||||
DM_GETDLGBOUNDS = DM_FIRST+4;
|
||||
DM_GETITEMBOUNDS = DM_FIRST+5;
|
||||
DM_GETTEXT = DM_FIRST+6; // Retrieve the text of an edit string or the caption of an item
|
||||
DM_KEYDOWN = DM_FIRST+7;
|
||||
DM_KEYUP = DM_FIRST+8;
|
||||
DM_SETDLGDATA = DM_FIRST+9;
|
||||
DM_SETFOCUS = DM_FIRST+10; // Set the keyboard focus to the given dialog item
|
||||
DM_REDRAW = DM_FIRST+11; // Redraw the whole dialog
|
||||
DM_SETTEXT = DM_FIRST+12; // Set a new string value for an edit line or a new caption for an item
|
||||
DM_SETMAXTEXTLENGTH = DM_FIRST+13; // Set the maximum length of an edit string
|
||||
DM_SHOWDIALOG = DM_FIRST+14; // Show/hide the dialog window
|
||||
DM_SHOWITEM = DM_FIRST+15; // Show/hide a dialog item
|
||||
DM_GETCHECK = DM_FIRST+16; // Retrieve the state of TCheckBox or TRadioButton items
|
||||
DM_SETCHECK = DM_FIRST+17; // Change the state of TCheckBox and TRadioButton items
|
||||
DM_LISTGETITEM = DM_FIRST+18; // Retrieve a list item
|
||||
DM_LISTGETITEMINDEX = DM_FIRST+19; // Get current item index in a list
|
||||
DM_LISTSETITEMINDEX = DM_FIRST+20; // Set current item index in a list
|
||||
DM_LISTDELETE = DM_FIRST+21;
|
||||
DM_LISTADD = DM_FIRST+22;
|
||||
DM_LISTADDSTR = DM_FIRST+23;
|
||||
DM_LISTUPDATE = DM_FIRST+24;
|
||||
DM_LISTINSERT = DM_FIRST+25;
|
||||
DM_LISTINDEXOF = DM_FIRST+26;
|
||||
DM_LISTGETCOUNT = DM_FIRST+27;
|
||||
DM_LISTGETDATA = DM_FIRST+28;
|
||||
DM_LISTSETDATA = DM_FIRST+29;
|
||||
DM_SETDLGBOUNDS = DM_FIRST+30;
|
||||
DM_SETITEMBOUNDS = DM_FIRST+31;
|
||||
DM_GETDROPPEDDOWN = DM_FIRST+32;
|
||||
DM_SETDROPPEDDOWN = DM_FIRST+33;
|
||||
DM_GETITEMDATA = DM_FIRST+34;
|
||||
DM_SETITEMDATA = DM_FIRST+35;
|
||||
DM_LISTSET = DM_FIRST+36;
|
||||
|
||||
// events messages
|
||||
DN_FIRST = $1000;
|
||||
DN_CLICK = DN_FIRST+1; // Sent after mouse click
|
||||
DN_DBLCLICK = DN_FIRST+2; // Sent after mouse double click
|
||||
DN_CHANGE = DN_FIRST+3; // Sent after the dialog item is changed
|
||||
DN_GOTFOCUS = DN_FIRST+4; // Sent when the dialog item gets input focus
|
||||
DN_INITDIALOG = DN_FIRST+5; // Sent before showing the dialog
|
||||
DN_KILLFOCUS = DN_FIRST+6; // Sent before a dialog item loses the input focus
|
||||
|
||||
DN_KEYDOWN = DM_KEYDOWN;
|
||||
DN_KEYUP = DM_KEYUP;
|
||||
DN_CLOSE = DM_CLOSE; // Sent before the dialog is closed
|
||||
|
||||
DM_USER = $4000; // Starting value for user defined messages
|
||||
|
||||
const
|
||||
// MessageBox: To indicate the buttons displayed in the message box,
|
||||
// specify one of the following values.
|
||||
MB_OK = $00000000;
|
||||
MB_OKCANCEL = $00000001;
|
||||
MB_ABORTRETRYIGNORE = $00000002;
|
||||
MB_YESNOCANCEL = $00000003;
|
||||
MB_YESNO = $00000004;
|
||||
MB_RETRYCANCEL = $00000005;
|
||||
MB_ICONHAND = $00000010;
|
||||
MB_ICONQUESTION = $00000020;
|
||||
MB_ICONEXCLAMATION = $00000030;
|
||||
MB_ICONASTERICK = $00000040;
|
||||
MB_ICONWARNING = MB_ICONEXCLAMATION;
|
||||
MB_ICONERROR = MB_ICONHAND;
|
||||
MB_ICONSTOP = MB_ICONHAND;
|
||||
MB_ICONINFORMATION = MB_ICONASTERICK;
|
||||
// MessageBox: To indicate the default button, specify one of the following values.
|
||||
MB_DEFBUTTON1 = $00000000;
|
||||
MB_DEFBUTTON2 = $00000100;
|
||||
MB_DEFBUTTON3 = $00000200;
|
||||
MB_DEFBUTTON4 = $00000300;
|
||||
// MessageBox: Return values
|
||||
ID_OK = 1;
|
||||
ID_CANCEL = 2;
|
||||
ID_ABORT = 3;
|
||||
ID_RETRY = 4;
|
||||
ID_IGNORE = 5;
|
||||
ID_YES = 6;
|
||||
ID_NO = 7;
|
||||
ID_CLOSE = 8;
|
||||
ID_HELP = 9;
|
||||
|
||||
const
|
||||
EXT_MAX_PATH = 16384; // 16 Kb
|
||||
|
||||
{ For compatibility with Delphi use $IFDEF's to set calling convention }
|
||||
|
||||
type
|
||||
{ Dialog window callback function }
|
||||
TDlgProc = function(pDlg: PtrUInt; DlgItemName: PAnsiChar; Msg, wParam, lParam: PtrInt): PtrInt; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{ Definition of callback functions called by the DLL }
|
||||
TInputBoxProc = function(Caption, Prompt: PAnsiChar; MaskInput: LongBool; Value: PAnsiChar; ValueMaxLen: Integer): LongBool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TMessageBoxProc = function(Text, Caption: PAnsiChar; Flags: Longint): Integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TDialogBoxLFMProc = function(LFMData: Pointer; DataSize: LongWord; DlgProc: TDlgProc): LongBool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TDialogBoxLRSProc = function(LRSData: Pointer; DataSize: LongWord; DlgProc: TDlgProc): LongBool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TDialogBoxLFMFileProc = function(lfmFileName: PAnsiChar; DlgProc: TDlgProc): LongBool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
type
|
||||
PExtensionStartupInfo = ^TExtensionStartupInfo;
|
||||
TExtensionStartupInfo = packed record
|
||||
// The size of the structure, in bytes
|
||||
StructSize: LongWord;
|
||||
// Directory where plugin is located (UTF-8 encoded)
|
||||
PluginDir: packed array [0..Pred(EXT_MAX_PATH)] of AnsiChar;
|
||||
// Directory where plugin configuration file must be located (UTF-8 encoded)
|
||||
PluginConfDir: packed array [0..Pred(EXT_MAX_PATH)] of AnsiChar;
|
||||
// Dialog API
|
||||
InputBox: TInputBoxProc;
|
||||
MessageBox: TMessageBoxProc;
|
||||
DialogBoxLFM: TDialogBoxLFMProc;
|
||||
DialogBoxLRS: TDialogBoxLRSProc;
|
||||
DialogBoxLFMFile: TDialogBoxLFMFileProc;
|
||||
SendDlgMsg: TDlgProc;
|
||||
// Reserved for future API extension
|
||||
Reserved: packed array [0..Pred(4096 * SizeOf(Pointer))] of Byte;
|
||||
end;
|
||||
|
||||
type
|
||||
TExtensionInitializeProc = procedure(StartupInfo: PExtensionStartupInfo); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TExtensionFinalizeProc = procedure(Reserved: Pointer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
implementation
|
||||
|
||||
(* Plugin must implement this function for working with Extension API
|
||||
|
||||
procedure ExtensionInitialize(StartupInfo: PExtensionStartupInfo); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
procedure ExtensionFinalize(Reserved: Pointer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
*)
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
346
sdk/wcxplugin.h
346
sdk/wcxplugin.h
|
|
@ -1,173 +1,173 @@
|
|||
#include "common.h"
|
||||
|
||||
/* Contents of file wcxhead.h */
|
||||
/* It contains definitions of error codes, flags and callbacks */
|
||||
|
||||
/* Error codes returned to calling application */
|
||||
#define E_SUCCESS 0 /* Success */
|
||||
#define E_END_ARCHIVE 10 /* No more files in archive */
|
||||
#define E_NO_MEMORY 11 /* Not enough memory */
|
||||
#define E_BAD_DATA 12 /* Data is bad */
|
||||
#define E_BAD_ARCHIVE 13 /* CRC error in archive data */
|
||||
#define E_UNKNOWN_FORMAT 14 /* Archive format unknown */
|
||||
#define E_EOPEN 15 /* Cannot open existing file */
|
||||
#define E_ECREATE 16 /* Cannot create file */
|
||||
#define E_ECLOSE 17 /* Error closing file */
|
||||
#define E_EREAD 18 /* Error reading from file */
|
||||
#define E_EWRITE 19 /* Error writing to file */
|
||||
#define E_SMALL_BUF 20 /* Buffer too small */
|
||||
#define E_EABORTED 21 /* Function aborted by user */
|
||||
#define E_NO_FILES 22 /* No files found */
|
||||
#define E_TOO_MANY_FILES 23 /* Too many files to pack */
|
||||
#define E_NOT_SUPPORTED 24 /* Function not supported */
|
||||
|
||||
/* flags for unpacking */
|
||||
#define PK_OM_LIST 0
|
||||
#define PK_OM_EXTRACT 1
|
||||
|
||||
/* flags for ProcessFile */
|
||||
#define PK_SKIP 0 /* Skip this file */
|
||||
#define PK_TEST 1 /* Test file integrity */
|
||||
#define PK_EXTRACT 2 /* Extract to disk */
|
||||
|
||||
/* Flags passed through ChangeVolProc */
|
||||
#define PK_VOL_ASK 0 /* Ask user for location of next volume */
|
||||
#define PK_VOL_NOTIFY 1 /* Notify app that next volume will be unpacked */
|
||||
|
||||
/* Flags for packing */
|
||||
|
||||
/* For PackFiles */
|
||||
#define PK_PACK_MOVE_FILES 1 /* Delete original after packing */
|
||||
#define PK_PACK_SAVE_PATHS 2 /* Save path names of files */
|
||||
#define PK_PACK_ENCRYPT 4 /* Ask user for password, then encrypt */
|
||||
|
||||
/* Returned by GetPackCaps */
|
||||
#define PK_CAPS_NEW 1 /* Can create new archives */
|
||||
#define PK_CAPS_MODIFY 2 /* Can modify exisiting archives */
|
||||
#define PK_CAPS_MULTIPLE 4 /* Archive can contain multiple files */
|
||||
#define PK_CAPS_DELETE 8 /* Can delete files */
|
||||
#define PK_CAPS_OPTIONS 16 /* Has options dialog */
|
||||
#define PK_CAPS_MEMPACK 32 /* Supports packing in memory */
|
||||
#define PK_CAPS_BY_CONTENT 64 /* Detect archive type by content */
|
||||
#define PK_CAPS_SEARCHTEXT 128 /* Allow searching for text in archives */
|
||||
/* created with this plugin} */
|
||||
#define PK_CAPS_HIDE 256 /* Show as normal files (hide packer */
|
||||
/* icon), open with Ctrl+PgDn, not Enter*/
|
||||
#define PK_CAPS_ENCRYPT 512 /* Plugin supports PK_PACK_ENCRYPT option*/
|
||||
|
||||
/* Flags for packing in memory */
|
||||
#define MEM_OPTIONS_WANTHEADERS 1 /* Return archive headers with packed data */
|
||||
|
||||
/* Errors returned by PackToMem */
|
||||
#define MEMPACK_OK 0 /* Function call finished OK, but there is more data */
|
||||
#define MEMPACK_DONE 1 /* Function call finished OK, there is no more data */
|
||||
|
||||
#define PK_CRYPT_SAVE_PASSWORD 1
|
||||
#define PK_CRYPT_LOAD_PASSWORD 2
|
||||
#define PK_CRYPT_LOAD_PASSWORD_NO_UI 3 // Load password only if master password has already been entered!
|
||||
#define PK_CRYPT_COPY_PASSWORD 4 // Copy encrypted password to new archive name
|
||||
#define PK_CRYPT_MOVE_PASSWORD 5 // Move password when renaming an archive
|
||||
#define PK_CRYPT_DELETE_PASSWORD 6 // Delete password
|
||||
|
||||
#define PK_CRYPTOPT_MASTERPASS_SET 1 // The user already has a master password defined
|
||||
|
||||
typedef struct {
|
||||
char ArcName[260];
|
||||
char FileName[260];
|
||||
int Flags;
|
||||
int PackSize;
|
||||
int UnpSize;
|
||||
int HostOS;
|
||||
int FileCRC;
|
||||
int FileTime;
|
||||
int UnpVer;
|
||||
int Method;
|
||||
int FileAttr;
|
||||
char* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
} tHeaderData;
|
||||
|
||||
typedef struct {
|
||||
char ArcName[1024];
|
||||
char FileName[1024];
|
||||
int Flags;
|
||||
unsigned int PackSize;
|
||||
unsigned int PackSizeHigh;
|
||||
unsigned int UnpSize;
|
||||
unsigned int UnpSizeHigh;
|
||||
int HostOS;
|
||||
int FileCRC;
|
||||
int FileTime;
|
||||
int UnpVer;
|
||||
int Method;
|
||||
int FileAttr;
|
||||
char* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
char Reserved[1024];
|
||||
} tHeaderDataEx;
|
||||
|
||||
typedef struct {
|
||||
WCHAR ArcName[1024];
|
||||
WCHAR FileName[1024];
|
||||
int Flags;
|
||||
unsigned int PackSize;
|
||||
unsigned int PackSizeHigh;
|
||||
unsigned int UnpSize;
|
||||
unsigned int UnpSizeHigh;
|
||||
int HostOS;
|
||||
int FileCRC;
|
||||
int FileTime;
|
||||
int UnpVer;
|
||||
int Method;
|
||||
int FileAttr;
|
||||
char* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
char Reserved[1024];
|
||||
} tHeaderDataExW;
|
||||
|
||||
typedef struct {
|
||||
char* ArcName;
|
||||
int OpenMode;
|
||||
int OpenResult;
|
||||
char* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
} tOpenArchiveData;
|
||||
|
||||
typedef struct {
|
||||
WCHAR* ArcName;
|
||||
int OpenMode;
|
||||
int OpenResult;
|
||||
WCHAR* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
} tOpenArchiveDataW;
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} PackDefaultParamStruct;
|
||||
|
||||
/* Definition of callback functions called by the DLL
|
||||
Ask to swap disk for multi-volume archive */
|
||||
typedef int (DCPCALL *tChangeVolProc)(char *ArcName,int Mode);
|
||||
typedef int (DCPCALL *tChangeVolProcW)(WCHAR *ArcName,int Mode);
|
||||
/* Notify that data is processed - used for progress dialog */
|
||||
typedef int (DCPCALL *tProcessDataProc)(char *FileName,int Size);
|
||||
typedef int (DCPCALL *tProcessDataProcW)(WCHAR *FileName,int Size);
|
||||
typedef int (DCPCALL *tPkCryptProc)(int CryptoNr,int Mode,
|
||||
char* ArchiveName,char* Password,int maxlen);
|
||||
typedef int (DCPCALL *tPkCryptProcW)(int CryptoNr,int Mode,
|
||||
WCHAR* ArchiveName,WCHAR* Password,int maxlen);
|
||||
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* Contents of file wcxhead.h */
|
||||
/* It contains definitions of error codes, flags and callbacks */
|
||||
|
||||
/* Error codes returned to calling application */
|
||||
#define E_SUCCESS 0 /* Success */
|
||||
#define E_END_ARCHIVE 10 /* No more files in archive */
|
||||
#define E_NO_MEMORY 11 /* Not enough memory */
|
||||
#define E_BAD_DATA 12 /* Data is bad */
|
||||
#define E_BAD_ARCHIVE 13 /* CRC error in archive data */
|
||||
#define E_UNKNOWN_FORMAT 14 /* Archive format unknown */
|
||||
#define E_EOPEN 15 /* Cannot open existing file */
|
||||
#define E_ECREATE 16 /* Cannot create file */
|
||||
#define E_ECLOSE 17 /* Error closing file */
|
||||
#define E_EREAD 18 /* Error reading from file */
|
||||
#define E_EWRITE 19 /* Error writing to file */
|
||||
#define E_SMALL_BUF 20 /* Buffer too small */
|
||||
#define E_EABORTED 21 /* Function aborted by user */
|
||||
#define E_NO_FILES 22 /* No files found */
|
||||
#define E_TOO_MANY_FILES 23 /* Too many files to pack */
|
||||
#define E_NOT_SUPPORTED 24 /* Function not supported */
|
||||
|
||||
/* flags for unpacking */
|
||||
#define PK_OM_LIST 0
|
||||
#define PK_OM_EXTRACT 1
|
||||
|
||||
/* flags for ProcessFile */
|
||||
#define PK_SKIP 0 /* Skip this file */
|
||||
#define PK_TEST 1 /* Test file integrity */
|
||||
#define PK_EXTRACT 2 /* Extract to disk */
|
||||
|
||||
/* Flags passed through ChangeVolProc */
|
||||
#define PK_VOL_ASK 0 /* Ask user for location of next volume */
|
||||
#define PK_VOL_NOTIFY 1 /* Notify app that next volume will be unpacked */
|
||||
|
||||
/* Flags for packing */
|
||||
|
||||
/* For PackFiles */
|
||||
#define PK_PACK_MOVE_FILES 1 /* Delete original after packing */
|
||||
#define PK_PACK_SAVE_PATHS 2 /* Save path names of files */
|
||||
#define PK_PACK_ENCRYPT 4 /* Ask user for password, then encrypt */
|
||||
|
||||
/* Returned by GetPackCaps */
|
||||
#define PK_CAPS_NEW 1 /* Can create new archives */
|
||||
#define PK_CAPS_MODIFY 2 /* Can modify exisiting archives */
|
||||
#define PK_CAPS_MULTIPLE 4 /* Archive can contain multiple files */
|
||||
#define PK_CAPS_DELETE 8 /* Can delete files */
|
||||
#define PK_CAPS_OPTIONS 16 /* Has options dialog */
|
||||
#define PK_CAPS_MEMPACK 32 /* Supports packing in memory */
|
||||
#define PK_CAPS_BY_CONTENT 64 /* Detect archive type by content */
|
||||
#define PK_CAPS_SEARCHTEXT 128 /* Allow searching for text in archives */
|
||||
/* created with this plugin} */
|
||||
#define PK_CAPS_HIDE 256 /* Show as normal files (hide packer */
|
||||
/* icon), open with Ctrl+PgDn, not Enter*/
|
||||
#define PK_CAPS_ENCRYPT 512 /* Plugin supports PK_PACK_ENCRYPT option*/
|
||||
|
||||
/* Flags for packing in memory */
|
||||
#define MEM_OPTIONS_WANTHEADERS 1 /* Return archive headers with packed data */
|
||||
|
||||
/* Errors returned by PackToMem */
|
||||
#define MEMPACK_OK 0 /* Function call finished OK, but there is more data */
|
||||
#define MEMPACK_DONE 1 /* Function call finished OK, there is no more data */
|
||||
|
||||
#define PK_CRYPT_SAVE_PASSWORD 1
|
||||
#define PK_CRYPT_LOAD_PASSWORD 2
|
||||
#define PK_CRYPT_LOAD_PASSWORD_NO_UI 3 // Load password only if master password has already been entered!
|
||||
#define PK_CRYPT_COPY_PASSWORD 4 // Copy encrypted password to new archive name
|
||||
#define PK_CRYPT_MOVE_PASSWORD 5 // Move password when renaming an archive
|
||||
#define PK_CRYPT_DELETE_PASSWORD 6 // Delete password
|
||||
|
||||
#define PK_CRYPTOPT_MASTERPASS_SET 1 // The user already has a master password defined
|
||||
|
||||
typedef struct {
|
||||
char ArcName[260];
|
||||
char FileName[260];
|
||||
int Flags;
|
||||
int PackSize;
|
||||
int UnpSize;
|
||||
int HostOS;
|
||||
int FileCRC;
|
||||
int FileTime;
|
||||
int UnpVer;
|
||||
int Method;
|
||||
int FileAttr;
|
||||
char* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
} tHeaderData;
|
||||
|
||||
typedef struct {
|
||||
char ArcName[1024];
|
||||
char FileName[1024];
|
||||
int Flags;
|
||||
unsigned int PackSize;
|
||||
unsigned int PackSizeHigh;
|
||||
unsigned int UnpSize;
|
||||
unsigned int UnpSizeHigh;
|
||||
int HostOS;
|
||||
int FileCRC;
|
||||
int FileTime;
|
||||
int UnpVer;
|
||||
int Method;
|
||||
int FileAttr;
|
||||
char* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
char Reserved[1024];
|
||||
} tHeaderDataEx;
|
||||
|
||||
typedef struct {
|
||||
WCHAR ArcName[1024];
|
||||
WCHAR FileName[1024];
|
||||
int Flags;
|
||||
unsigned int PackSize;
|
||||
unsigned int PackSizeHigh;
|
||||
unsigned int UnpSize;
|
||||
unsigned int UnpSizeHigh;
|
||||
int HostOS;
|
||||
int FileCRC;
|
||||
int FileTime;
|
||||
int UnpVer;
|
||||
int Method;
|
||||
int FileAttr;
|
||||
char* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
char Reserved[1024];
|
||||
} tHeaderDataExW;
|
||||
|
||||
typedef struct {
|
||||
char* ArcName;
|
||||
int OpenMode;
|
||||
int OpenResult;
|
||||
char* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
} tOpenArchiveData;
|
||||
|
||||
typedef struct {
|
||||
WCHAR* ArcName;
|
||||
int OpenMode;
|
||||
int OpenResult;
|
||||
WCHAR* CmtBuf;
|
||||
int CmtBufSize;
|
||||
int CmtSize;
|
||||
int CmtState;
|
||||
} tOpenArchiveDataW;
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} PackDefaultParamStruct;
|
||||
|
||||
/* Definition of callback functions called by the DLL
|
||||
Ask to swap disk for multi-volume archive */
|
||||
typedef int (DCPCALL *tChangeVolProc)(char *ArcName,int Mode);
|
||||
typedef int (DCPCALL *tChangeVolProcW)(WCHAR *ArcName,int Mode);
|
||||
/* Notify that data is processed - used for progress dialog */
|
||||
typedef int (DCPCALL *tProcessDataProc)(char *FileName,int Size);
|
||||
typedef int (DCPCALL *tProcessDataProcW)(WCHAR *FileName,int Size);
|
||||
typedef int (DCPCALL *tPkCryptProc)(int CryptoNr,int Mode,
|
||||
char* ArchiveName,char* Password,int maxlen);
|
||||
typedef int (DCPCALL *tPkCryptProcW)(int CryptoNr,int Mode,
|
||||
WCHAR* ArchiveName,WCHAR* Password,int maxlen);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,210 +1,210 @@
|
|||
{ Contents of file wcxhead.pas }
|
||||
{ It contains definitions of error codes, flags and callbacks }
|
||||
{ Ver. 2.20 with Unicode support }
|
||||
|
||||
unit WcxPlugin;
|
||||
|
||||
interface
|
||||
|
||||
const {Error codes returned to calling application}
|
||||
E_SUCCESS= 0; {Success}
|
||||
E_END_ARCHIVE= 10; {No more files in archive}
|
||||
E_NO_MEMORY= 11; {Not enough memory}
|
||||
E_BAD_DATA= 12; {Data is bad}
|
||||
E_BAD_ARCHIVE= 13; {CRC error in archive data}
|
||||
E_UNKNOWN_FORMAT= 14; {Archive format unknown}
|
||||
E_EOPEN= 15; {Cannot open existing file}
|
||||
E_ECREATE= 16; {Cannot create file}
|
||||
E_ECLOSE= 17; {Error closing file}
|
||||
E_EREAD= 18; {Error reading from file}
|
||||
E_EWRITE= 19; {Error writing to file}
|
||||
E_SMALL_BUF= 20; {Buffer too small}
|
||||
E_EABORTED= 21; {Function aborted by user}
|
||||
E_NO_FILES= 22; {No files found}
|
||||
E_TOO_MANY_FILES= 23; {Too many files to pack}
|
||||
E_NOT_SUPPORTED= 24; {Function not supported}
|
||||
|
||||
{Unpacking flags}
|
||||
PK_OM_LIST= 0;
|
||||
PK_OM_EXTRACT= 1;
|
||||
|
||||
{Flags for ProcessFile}
|
||||
PK_SKIP= 0; {Skip file (no unpacking)}
|
||||
PK_TEST= 1; {Test file integrity}
|
||||
PK_EXTRACT= 2; {Extract file to disk}
|
||||
|
||||
{Flags passed through ChangeVolProc}
|
||||
PK_VOL_ASK= 0; {Ask user for location of next volume}
|
||||
PK_VOL_NOTIFY= 1; {Notify app that next volume will be unpacked}
|
||||
|
||||
{Packing flags}
|
||||
|
||||
{For PackFiles}
|
||||
PK_PACK_MOVE_FILES= 1; {Delete original after packing}
|
||||
PK_PACK_SAVE_PATHS= 2; {Save path names of files}
|
||||
PK_PACK_ENCRYPT= 4; {Ask user for password, then encrypt}
|
||||
|
||||
|
||||
{Returned by GetPackCaps}
|
||||
PK_CAPS_NEW= 1; {Can create new archives}
|
||||
PK_CAPS_MODIFY= 2; {Can modify exisiting archives}
|
||||
PK_CAPS_MULTIPLE= 4; {Archive can contain multiple files}
|
||||
PK_CAPS_DELETE= 8; {Can delete files}
|
||||
PK_CAPS_OPTIONS= 16; {Supports the options dialogbox}
|
||||
PK_CAPS_MEMPACK= 32; {Supports packing in memory}
|
||||
PK_CAPS_BY_CONTENT= 64; {Detect archive type by content}
|
||||
PK_CAPS_SEARCHTEXT= 128; {Allow searching for text in archives}
|
||||
{ created with this plugin}
|
||||
PK_CAPS_HIDE= 256; { Show as normal files (hide packer icon) }
|
||||
{ open with Ctrl+PgDn, not Enter }
|
||||
PK_CAPS_ENCRYPT= 512; { Plugin supports PK_PACK_ENCRYPT option }
|
||||
|
||||
BACKGROUND_UNPACK=1; { Which operations are thread-safe? }
|
||||
BACKGROUND_PACK=2;
|
||||
BACKGROUND_MEMPACK=4; { For tar.pluginext in background }
|
||||
|
||||
{Flags for packing in memory}
|
||||
MEM_OPTIONS_WANTHEADERS=1; {Return archive headers with packed data}
|
||||
|
||||
{Errors returned by PackToMem}
|
||||
MEMPACK_OK= 0; {Function call finished OK, but there is more data}
|
||||
MEMPACK_DONE= 1; {Function call finished OK, there is no more data}
|
||||
|
||||
{Flags for PkCryptProc callback}
|
||||
PK_CRYPT_SAVE_PASSWORD=1;
|
||||
PK_CRYPT_LOAD_PASSWORD=2;
|
||||
PK_CRYPT_LOAD_PASSWORD_NO_UI=3; { Load password only if master password has already been entered!}
|
||||
PK_CRYPT_COPY_PASSWORD=4; { Copy encrypted password to new archive name}
|
||||
PK_CRYPT_MOVE_PASSWORD=5; { Move password when renaming an archive}
|
||||
PK_CRYPT_DELETE_PASSWORD=6; { Delete password}
|
||||
|
||||
PK_CRYPTOPT_MASTERPASS_SET = 1; // The user already has a master password defined
|
||||
|
||||
type
|
||||
{ Unsigned integer with pointer size }
|
||||
TArcHandle = {$IFDEF CPU64}QWord{$ELSE}LongWord{$ENDIF};
|
||||
{$IFNDEF LCL}
|
||||
HWND = type PtrUInt; // Defined as in LCL
|
||||
{$ENDIF}
|
||||
|
||||
const
|
||||
wcxInvalidHandle = TArcHandle(-1);
|
||||
|
||||
{ For compatibility with Delphi use $IFDEF's to set calling convention }
|
||||
|
||||
type
|
||||
{Definition of callback functions called by the DLL}
|
||||
{Ask to swap disk for multi-volume archive}
|
||||
PChangeVolProc=^TChangeVolProc;
|
||||
TChangeVolProc=function(ArcName:pchar;Mode:longint):longint; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
PChangeVolProcW=^TChangeVolProcW;
|
||||
TChangeVolProcW=function(ArcName:pwidechar;Mode:longint):longint; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{Notify that data is processed - used for progress dialog}
|
||||
PProcessDataProc=^TProcessDataProc;
|
||||
TProcessDataProc=function(FileName:pchar;Size:longint):longint; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
PProcessDataProcW=^TProcessDataProcW;
|
||||
TProcessDataProcW=function(FileName:pwidechar;Size:longint):longint; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
PPkCryptProc = ^TPkCryptProc;
|
||||
TPkCryptProc = function(CryptoNr: Integer; Mode: Integer; ArchiveName,
|
||||
Password: PAnsiChar; MaxLen: Integer): Integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
PPkCryptProcW = ^TPkCryptProcW;
|
||||
TPkCryptProcW = function(CryptoNr: Integer; Mode: Integer; ArchiveName,
|
||||
Password: PWideChar; MaxLen: Integer): Integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
type
|
||||
PHeaderData = ^THeaderData;
|
||||
THeaderData=packed record
|
||||
ArcName:array [0..259] of char;
|
||||
FileName:array [0..259] of char;
|
||||
Flags,
|
||||
PackSize,
|
||||
UnpSize,
|
||||
HostOS,
|
||||
FileCRC,
|
||||
FileTime,
|
||||
UnpVer,
|
||||
Method,
|
||||
FileAttr:longint;
|
||||
CmtBuf:pchar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
end;
|
||||
|
||||
PHeaderDataEx = ^THeaderDataEx;
|
||||
THeaderDataEx=packed record
|
||||
ArcName:array [0..1023] of char;
|
||||
FileName:array [0..1023] of char;
|
||||
Flags,
|
||||
PackSize,
|
||||
PackSizeHigh,
|
||||
UnpSize,
|
||||
UnpSizeHigh,
|
||||
HostOS,
|
||||
FileCRC,
|
||||
FileTime,
|
||||
UnpVer,
|
||||
Method,
|
||||
FileAttr:longint;
|
||||
CmtBuf:pchar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
Reserved:array[0..1023] of char;
|
||||
end;
|
||||
|
||||
PHeaderDataExW=^THeaderDataExW;
|
||||
THeaderDataExW=packed record
|
||||
ArcName:array [0..1023] of widechar;
|
||||
FileName:array [0..1023] of widechar;
|
||||
Flags,
|
||||
PackSize,
|
||||
PackSizeHigh,
|
||||
UnpSize,
|
||||
UnpSizeHigh,
|
||||
HostOS,
|
||||
FileCRC,
|
||||
FileTime,
|
||||
UnpVer,
|
||||
Method,
|
||||
FileAttr:longint;
|
||||
CmtBuf:pchar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
Reserved:array[0..1023] of char;
|
||||
end;
|
||||
|
||||
tOpenArchiveData=packed record
|
||||
ArcName:pchar;
|
||||
OpenMode,
|
||||
OpenResult:longint;
|
||||
CmtBuf:pchar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
end;
|
||||
|
||||
tOpenArchiveDataW=packed record
|
||||
ArcName:pwidechar;
|
||||
OpenMode,
|
||||
OpenResult:longint;
|
||||
CmtBuf:pwidechar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
end;
|
||||
|
||||
tPackDefaultParamStruct=record
|
||||
size,
|
||||
PluginInterfaceVersionLow,
|
||||
PluginInterfaceVersionHi:longint;
|
||||
DefaultIniName:array[0..259] of char;
|
||||
end;
|
||||
pPackDefaultParamStruct=^tPackDefaultParamStruct;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
|
||||
{ Contents of file wcxhead.pas }
|
||||
{ It contains definitions of error codes, flags and callbacks }
|
||||
{ Ver. 2.20 with Unicode support }
|
||||
|
||||
unit WcxPlugin;
|
||||
|
||||
interface
|
||||
|
||||
const {Error codes returned to calling application}
|
||||
E_SUCCESS= 0; {Success}
|
||||
E_END_ARCHIVE= 10; {No more files in archive}
|
||||
E_NO_MEMORY= 11; {Not enough memory}
|
||||
E_BAD_DATA= 12; {Data is bad}
|
||||
E_BAD_ARCHIVE= 13; {CRC error in archive data}
|
||||
E_UNKNOWN_FORMAT= 14; {Archive format unknown}
|
||||
E_EOPEN= 15; {Cannot open existing file}
|
||||
E_ECREATE= 16; {Cannot create file}
|
||||
E_ECLOSE= 17; {Error closing file}
|
||||
E_EREAD= 18; {Error reading from file}
|
||||
E_EWRITE= 19; {Error writing to file}
|
||||
E_SMALL_BUF= 20; {Buffer too small}
|
||||
E_EABORTED= 21; {Function aborted by user}
|
||||
E_NO_FILES= 22; {No files found}
|
||||
E_TOO_MANY_FILES= 23; {Too many files to pack}
|
||||
E_NOT_SUPPORTED= 24; {Function not supported}
|
||||
|
||||
{Unpacking flags}
|
||||
PK_OM_LIST= 0;
|
||||
PK_OM_EXTRACT= 1;
|
||||
|
||||
{Flags for ProcessFile}
|
||||
PK_SKIP= 0; {Skip file (no unpacking)}
|
||||
PK_TEST= 1; {Test file integrity}
|
||||
PK_EXTRACT= 2; {Extract file to disk}
|
||||
|
||||
{Flags passed through ChangeVolProc}
|
||||
PK_VOL_ASK= 0; {Ask user for location of next volume}
|
||||
PK_VOL_NOTIFY= 1; {Notify app that next volume will be unpacked}
|
||||
|
||||
{Packing flags}
|
||||
|
||||
{For PackFiles}
|
||||
PK_PACK_MOVE_FILES= 1; {Delete original after packing}
|
||||
PK_PACK_SAVE_PATHS= 2; {Save path names of files}
|
||||
PK_PACK_ENCRYPT= 4; {Ask user for password, then encrypt}
|
||||
|
||||
|
||||
{Returned by GetPackCaps}
|
||||
PK_CAPS_NEW= 1; {Can create new archives}
|
||||
PK_CAPS_MODIFY= 2; {Can modify exisiting archives}
|
||||
PK_CAPS_MULTIPLE= 4; {Archive can contain multiple files}
|
||||
PK_CAPS_DELETE= 8; {Can delete files}
|
||||
PK_CAPS_OPTIONS= 16; {Supports the options dialogbox}
|
||||
PK_CAPS_MEMPACK= 32; {Supports packing in memory}
|
||||
PK_CAPS_BY_CONTENT= 64; {Detect archive type by content}
|
||||
PK_CAPS_SEARCHTEXT= 128; {Allow searching for text in archives}
|
||||
{ created with this plugin}
|
||||
PK_CAPS_HIDE= 256; { Show as normal files (hide packer icon) }
|
||||
{ open with Ctrl+PgDn, not Enter }
|
||||
PK_CAPS_ENCRYPT= 512; { Plugin supports PK_PACK_ENCRYPT option }
|
||||
|
||||
BACKGROUND_UNPACK=1; { Which operations are thread-safe? }
|
||||
BACKGROUND_PACK=2;
|
||||
BACKGROUND_MEMPACK=4; { For tar.pluginext in background }
|
||||
|
||||
{Flags for packing in memory}
|
||||
MEM_OPTIONS_WANTHEADERS=1; {Return archive headers with packed data}
|
||||
|
||||
{Errors returned by PackToMem}
|
||||
MEMPACK_OK= 0; {Function call finished OK, but there is more data}
|
||||
MEMPACK_DONE= 1; {Function call finished OK, there is no more data}
|
||||
|
||||
{Flags for PkCryptProc callback}
|
||||
PK_CRYPT_SAVE_PASSWORD=1;
|
||||
PK_CRYPT_LOAD_PASSWORD=2;
|
||||
PK_CRYPT_LOAD_PASSWORD_NO_UI=3; { Load password only if master password has already been entered!}
|
||||
PK_CRYPT_COPY_PASSWORD=4; { Copy encrypted password to new archive name}
|
||||
PK_CRYPT_MOVE_PASSWORD=5; { Move password when renaming an archive}
|
||||
PK_CRYPT_DELETE_PASSWORD=6; { Delete password}
|
||||
|
||||
PK_CRYPTOPT_MASTERPASS_SET = 1; // The user already has a master password defined
|
||||
|
||||
type
|
||||
{ Unsigned integer with pointer size }
|
||||
TArcHandle = {$IFDEF CPU64}QWord{$ELSE}LongWord{$ENDIF};
|
||||
{$IFNDEF LCL}
|
||||
HWND = type PtrUInt; // Defined as in LCL
|
||||
{$ENDIF}
|
||||
|
||||
const
|
||||
wcxInvalidHandle = TArcHandle(-1);
|
||||
|
||||
{ For compatibility with Delphi use $IFDEF's to set calling convention }
|
||||
|
||||
type
|
||||
{Definition of callback functions called by the DLL}
|
||||
{Ask to swap disk for multi-volume archive}
|
||||
PChangeVolProc=^TChangeVolProc;
|
||||
TChangeVolProc=function(ArcName:pchar;Mode:longint):longint; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
PChangeVolProcW=^TChangeVolProcW;
|
||||
TChangeVolProcW=function(ArcName:pwidechar;Mode:longint):longint; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{Notify that data is processed - used for progress dialog}
|
||||
PProcessDataProc=^TProcessDataProc;
|
||||
TProcessDataProc=function(FileName:pchar;Size:longint):longint; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
PProcessDataProcW=^TProcessDataProcW;
|
||||
TProcessDataProcW=function(FileName:pwidechar;Size:longint):longint; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
PPkCryptProc = ^TPkCryptProc;
|
||||
TPkCryptProc = function(CryptoNr: Integer; Mode: Integer; ArchiveName,
|
||||
Password: PAnsiChar; MaxLen: Integer): Integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
PPkCryptProcW = ^TPkCryptProcW;
|
||||
TPkCryptProcW = function(CryptoNr: Integer; Mode: Integer; ArchiveName,
|
||||
Password: PWideChar; MaxLen: Integer): Integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
type
|
||||
PHeaderData = ^THeaderData;
|
||||
THeaderData=packed record
|
||||
ArcName:array [0..259] of char;
|
||||
FileName:array [0..259] of char;
|
||||
Flags,
|
||||
PackSize,
|
||||
UnpSize,
|
||||
HostOS,
|
||||
FileCRC,
|
||||
FileTime,
|
||||
UnpVer,
|
||||
Method,
|
||||
FileAttr:longint;
|
||||
CmtBuf:pchar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
end;
|
||||
|
||||
PHeaderDataEx = ^THeaderDataEx;
|
||||
THeaderDataEx=packed record
|
||||
ArcName:array [0..1023] of char;
|
||||
FileName:array [0..1023] of char;
|
||||
Flags,
|
||||
PackSize,
|
||||
PackSizeHigh,
|
||||
UnpSize,
|
||||
UnpSizeHigh,
|
||||
HostOS,
|
||||
FileCRC,
|
||||
FileTime,
|
||||
UnpVer,
|
||||
Method,
|
||||
FileAttr:longint;
|
||||
CmtBuf:pchar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
Reserved:array[0..1023] of char;
|
||||
end;
|
||||
|
||||
PHeaderDataExW=^THeaderDataExW;
|
||||
THeaderDataExW=packed record
|
||||
ArcName:array [0..1023] of widechar;
|
||||
FileName:array [0..1023] of widechar;
|
||||
Flags,
|
||||
PackSize,
|
||||
PackSizeHigh,
|
||||
UnpSize,
|
||||
UnpSizeHigh,
|
||||
HostOS,
|
||||
FileCRC,
|
||||
FileTime,
|
||||
UnpVer,
|
||||
Method,
|
||||
FileAttr:longint;
|
||||
CmtBuf:pchar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
Reserved:array[0..1023] of char;
|
||||
end;
|
||||
|
||||
tOpenArchiveData=packed record
|
||||
ArcName:pchar;
|
||||
OpenMode,
|
||||
OpenResult:longint;
|
||||
CmtBuf:pchar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
end;
|
||||
|
||||
tOpenArchiveDataW=packed record
|
||||
ArcName:pwidechar;
|
||||
OpenMode,
|
||||
OpenResult:longint;
|
||||
CmtBuf:pwidechar;
|
||||
CmtBufSize,
|
||||
CmtSize,
|
||||
CmtState:longint;
|
||||
end;
|
||||
|
||||
tPackDefaultParamStruct=record
|
||||
size,
|
||||
PluginInterfaceVersionLow,
|
||||
PluginInterfaceVersionHi:longint;
|
||||
DefaultIniName:array[0..259] of char;
|
||||
end;
|
||||
pPackDefaultParamStruct=^tPackDefaultParamStruct;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
|
|
|||
196
sdk/wdxplugin.h
196
sdk/wdxplugin.h
|
|
@ -1,99 +1,99 @@
|
|||
#include "common.h"
|
||||
|
||||
// Contents of file contplug.h version 2.0
|
||||
|
||||
#define ft_nomorefields 0
|
||||
#define ft_numeric_32 1
|
||||
#define ft_numeric_64 2
|
||||
#define ft_numeric_floating 3
|
||||
#define ft_date 4
|
||||
#define ft_time 5
|
||||
#define ft_boolean 6
|
||||
#define ft_multiplechoice 7
|
||||
#define ft_string 8
|
||||
#define ft_fulltext 9
|
||||
#define ft_datetime 10
|
||||
#define ft_stringw 11
|
||||
|
||||
// for ContentGetValue
|
||||
#define ft_nosuchfield -1 // error, invalid field number given
|
||||
#define ft_fileerror -2 // file i/o error
|
||||
#define ft_fieldempty -3 // field valid, but empty
|
||||
|
||||
#define ft_ondemand -4 // field will be retrieved only when user presses <SPACEBAR>
|
||||
#define ft_notsupported -5 // function not supported
|
||||
#define ft_setcancel -6 // user clicked cancel in field editor
|
||||
#define ft_delayed 0 // field takes a long time to extract -> try again in background
|
||||
|
||||
// for ContentSetValue
|
||||
#define ft_setsuccess 0 // setting of the attribute succeeded
|
||||
|
||||
// for ContentGetSupportedFieldFlags
|
||||
#define contflags_edit 1
|
||||
#define contflags_substsize 2
|
||||
|
||||
#define contflags_substdatetime 4
|
||||
#define contflags_substdate 6
|
||||
#define contflags_substtime 8
|
||||
#define contflags_substattributes 10
|
||||
#define contflags_substattributestr 12
|
||||
#define contflags_passthrough_size_float 14
|
||||
#define contflags_substmask 14
|
||||
#define contflags_fieldedit 16
|
||||
|
||||
#define contst_readnewdir 1
|
||||
#define contst_refreshpressed 2
|
||||
#define contst_showhint 4
|
||||
|
||||
#define setflags_first_attribute 1 // First attribute of this file
|
||||
#define setflags_last_attribute 2 // Last attribute of this file
|
||||
|
||||
#define setflags_only_date 4 // Only set the date of the datetime value!
|
||||
|
||||
#define editflags_initialize 1 // The data passed to the plugin may be used to
|
||||
// initialize the edit dialog
|
||||
|
||||
#define CONTENT_DELAYIFSLOW 1 // ContentGetValue called in foreground
|
||||
#define CONTENT_PASSTHROUGH 2 // If requested via contflags_passthrough_size_float: The size
|
||||
// is passed in as floating value, TC expects correct value
|
||||
|
||||
// from the given units value, and optionally a text string
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} ContentDefaultParamStruct;
|
||||
|
||||
typedef struct {
|
||||
|
||||
WORD wYear;
|
||||
WORD wMonth;
|
||||
WORD wDay;
|
||||
} tdateformat,*pdateformat;
|
||||
|
||||
typedef struct {
|
||||
WORD wHour;
|
||||
WORD wMinute;
|
||||
WORD wSecond;
|
||||
} ttimeformat,*ptimeformat;
|
||||
|
||||
int DCPCALL ContentGetDetectString(char* DetectString,int maxlen);
|
||||
int DCPCALL ContentGetSupportedField(int FieldIndex,char* FieldName,char* Units,int maxlen);
|
||||
int DCPCALL ContentGetValue(char* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
|
||||
int DCPCALL ContentGetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
|
||||
|
||||
void DCPCALL ContentSetDefaultParams(ContentDefaultParamStruct* dps);
|
||||
void DCPCALL ContentPluginUnloading(void);
|
||||
void DCPCALL ContentStopGetValue(char* FileName);
|
||||
void DCPCALL ContentStopGetValueW(WCHAR* FileName);
|
||||
int DCPCALL ContentGetDefaultSortOrder(int FieldIndex);
|
||||
int DCPCALL ContentGetSupportedFieldFlags(int FieldIndex);
|
||||
int DCPCALL ContentSetValue(char* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
|
||||
int DCPCALL ContentSetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
|
||||
|
||||
int DCPCALL ContentEditValue(HWND ParentWin,int FieldIndex,int UnitIndex,int FieldType,
|
||||
void* FieldValue,int maxlen,int flags,char* langidentifier);
|
||||
void DCPCALL ContentSendStateInformation(int state,char* path);
|
||||
#include "common.h"
|
||||
|
||||
// Contents of file contplug.h version 2.0
|
||||
|
||||
#define ft_nomorefields 0
|
||||
#define ft_numeric_32 1
|
||||
#define ft_numeric_64 2
|
||||
#define ft_numeric_floating 3
|
||||
#define ft_date 4
|
||||
#define ft_time 5
|
||||
#define ft_boolean 6
|
||||
#define ft_multiplechoice 7
|
||||
#define ft_string 8
|
||||
#define ft_fulltext 9
|
||||
#define ft_datetime 10
|
||||
#define ft_stringw 11
|
||||
|
||||
// for ContentGetValue
|
||||
#define ft_nosuchfield -1 // error, invalid field number given
|
||||
#define ft_fileerror -2 // file i/o error
|
||||
#define ft_fieldempty -3 // field valid, but empty
|
||||
|
||||
#define ft_ondemand -4 // field will be retrieved only when user presses <SPACEBAR>
|
||||
#define ft_notsupported -5 // function not supported
|
||||
#define ft_setcancel -6 // user clicked cancel in field editor
|
||||
#define ft_delayed 0 // field takes a long time to extract -> try again in background
|
||||
|
||||
// for ContentSetValue
|
||||
#define ft_setsuccess 0 // setting of the attribute succeeded
|
||||
|
||||
// for ContentGetSupportedFieldFlags
|
||||
#define contflags_edit 1
|
||||
#define contflags_substsize 2
|
||||
|
||||
#define contflags_substdatetime 4
|
||||
#define contflags_substdate 6
|
||||
#define contflags_substtime 8
|
||||
#define contflags_substattributes 10
|
||||
#define contflags_substattributestr 12
|
||||
#define contflags_passthrough_size_float 14
|
||||
#define contflags_substmask 14
|
||||
#define contflags_fieldedit 16
|
||||
|
||||
#define contst_readnewdir 1
|
||||
#define contst_refreshpressed 2
|
||||
#define contst_showhint 4
|
||||
|
||||
#define setflags_first_attribute 1 // First attribute of this file
|
||||
#define setflags_last_attribute 2 // Last attribute of this file
|
||||
|
||||
#define setflags_only_date 4 // Only set the date of the datetime value!
|
||||
|
||||
#define editflags_initialize 1 // The data passed to the plugin may be used to
|
||||
// initialize the edit dialog
|
||||
|
||||
#define CONTENT_DELAYIFSLOW 1 // ContentGetValue called in foreground
|
||||
#define CONTENT_PASSTHROUGH 2 // If requested via contflags_passthrough_size_float: The size
|
||||
// is passed in as floating value, TC expects correct value
|
||||
|
||||
// from the given units value, and optionally a text string
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} ContentDefaultParamStruct;
|
||||
|
||||
typedef struct {
|
||||
|
||||
WORD wYear;
|
||||
WORD wMonth;
|
||||
WORD wDay;
|
||||
} tdateformat,*pdateformat;
|
||||
|
||||
typedef struct {
|
||||
WORD wHour;
|
||||
WORD wMinute;
|
||||
WORD wSecond;
|
||||
} ttimeformat,*ptimeformat;
|
||||
|
||||
int DCPCALL ContentGetDetectString(char* DetectString,int maxlen);
|
||||
int DCPCALL ContentGetSupportedField(int FieldIndex,char* FieldName,char* Units,int maxlen);
|
||||
int DCPCALL ContentGetValue(char* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
|
||||
int DCPCALL ContentGetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
|
||||
|
||||
void DCPCALL ContentSetDefaultParams(ContentDefaultParamStruct* dps);
|
||||
void DCPCALL ContentPluginUnloading(void);
|
||||
void DCPCALL ContentStopGetValue(char* FileName);
|
||||
void DCPCALL ContentStopGetValueW(WCHAR* FileName);
|
||||
int DCPCALL ContentGetDefaultSortOrder(int FieldIndex);
|
||||
int DCPCALL ContentGetSupportedFieldFlags(int FieldIndex);
|
||||
int DCPCALL ContentSetValue(char* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
|
||||
int DCPCALL ContentSetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
|
||||
|
||||
int DCPCALL ContentEditValue(HWND ParentWin,int FieldIndex,int UnitIndex,int FieldType,
|
||||
void* FieldValue,int maxlen,int flags,char* langidentifier);
|
||||
void DCPCALL ContentSendStateInformation(int state,char* path);
|
||||
void DCPCALL ContentSendStateInformationW(int state,WCHAR* path);
|
||||
|
|
@ -1,107 +1,107 @@
|
|||
unit WdxPlugin; { Content plugins }
|
||||
|
||||
interface
|
||||
|
||||
uses SysUtils;
|
||||
|
||||
const ft_nomorefields=0;
|
||||
ft_numeric_32=1;
|
||||
ft_numeric_64=2;
|
||||
ft_numeric_floating=3;
|
||||
ft_date=4;
|
||||
ft_time=5;
|
||||
ft_boolean=6;
|
||||
ft_multiplechoice=7;
|
||||
ft_string=8;
|
||||
ft_fulltext=9;
|
||||
ft_datetime=10;
|
||||
ft_stringw=11;
|
||||
|
||||
// for ContentGetValue
|
||||
ft_nosuchfield=-1;
|
||||
ft_fileerror=-2;
|
||||
ft_fieldempty=-3;
|
||||
ft_ondemand=-4;
|
||||
ft_notsupported=-5;
|
||||
ft_setcancel=-6;
|
||||
ft_delayed=0;
|
||||
|
||||
// for ContentSetValue
|
||||
ft_setsuccess=0; // setting of the attribute succeeded
|
||||
|
||||
// for ContentGetSupportedFieldFlags
|
||||
contflags_edit=1;
|
||||
contflags_substsize=2;
|
||||
contflags_substdatetime=4;
|
||||
contflags_substdate=6;
|
||||
contflags_substtime=8;
|
||||
contflags_substattributes=10;
|
||||
contflags_substattributestr=12;
|
||||
contflags_passthrough_size_float=14;
|
||||
contflags_substmask=14;
|
||||
contflags_fieldedit=16;
|
||||
|
||||
// for ContentSendStateInformation
|
||||
contst_readnewdir=1;
|
||||
contst_refreshpressed=2;
|
||||
contst_showhint=4;
|
||||
|
||||
setflags_first_attribute=1; // First attribute of this file
|
||||
setflags_last_attribute=2; // Last attribute of this file
|
||||
setflags_only_date=4; // Only set the date of the datetime value!
|
||||
|
||||
|
||||
CONTENT_DELAYIFSLOW=1; // ContentGetValue called in foreground
|
||||
CONTENT_PASSTHROUGH=2; // If requested via contflags_passthrough_size_float: The size
|
||||
// is passed in as floating value, TC expects correct value
|
||||
// from the given units value, and optionally a text string
|
||||
|
||||
type tContentDefaultParamStruct=record
|
||||
size,
|
||||
PluginInterfaceVersionLow,
|
||||
PluginInterfaceVersionHi:longint;
|
||||
DefaultIniName:array[0..MAX_PATH-1] of char;
|
||||
end;
|
||||
pContentDefaultParamStruct=^tContentDefaultParamStruct;
|
||||
|
||||
type tdateformat=record
|
||||
wYear,wMonth,wDay:word;
|
||||
end;
|
||||
pdateformat=^tdateformat;
|
||||
|
||||
type ttimeformat=record
|
||||
wHour,wMinute,wSecond:word;
|
||||
end;
|
||||
ptimeformat=^ttimeformat;
|
||||
|
||||
{ Function prototypes: }
|
||||
|
||||
(*
|
||||
|
||||
procedure ContentGetDetectString(DetectString:pchar;maxlen:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetSupportedField(FieldIndex:integer;FieldName:pchar;
|
||||
Units:pchar;maxlen:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetValue(FileName:pchar;FieldIndex,UnitIndex:integer;
|
||||
FieldValue:pbyte; maxlen,flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetValueW(FileName:pwidechar;FieldIndex,UnitIndex:integer;
|
||||
FieldValue:pbyte; maxlen,flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentSetDefaultParams(dps:pContentDefaultParamStruct); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentPluginUnloading; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentStopGetValue(FileName:pchar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentStopGetValueW(FileName:pwidechar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetDefaultSortOrder(FieldIndex:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetSupportedFieldFlags(FieldIndex:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentSetValue(FileName:pchar;FieldIndex,UnitIndex,FieldType:integer;
|
||||
FieldValue:pbyte;flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentSetValueW(FileName:pwidechar;FieldIndex,UnitIndex,FieldType:integer;
|
||||
FieldValue:pbyte;flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentSendStateInformation(state:integer;path:pchar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentSendStateInformationW(state:integer;path:pwidechar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentEditValue(handle:thandle;FieldIndex,UnitIndex,FieldType:integer;
|
||||
FieldValue:pchar;maxlen:integer;flags:integer;langidentifier:pchar):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
*)
|
||||
|
||||
implementation
|
||||
end.
|
||||
|
||||
unit WdxPlugin; { Content plugins }
|
||||
|
||||
interface
|
||||
|
||||
uses SysUtils;
|
||||
|
||||
const ft_nomorefields=0;
|
||||
ft_numeric_32=1;
|
||||
ft_numeric_64=2;
|
||||
ft_numeric_floating=3;
|
||||
ft_date=4;
|
||||
ft_time=5;
|
||||
ft_boolean=6;
|
||||
ft_multiplechoice=7;
|
||||
ft_string=8;
|
||||
ft_fulltext=9;
|
||||
ft_datetime=10;
|
||||
ft_stringw=11;
|
||||
|
||||
// for ContentGetValue
|
||||
ft_nosuchfield=-1;
|
||||
ft_fileerror=-2;
|
||||
ft_fieldempty=-3;
|
||||
ft_ondemand=-4;
|
||||
ft_notsupported=-5;
|
||||
ft_setcancel=-6;
|
||||
ft_delayed=0;
|
||||
|
||||
// for ContentSetValue
|
||||
ft_setsuccess=0; // setting of the attribute succeeded
|
||||
|
||||
// for ContentGetSupportedFieldFlags
|
||||
contflags_edit=1;
|
||||
contflags_substsize=2;
|
||||
contflags_substdatetime=4;
|
||||
contflags_substdate=6;
|
||||
contflags_substtime=8;
|
||||
contflags_substattributes=10;
|
||||
contflags_substattributestr=12;
|
||||
contflags_passthrough_size_float=14;
|
||||
contflags_substmask=14;
|
||||
contflags_fieldedit=16;
|
||||
|
||||
// for ContentSendStateInformation
|
||||
contst_readnewdir=1;
|
||||
contst_refreshpressed=2;
|
||||
contst_showhint=4;
|
||||
|
||||
setflags_first_attribute=1; // First attribute of this file
|
||||
setflags_last_attribute=2; // Last attribute of this file
|
||||
setflags_only_date=4; // Only set the date of the datetime value!
|
||||
|
||||
|
||||
CONTENT_DELAYIFSLOW=1; // ContentGetValue called in foreground
|
||||
CONTENT_PASSTHROUGH=2; // If requested via contflags_passthrough_size_float: The size
|
||||
// is passed in as floating value, TC expects correct value
|
||||
// from the given units value, and optionally a text string
|
||||
|
||||
type tContentDefaultParamStruct=record
|
||||
size,
|
||||
PluginInterfaceVersionLow,
|
||||
PluginInterfaceVersionHi:longint;
|
||||
DefaultIniName:array[0..MAX_PATH-1] of char;
|
||||
end;
|
||||
pContentDefaultParamStruct=^tContentDefaultParamStruct;
|
||||
|
||||
type tdateformat=record
|
||||
wYear,wMonth,wDay:word;
|
||||
end;
|
||||
pdateformat=^tdateformat;
|
||||
|
||||
type ttimeformat=record
|
||||
wHour,wMinute,wSecond:word;
|
||||
end;
|
||||
ptimeformat=^ttimeformat;
|
||||
|
||||
{ Function prototypes: }
|
||||
|
||||
(*
|
||||
|
||||
procedure ContentGetDetectString(DetectString:pchar;maxlen:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetSupportedField(FieldIndex:integer;FieldName:pchar;
|
||||
Units:pchar;maxlen:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetValue(FileName:pchar;FieldIndex,UnitIndex:integer;
|
||||
FieldValue:pbyte; maxlen,flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetValueW(FileName:pwidechar;FieldIndex,UnitIndex:integer;
|
||||
FieldValue:pbyte; maxlen,flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentSetDefaultParams(dps:pContentDefaultParamStruct); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentPluginUnloading; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentStopGetValue(FileName:pchar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentStopGetValueW(FileName:pwidechar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetDefaultSortOrder(FieldIndex:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentGetSupportedFieldFlags(FieldIndex:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentSetValue(FileName:pchar;FieldIndex,UnitIndex,FieldType:integer;
|
||||
FieldValue:pbyte;flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentSetValueW(FileName:pwidechar;FieldIndex,UnitIndex,FieldType:integer;
|
||||
FieldValue:pbyte;flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentSendStateInformation(state:integer;path:pchar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ContentSendStateInformationW(state:integer;path:pwidechar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ContentEditValue(handle:thandle;FieldIndex,UnitIndex,FieldType:integer;
|
||||
FieldValue:pchar;maxlen:integer;flags:integer;langidentifier:pchar):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
*)
|
||||
|
||||
implementation
|
||||
end.
|
||||
|
||||
|
|
|
|||
674
sdk/wfxplugin.h
674
sdk/wfxplugin.h
|
|
@ -1,338 +1,338 @@
|
|||
#include "common.h"
|
||||
|
||||
// contents of fsplugin.h version 2.0 (30.Jan.2009)
|
||||
|
||||
// ids for FsGetFile
|
||||
|
||||
#define FS_FILE_OK 0
|
||||
|
||||
#define FS_FILE_EXISTS 1
|
||||
|
||||
#define FS_FILE_NOTFOUND 2
|
||||
|
||||
#define FS_FILE_READERROR 3
|
||||
|
||||
#define FS_FILE_WRITEERROR 4
|
||||
|
||||
#define FS_FILE_USERABORT 5
|
||||
|
||||
#define FS_FILE_NOTSUPPORTED 6
|
||||
|
||||
#define FS_FILE_EXISTSRESUMEALLOWED 7
|
||||
|
||||
#define FS_EXEC_OK 0
|
||||
|
||||
#define FS_EXEC_ERROR 1
|
||||
|
||||
#define FS_EXEC_YOURSELF -1
|
||||
|
||||
#define FS_EXEC_SYMLINK -2
|
||||
|
||||
#define FS_COPYFLAGS_OVERWRITE 1
|
||||
|
||||
#define FS_COPYFLAGS_RESUME 2
|
||||
|
||||
#define FS_COPYFLAGS_MOVE 4
|
||||
|
||||
#define FS_COPYFLAGS_EXISTS_SAMECASE 8
|
||||
|
||||
#define FS_COPYFLAGS_EXISTS_DIFFERENTCASE 16
|
||||
|
||||
|
||||
|
||||
// flags for tRequestProc
|
||||
|
||||
#define RT_Other 0
|
||||
|
||||
#define RT_UserName 1
|
||||
|
||||
#define RT_Password 2
|
||||
|
||||
#define RT_Account 3
|
||||
|
||||
#define RT_UserNameFirewall 4
|
||||
|
||||
#define RT_PasswordFirewall 5
|
||||
|
||||
#define RT_TargetDir 6
|
||||
|
||||
#define RT_URL 7
|
||||
|
||||
#define RT_MsgOK 8
|
||||
|
||||
#define RT_MsgYesNo 9
|
||||
|
||||
#define RT_MsgOKCancel 10
|
||||
|
||||
// flags for tLogProc
|
||||
|
||||
#define MSGTYPE_CONNECT 1
|
||||
|
||||
#define MSGTYPE_DISCONNECT 2
|
||||
|
||||
#define MSGTYPE_DETAILS 3
|
||||
|
||||
#define MSGTYPE_TRANSFERCOMPLETE 4
|
||||
|
||||
#define MSGTYPE_CONNECTCOMPLETE 5
|
||||
|
||||
#define MSGTYPE_IMPORTANTERROR 6
|
||||
|
||||
#define MSGTYPE_OPERATIONCOMPLETE 7
|
||||
|
||||
// flags for FsStatusInfo
|
||||
|
||||
#define FS_STATUS_START 0
|
||||
|
||||
#define FS_STATUS_END 1
|
||||
|
||||
#define FS_STATUS_OP_LIST 1
|
||||
|
||||
#define FS_STATUS_OP_GET_SINGLE 2
|
||||
|
||||
#define FS_STATUS_OP_GET_MULTI 3
|
||||
|
||||
#define FS_STATUS_OP_PUT_SINGLE 4
|
||||
|
||||
#define FS_STATUS_OP_PUT_MULTI 5
|
||||
|
||||
#define FS_STATUS_OP_RENMOV_SINGLE 6
|
||||
|
||||
#define FS_STATUS_OP_RENMOV_MULTI 7
|
||||
|
||||
#define FS_STATUS_OP_DELETE 8
|
||||
|
||||
#define FS_STATUS_OP_ATTRIB 9
|
||||
|
||||
#define FS_STATUS_OP_MKDIR 10
|
||||
|
||||
#define FS_STATUS_OP_EXEC 11
|
||||
|
||||
#define FS_STATUS_OP_CALCSIZE 12
|
||||
|
||||
#define FS_STATUS_OP_SEARCH 13
|
||||
|
||||
#define FS_STATUS_OP_SEARCH_TEXT 14
|
||||
|
||||
#define FS_STATUS_OP_SYNC_SEARCH 15
|
||||
|
||||
#define FS_STATUS_OP_SYNC_GET 16
|
||||
|
||||
#define FS_STATUS_OP_SYNC_PUT 17
|
||||
|
||||
#define FS_STATUS_OP_SYNC_DELETE 18
|
||||
|
||||
#define FS_ICONFLAG_SMALL 1
|
||||
|
||||
#define FS_ICONFLAG_BACKGROUND 2
|
||||
|
||||
#define FS_ICON_USEDEFAULT 0
|
||||
|
||||
#define FS_ICON_EXTRACTED 1
|
||||
|
||||
#define FS_ICON_EXTRACTED_DESTROY 2
|
||||
|
||||
#define FS_ICON_DELAYED 3
|
||||
|
||||
#define FS_BITMAP_NONE 0
|
||||
|
||||
#define FS_BITMAP_EXTRACTED 1
|
||||
|
||||
#define FS_BITMAP_EXTRACT_YOURSELF 2
|
||||
|
||||
#define FS_BITMAP_EXTRACT_YOURSELF_ANDDELETE 3
|
||||
|
||||
#define FS_BITMAP_CACHE 256
|
||||
|
||||
#define FS_CRYPT_SAVE_PASSWORD 1
|
||||
|
||||
#define FS_CRYPT_LOAD_PASSWORD 2
|
||||
|
||||
#define FS_CRYPT_LOAD_PASSWORD_NO_UI 3 // Load password only if master password has already been entered!
|
||||
|
||||
#define FS_CRYPT_COPY_PASSWORD 4 // Copy encrypted password to new connection name
|
||||
|
||||
#define FS_CRYPT_MOVE_PASSWORD 5 // Move password when renaming a connection
|
||||
|
||||
#define FS_CRYPT_DELETE_PASSWORD 6 // Delete password
|
||||
|
||||
#define FS_CRYPTOPT_MASTERPASS_SET 1 // The user already has a master password defined
|
||||
|
||||
// flags for FsFindFirst/FsFindNext
|
||||
|
||||
#define FILE_ATTRIBUTE_DIRECTORY 16
|
||||
|
||||
#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
|
||||
|
||||
#define FILE_ATTRIBUTE_UNIX_MODE 0x80000000
|
||||
|
||||
typedef struct {
|
||||
|
||||
DWORD SizeLow,SizeHigh;
|
||||
|
||||
FILETIME LastWriteTime;
|
||||
|
||||
int Attr;
|
||||
|
||||
} RemoteInfoStruct;
|
||||
|
||||
typedef struct {
|
||||
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} FsDefaultParamStruct;
|
||||
|
||||
// callback functions
|
||||
typedef int (DCPCALL *tProgressProc)(int PluginNr,char* SourceName,
|
||||
char* TargetName,int PercentDone);
|
||||
typedef int (DCPCALL *tProgressProcW)(int PluginNr,WCHAR* SourceName,
|
||||
WCHAR* TargetName,int PercentDone);
|
||||
typedef void (DCPCALL *tLogProc)(int PluginNr,int MsgType,char* LogString);
|
||||
typedef void (DCPCALL *tLogProcW)(int PluginNr,int MsgType,WCHAR* LogString);
|
||||
|
||||
typedef BOOL (DCPCALL *tRequestProc)(int PluginNr,int RequestType,char* CustomTitle,
|
||||
char* CustomText,char* ReturnedText,int maxlen);
|
||||
typedef BOOL (DCPCALL *tRequestProcW)(int PluginNr,int RequestType,WCHAR* CustomTitle,
|
||||
WCHAR* CustomText,WCHAR* ReturnedText,int maxlen);
|
||||
typedef int (DCPCALL *tCryptProc)(int PluginNr,int CryptoNr,int Mode,
|
||||
char* ConnectionName,char* Password,int maxlen);
|
||||
typedef int (DCPCALL *tCryptProcW)(int PluginNr,int CryptoNr,int Mode,
|
||||
WCHAR* ConnectionName,WCHAR* Password,int maxlen);
|
||||
|
||||
// Function prototypes
|
||||
int DCPCALL FsInit(int PluginNr,tProgressProc pProgressProc,
|
||||
tLogProc pLogProc,tRequestProc pRequestProc);
|
||||
int DCPCALL FsInitW(int PluginNr,tProgressProcW pProgressProcW,
|
||||
tLogProcW pLogProcW,tRequestProcW pRequestProcW);
|
||||
void DCPCALL FsSetCryptCallback(tCryptProc pCryptProc,int CryptoNr,int Flags);
|
||||
void DCPCALL FsSetCryptCallbackW(tCryptProcW pCryptProcW,int CryptoNr,int Flags);
|
||||
HANDLE DCPCALL FsFindFirst(char* Path,WIN32_FIND_DATAA *FindData);
|
||||
HANDLE DCPCALL FsFindFirstW(WCHAR* Path,WIN32_FIND_DATAW *FindData);
|
||||
|
||||
BOOL DCPCALL FsFindNext(HANDLE Hdl,WIN32_FIND_DATAA *FindData);
|
||||
BOOL DCPCALL FsFindNextW(HANDLE Hdl,WIN32_FIND_DATAW *FindData);
|
||||
int DCPCALL FsFindClose(HANDLE Hdl);
|
||||
BOOL DCPCALL FsMkDir(char* Path);
|
||||
BOOL DCPCALL FsMkDirW(WCHAR* Path);
|
||||
int DCPCALL FsExecuteFile(HWND MainWin,char* RemoteName,char* Verb);
|
||||
int DCPCALL FsExecuteFileW(HWND MainWin,WCHAR* RemoteName,WCHAR* Verb);
|
||||
int DCPCALL FsRenMovFile(char* OldName,char* NewName,BOOL Move,
|
||||
BOOL OverWrite,RemoteInfoStruct* ri);
|
||||
int DCPCALL FsRenMovFileW(WCHAR* OldName,WCHAR* NewName,BOOL Move,
|
||||
BOOL OverWrite,RemoteInfoStruct* ri);
|
||||
int DCPCALL FsGetFile(char* RemoteName,char* LocalName,int CopyFlags,
|
||||
RemoteInfoStruct* ri);
|
||||
|
||||
int DCPCALL FsGetFileW(WCHAR* RemoteName,WCHAR* LocalName,int CopyFlags,
|
||||
RemoteInfoStruct* ri);
|
||||
int DCPCALL FsPutFile(char* LocalName,char* RemoteName,int CopyFlags);
|
||||
int DCPCALL FsPutFileW(WCHAR* LocalName,WCHAR* RemoteName,int CopyFlags);
|
||||
BOOL DCPCALL FsDeleteFile(char* RemoteName);
|
||||
BOOL DCPCALL FsDeleteFileW(WCHAR* RemoteName);
|
||||
BOOL DCPCALL FsRemoveDir(char* RemoteName);
|
||||
BOOL DCPCALL FsRemoveDirW(WCHAR* RemoteName);
|
||||
BOOL DCPCALL FsDisconnect(char* DisconnectRoot);
|
||||
BOOL DCPCALL FsDisconnectW(WCHAR* DisconnectRoot);
|
||||
BOOL DCPCALL FsSetAttr(char* RemoteName,int NewAttr);
|
||||
BOOL DCPCALL FsSetAttrW(WCHAR* RemoteName,int NewAttr);
|
||||
BOOL DCPCALL FsSetTime(char* RemoteName,FILETIME *CreationTime,
|
||||
|
||||
FILETIME *LastAccessTime,FILETIME *LastWriteTime);
|
||||
BOOL DCPCALL FsSetTimeW(WCHAR* RemoteName,FILETIME *CreationTime,
|
||||
FILETIME *LastAccessTime,FILETIME *LastWriteTime);
|
||||
void DCPCALL FsStatusInfo(char* RemoteDir,int InfoStartEnd,int InfoOperation);
|
||||
void DCPCALL FsStatusInfoW(WCHAR* RemoteDir,int InfoStartEnd,int InfoOperation);
|
||||
void DCPCALL FsGetDefRootName(char* DefRootName,int maxlen);
|
||||
int DCPCALL FsExtractCustomIcon(char* RemoteName,int ExtractFlags,HICON* TheIcon);
|
||||
int DCPCALL FsExtractCustomIconW(WCHAR* RemoteName,int ExtractFlags,HICON* TheIcon);
|
||||
void DCPCALL FsSetDefaultParams(FsDefaultParamStruct* dps);
|
||||
|
||||
int DCPCALL FsGetPreviewBitmap(char* RemoteName,int width,int height,HBITMAP* ReturnedBitmap);
|
||||
int DCPCALL FsGetPreviewBitmapW(WCHAR* RemoteName,int width,int height,HBITMAP* ReturnedBitmap);
|
||||
BOOL DCPCALL FsLinksToLocalFiles(void);
|
||||
BOOL DCPCALL FsGetLocalName(char* RemoteName,int maxlen);
|
||||
BOOL DCPCALL FsGetLocalNameW(WCHAR* RemoteName,int maxlen);
|
||||
|
||||
// ************************** content plugin extension ****************************
|
||||
|
||||
//
|
||||
#define ft_nomorefields 0
|
||||
|
||||
#define ft_numeric_32 1
|
||||
#define ft_numeric_64 2
|
||||
#define ft_numeric_floating 3
|
||||
#define ft_date 4
|
||||
#define ft_time 5
|
||||
#define ft_boolean 6
|
||||
#define ft_multiplechoice 7
|
||||
#define ft_string 8
|
||||
#define ft_fulltext 9
|
||||
#define ft_datetime 10
|
||||
#define ft_stringw 11 // Should only be returned by Unicode function
|
||||
|
||||
// for FsContentGetValue
|
||||
#define ft_nosuchfield -1 // error, invalid field number given
|
||||
#define ft_fileerror -2 // file i/o error
|
||||
#define ft_fieldempty -3 // field valid, but empty
|
||||
|
||||
#define ft_ondemand -4 // field will be retrieved only when user presses <SPACEBAR>
|
||||
#define ft_delayed 0 // field takes a long time to extract -> try again in background
|
||||
|
||||
// for FsContentSetValue
|
||||
#define ft_setsuccess 0 // setting of the attribute succeeded
|
||||
|
||||
// for FsContentGetSupportedFieldFlags
|
||||
#define contflags_edit 1
|
||||
#define contflags_substsize 2
|
||||
#define contflags_substdatetime 4
|
||||
#define contflags_substdate 6
|
||||
#define contflags_substtime 8
|
||||
#define contflags_substattributes 10
|
||||
|
||||
#define contflags_substattributestr 12
|
||||
#define contflags_substmask 14
|
||||
|
||||
// for FsContentSetValue
|
||||
#define setflags_first_attribute 1 // First attribute of this file
|
||||
#define setflags_last_attribute 2 // Last attribute of this file
|
||||
#define setflags_only_date 4 // Only set the date of the datetime value!
|
||||
|
||||
|
||||
#define CONTENT_DELAYIFSLOW 1 // ContentGetValue called in foreground
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} ContentDefaultParamStruct;
|
||||
|
||||
typedef struct {
|
||||
WORD wYear;
|
||||
WORD wMonth;
|
||||
WORD wDay;
|
||||
} tdateformat,*pdateformat;
|
||||
|
||||
typedef struct {
|
||||
WORD wHour;
|
||||
WORD wMinute;
|
||||
WORD wSecond;
|
||||
} ttimeformat,*ptimeformat;
|
||||
|
||||
int DCPCALL FsContentGetSupportedField(int FieldIndex,char* FieldName,char* Units,int maxlen);
|
||||
int DCPCALL FsContentGetValue(char* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
|
||||
int DCPCALL FsContentGetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
|
||||
|
||||
void DCPCALL FsContentStopGetValue(char* FileName);
|
||||
void DCPCALL FsContentStopGetValueW(WCHAR* FileName);
|
||||
int DCPCALL FsContentGetDefaultSortOrder(int FieldIndex);
|
||||
void DCPCALL FsContentPluginUnloading(void);
|
||||
int DCPCALL FsContentGetSupportedFieldFlags(int FieldIndex);
|
||||
int DCPCALL FsContentSetValue(char* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
|
||||
int DCPCALL FsContentSetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
|
||||
|
||||
BOOL DCPCALL FsContentGetDefaultView(char* ViewContents,char* ViewHeaders,char* ViewWidths,char* ViewOptions,int maxlen);
|
||||
#include "common.h"
|
||||
|
||||
// contents of fsplugin.h version 2.0 (30.Jan.2009)
|
||||
|
||||
// ids for FsGetFile
|
||||
|
||||
#define FS_FILE_OK 0
|
||||
|
||||
#define FS_FILE_EXISTS 1
|
||||
|
||||
#define FS_FILE_NOTFOUND 2
|
||||
|
||||
#define FS_FILE_READERROR 3
|
||||
|
||||
#define FS_FILE_WRITEERROR 4
|
||||
|
||||
#define FS_FILE_USERABORT 5
|
||||
|
||||
#define FS_FILE_NOTSUPPORTED 6
|
||||
|
||||
#define FS_FILE_EXISTSRESUMEALLOWED 7
|
||||
|
||||
#define FS_EXEC_OK 0
|
||||
|
||||
#define FS_EXEC_ERROR 1
|
||||
|
||||
#define FS_EXEC_YOURSELF -1
|
||||
|
||||
#define FS_EXEC_SYMLINK -2
|
||||
|
||||
#define FS_COPYFLAGS_OVERWRITE 1
|
||||
|
||||
#define FS_COPYFLAGS_RESUME 2
|
||||
|
||||
#define FS_COPYFLAGS_MOVE 4
|
||||
|
||||
#define FS_COPYFLAGS_EXISTS_SAMECASE 8
|
||||
|
||||
#define FS_COPYFLAGS_EXISTS_DIFFERENTCASE 16
|
||||
|
||||
|
||||
|
||||
// flags for tRequestProc
|
||||
|
||||
#define RT_Other 0
|
||||
|
||||
#define RT_UserName 1
|
||||
|
||||
#define RT_Password 2
|
||||
|
||||
#define RT_Account 3
|
||||
|
||||
#define RT_UserNameFirewall 4
|
||||
|
||||
#define RT_PasswordFirewall 5
|
||||
|
||||
#define RT_TargetDir 6
|
||||
|
||||
#define RT_URL 7
|
||||
|
||||
#define RT_MsgOK 8
|
||||
|
||||
#define RT_MsgYesNo 9
|
||||
|
||||
#define RT_MsgOKCancel 10
|
||||
|
||||
// flags for tLogProc
|
||||
|
||||
#define MSGTYPE_CONNECT 1
|
||||
|
||||
#define MSGTYPE_DISCONNECT 2
|
||||
|
||||
#define MSGTYPE_DETAILS 3
|
||||
|
||||
#define MSGTYPE_TRANSFERCOMPLETE 4
|
||||
|
||||
#define MSGTYPE_CONNECTCOMPLETE 5
|
||||
|
||||
#define MSGTYPE_IMPORTANTERROR 6
|
||||
|
||||
#define MSGTYPE_OPERATIONCOMPLETE 7
|
||||
|
||||
// flags for FsStatusInfo
|
||||
|
||||
#define FS_STATUS_START 0
|
||||
|
||||
#define FS_STATUS_END 1
|
||||
|
||||
#define FS_STATUS_OP_LIST 1
|
||||
|
||||
#define FS_STATUS_OP_GET_SINGLE 2
|
||||
|
||||
#define FS_STATUS_OP_GET_MULTI 3
|
||||
|
||||
#define FS_STATUS_OP_PUT_SINGLE 4
|
||||
|
||||
#define FS_STATUS_OP_PUT_MULTI 5
|
||||
|
||||
#define FS_STATUS_OP_RENMOV_SINGLE 6
|
||||
|
||||
#define FS_STATUS_OP_RENMOV_MULTI 7
|
||||
|
||||
#define FS_STATUS_OP_DELETE 8
|
||||
|
||||
#define FS_STATUS_OP_ATTRIB 9
|
||||
|
||||
#define FS_STATUS_OP_MKDIR 10
|
||||
|
||||
#define FS_STATUS_OP_EXEC 11
|
||||
|
||||
#define FS_STATUS_OP_CALCSIZE 12
|
||||
|
||||
#define FS_STATUS_OP_SEARCH 13
|
||||
|
||||
#define FS_STATUS_OP_SEARCH_TEXT 14
|
||||
|
||||
#define FS_STATUS_OP_SYNC_SEARCH 15
|
||||
|
||||
#define FS_STATUS_OP_SYNC_GET 16
|
||||
|
||||
#define FS_STATUS_OP_SYNC_PUT 17
|
||||
|
||||
#define FS_STATUS_OP_SYNC_DELETE 18
|
||||
|
||||
#define FS_ICONFLAG_SMALL 1
|
||||
|
||||
#define FS_ICONFLAG_BACKGROUND 2
|
||||
|
||||
#define FS_ICON_USEDEFAULT 0
|
||||
|
||||
#define FS_ICON_EXTRACTED 1
|
||||
|
||||
#define FS_ICON_EXTRACTED_DESTROY 2
|
||||
|
||||
#define FS_ICON_DELAYED 3
|
||||
|
||||
#define FS_BITMAP_NONE 0
|
||||
|
||||
#define FS_BITMAP_EXTRACTED 1
|
||||
|
||||
#define FS_BITMAP_EXTRACT_YOURSELF 2
|
||||
|
||||
#define FS_BITMAP_EXTRACT_YOURSELF_ANDDELETE 3
|
||||
|
||||
#define FS_BITMAP_CACHE 256
|
||||
|
||||
#define FS_CRYPT_SAVE_PASSWORD 1
|
||||
|
||||
#define FS_CRYPT_LOAD_PASSWORD 2
|
||||
|
||||
#define FS_CRYPT_LOAD_PASSWORD_NO_UI 3 // Load password only if master password has already been entered!
|
||||
|
||||
#define FS_CRYPT_COPY_PASSWORD 4 // Copy encrypted password to new connection name
|
||||
|
||||
#define FS_CRYPT_MOVE_PASSWORD 5 // Move password when renaming a connection
|
||||
|
||||
#define FS_CRYPT_DELETE_PASSWORD 6 // Delete password
|
||||
|
||||
#define FS_CRYPTOPT_MASTERPASS_SET 1 // The user already has a master password defined
|
||||
|
||||
// flags for FsFindFirst/FsFindNext
|
||||
|
||||
#define FILE_ATTRIBUTE_DIRECTORY 16
|
||||
|
||||
#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
|
||||
|
||||
#define FILE_ATTRIBUTE_UNIX_MODE 0x80000000
|
||||
|
||||
typedef struct {
|
||||
|
||||
DWORD SizeLow,SizeHigh;
|
||||
|
||||
FILETIME LastWriteTime;
|
||||
|
||||
int Attr;
|
||||
|
||||
} RemoteInfoStruct;
|
||||
|
||||
typedef struct {
|
||||
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} FsDefaultParamStruct;
|
||||
|
||||
// callback functions
|
||||
typedef int (DCPCALL *tProgressProc)(int PluginNr,char* SourceName,
|
||||
char* TargetName,int PercentDone);
|
||||
typedef int (DCPCALL *tProgressProcW)(int PluginNr,WCHAR* SourceName,
|
||||
WCHAR* TargetName,int PercentDone);
|
||||
typedef void (DCPCALL *tLogProc)(int PluginNr,int MsgType,char* LogString);
|
||||
typedef void (DCPCALL *tLogProcW)(int PluginNr,int MsgType,WCHAR* LogString);
|
||||
|
||||
typedef BOOL (DCPCALL *tRequestProc)(int PluginNr,int RequestType,char* CustomTitle,
|
||||
char* CustomText,char* ReturnedText,int maxlen);
|
||||
typedef BOOL (DCPCALL *tRequestProcW)(int PluginNr,int RequestType,WCHAR* CustomTitle,
|
||||
WCHAR* CustomText,WCHAR* ReturnedText,int maxlen);
|
||||
typedef int (DCPCALL *tCryptProc)(int PluginNr,int CryptoNr,int Mode,
|
||||
char* ConnectionName,char* Password,int maxlen);
|
||||
typedef int (DCPCALL *tCryptProcW)(int PluginNr,int CryptoNr,int Mode,
|
||||
WCHAR* ConnectionName,WCHAR* Password,int maxlen);
|
||||
|
||||
// Function prototypes
|
||||
int DCPCALL FsInit(int PluginNr,tProgressProc pProgressProc,
|
||||
tLogProc pLogProc,tRequestProc pRequestProc);
|
||||
int DCPCALL FsInitW(int PluginNr,tProgressProcW pProgressProcW,
|
||||
tLogProcW pLogProcW,tRequestProcW pRequestProcW);
|
||||
void DCPCALL FsSetCryptCallback(tCryptProc pCryptProc,int CryptoNr,int Flags);
|
||||
void DCPCALL FsSetCryptCallbackW(tCryptProcW pCryptProcW,int CryptoNr,int Flags);
|
||||
HANDLE DCPCALL FsFindFirst(char* Path,WIN32_FIND_DATAA *FindData);
|
||||
HANDLE DCPCALL FsFindFirstW(WCHAR* Path,WIN32_FIND_DATAW *FindData);
|
||||
|
||||
BOOL DCPCALL FsFindNext(HANDLE Hdl,WIN32_FIND_DATAA *FindData);
|
||||
BOOL DCPCALL FsFindNextW(HANDLE Hdl,WIN32_FIND_DATAW *FindData);
|
||||
int DCPCALL FsFindClose(HANDLE Hdl);
|
||||
BOOL DCPCALL FsMkDir(char* Path);
|
||||
BOOL DCPCALL FsMkDirW(WCHAR* Path);
|
||||
int DCPCALL FsExecuteFile(HWND MainWin,char* RemoteName,char* Verb);
|
||||
int DCPCALL FsExecuteFileW(HWND MainWin,WCHAR* RemoteName,WCHAR* Verb);
|
||||
int DCPCALL FsRenMovFile(char* OldName,char* NewName,BOOL Move,
|
||||
BOOL OverWrite,RemoteInfoStruct* ri);
|
||||
int DCPCALL FsRenMovFileW(WCHAR* OldName,WCHAR* NewName,BOOL Move,
|
||||
BOOL OverWrite,RemoteInfoStruct* ri);
|
||||
int DCPCALL FsGetFile(char* RemoteName,char* LocalName,int CopyFlags,
|
||||
RemoteInfoStruct* ri);
|
||||
|
||||
int DCPCALL FsGetFileW(WCHAR* RemoteName,WCHAR* LocalName,int CopyFlags,
|
||||
RemoteInfoStruct* ri);
|
||||
int DCPCALL FsPutFile(char* LocalName,char* RemoteName,int CopyFlags);
|
||||
int DCPCALL FsPutFileW(WCHAR* LocalName,WCHAR* RemoteName,int CopyFlags);
|
||||
BOOL DCPCALL FsDeleteFile(char* RemoteName);
|
||||
BOOL DCPCALL FsDeleteFileW(WCHAR* RemoteName);
|
||||
BOOL DCPCALL FsRemoveDir(char* RemoteName);
|
||||
BOOL DCPCALL FsRemoveDirW(WCHAR* RemoteName);
|
||||
BOOL DCPCALL FsDisconnect(char* DisconnectRoot);
|
||||
BOOL DCPCALL FsDisconnectW(WCHAR* DisconnectRoot);
|
||||
BOOL DCPCALL FsSetAttr(char* RemoteName,int NewAttr);
|
||||
BOOL DCPCALL FsSetAttrW(WCHAR* RemoteName,int NewAttr);
|
||||
BOOL DCPCALL FsSetTime(char* RemoteName,FILETIME *CreationTime,
|
||||
|
||||
FILETIME *LastAccessTime,FILETIME *LastWriteTime);
|
||||
BOOL DCPCALL FsSetTimeW(WCHAR* RemoteName,FILETIME *CreationTime,
|
||||
FILETIME *LastAccessTime,FILETIME *LastWriteTime);
|
||||
void DCPCALL FsStatusInfo(char* RemoteDir,int InfoStartEnd,int InfoOperation);
|
||||
void DCPCALL FsStatusInfoW(WCHAR* RemoteDir,int InfoStartEnd,int InfoOperation);
|
||||
void DCPCALL FsGetDefRootName(char* DefRootName,int maxlen);
|
||||
int DCPCALL FsExtractCustomIcon(char* RemoteName,int ExtractFlags,HICON* TheIcon);
|
||||
int DCPCALL FsExtractCustomIconW(WCHAR* RemoteName,int ExtractFlags,HICON* TheIcon);
|
||||
void DCPCALL FsSetDefaultParams(FsDefaultParamStruct* dps);
|
||||
|
||||
int DCPCALL FsGetPreviewBitmap(char* RemoteName,int width,int height,HBITMAP* ReturnedBitmap);
|
||||
int DCPCALL FsGetPreviewBitmapW(WCHAR* RemoteName,int width,int height,HBITMAP* ReturnedBitmap);
|
||||
BOOL DCPCALL FsLinksToLocalFiles(void);
|
||||
BOOL DCPCALL FsGetLocalName(char* RemoteName,int maxlen);
|
||||
BOOL DCPCALL FsGetLocalNameW(WCHAR* RemoteName,int maxlen);
|
||||
|
||||
// ************************** content plugin extension ****************************
|
||||
|
||||
//
|
||||
#define ft_nomorefields 0
|
||||
|
||||
#define ft_numeric_32 1
|
||||
#define ft_numeric_64 2
|
||||
#define ft_numeric_floating 3
|
||||
#define ft_date 4
|
||||
#define ft_time 5
|
||||
#define ft_boolean 6
|
||||
#define ft_multiplechoice 7
|
||||
#define ft_string 8
|
||||
#define ft_fulltext 9
|
||||
#define ft_datetime 10
|
||||
#define ft_stringw 11 // Should only be returned by Unicode function
|
||||
|
||||
// for FsContentGetValue
|
||||
#define ft_nosuchfield -1 // error, invalid field number given
|
||||
#define ft_fileerror -2 // file i/o error
|
||||
#define ft_fieldempty -3 // field valid, but empty
|
||||
|
||||
#define ft_ondemand -4 // field will be retrieved only when user presses <SPACEBAR>
|
||||
#define ft_delayed 0 // field takes a long time to extract -> try again in background
|
||||
|
||||
// for FsContentSetValue
|
||||
#define ft_setsuccess 0 // setting of the attribute succeeded
|
||||
|
||||
// for FsContentGetSupportedFieldFlags
|
||||
#define contflags_edit 1
|
||||
#define contflags_substsize 2
|
||||
#define contflags_substdatetime 4
|
||||
#define contflags_substdate 6
|
||||
#define contflags_substtime 8
|
||||
#define contflags_substattributes 10
|
||||
|
||||
#define contflags_substattributestr 12
|
||||
#define contflags_substmask 14
|
||||
|
||||
// for FsContentSetValue
|
||||
#define setflags_first_attribute 1 // First attribute of this file
|
||||
#define setflags_last_attribute 2 // Last attribute of this file
|
||||
#define setflags_only_date 4 // Only set the date of the datetime value!
|
||||
|
||||
|
||||
#define CONTENT_DELAYIFSLOW 1 // ContentGetValue called in foreground
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} ContentDefaultParamStruct;
|
||||
|
||||
typedef struct {
|
||||
WORD wYear;
|
||||
WORD wMonth;
|
||||
WORD wDay;
|
||||
} tdateformat,*pdateformat;
|
||||
|
||||
typedef struct {
|
||||
WORD wHour;
|
||||
WORD wMinute;
|
||||
WORD wSecond;
|
||||
} ttimeformat,*ptimeformat;
|
||||
|
||||
int DCPCALL FsContentGetSupportedField(int FieldIndex,char* FieldName,char* Units,int maxlen);
|
||||
int DCPCALL FsContentGetValue(char* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
|
||||
int DCPCALL FsContentGetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
|
||||
|
||||
void DCPCALL FsContentStopGetValue(char* FileName);
|
||||
void DCPCALL FsContentStopGetValueW(WCHAR* FileName);
|
||||
int DCPCALL FsContentGetDefaultSortOrder(int FieldIndex);
|
||||
void DCPCALL FsContentPluginUnloading(void);
|
||||
int DCPCALL FsContentGetSupportedFieldFlags(int FieldIndex);
|
||||
int DCPCALL FsContentSetValue(char* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
|
||||
int DCPCALL FsContentSetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
|
||||
|
||||
BOOL DCPCALL FsContentGetDefaultView(char* ViewContents,char* ViewHeaders,char* ViewWidths,char* ViewOptions,int maxlen);
|
||||
BOOL DCPCALL FsContentGetDefaultViewW(WCHAR* ViewContents,WCHAR* ViewHeaders,WCHAR* ViewWidths,WCHAR* ViewOptions,int maxlen);
|
||||
1128
sdk/wfxplugin.pas
1128
sdk/wfxplugin.pas
File diff suppressed because it is too large
Load diff
124
sdk/wlxplugin.h
124
sdk/wlxplugin.h
|
|
@ -1,63 +1,63 @@
|
|||
#include "common.h"
|
||||
|
||||
/* Contents of file listplug.h */
|
||||
|
||||
#define lc_copy 1
|
||||
#define lc_newparams 2
|
||||
#define lc_selectall 3
|
||||
#define lc_setpercent 4
|
||||
|
||||
#define lcp_wraptext 1
|
||||
#define lcp_fittowindow 2
|
||||
#define lcp_ansi 4
|
||||
#define lcp_ascii 8
|
||||
#define lcp_variable 12
|
||||
#define lcp_forceshow 16
|
||||
#define lcp_fitlargeronly 32
|
||||
#define lcp_center 64
|
||||
|
||||
#define lcs_findfirst 1
|
||||
#define lcs_matchcase 2
|
||||
#define lcs_wholewords 4
|
||||
#define lcs_backwards 8
|
||||
|
||||
#define itm_percent 0xFFFE
|
||||
#define itm_fontstyle 0xFFFD
|
||||
#define itm_wrap 0xFFFC
|
||||
#define itm_fit 0xFFFB
|
||||
#define itm_next 0xFFFA
|
||||
#define itm_center 0xFFF9
|
||||
|
||||
#define LISTPLUGIN_OK 0
|
||||
|
||||
#define LISTPLUGIN_ERROR 1
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} ListDefaultParamStruct;
|
||||
|
||||
HWND DCPCALL ListLoad(HWND ParentWin,char* FileToLoad,int ShowFlags);
|
||||
HWND DCPCALL ListLoadW(HWND ParentWin,WCHAR* FileToLoad,int ShowFlags);
|
||||
int DCPCALL ListLoadNext(HWND ParentWin,HWND PluginWin,char* FileToLoad,int ShowFlags);
|
||||
int DCPCALL ListLoadNextW(HWND ParentWin,HWND PluginWin,WCHAR* FileToLoad,int ShowFlags);
|
||||
void DCPCALL ListCloseWindow(HWND ListWin);
|
||||
void DCPCALL ListGetDetectString(char* DetectString,int maxlen);
|
||||
int DCPCALL ListSearchText(HWND ListWin,char* SearchString,int SearchParameter);
|
||||
int DCPCALL ListSearchTextW(HWND ListWin,WCHAR* SearchString,int SearchParameter);
|
||||
|
||||
int DCPCALL ListSearchDialog(HWND ListWin,int FindNext);
|
||||
int DCPCALL ListSendCommand(HWND ListWin,int Command,int Parameter);
|
||||
int DCPCALL ListPrint(HWND ListWin,char* FileToPrint,char* DefPrinter,
|
||||
int PrintFlags,RECT* Margins);
|
||||
int DCPCALL ListPrintW(HWND ListWin,WCHAR* FileToPrint,WCHAR* DefPrinter,
|
||||
int PrintFlags,RECT* Margins);
|
||||
int DCPCALL ListNotificationReceived(HWND ListWin,int Message,WPARAM wParam,LPARAM lParam);
|
||||
void DCPCALL ListSetDefaultParams(ListDefaultParamStruct* dps);
|
||||
HBITMAP DCPCALL ListGetPreviewBitmap(char* FileToLoad,int width,int height,
|
||||
|
||||
char* contentbuf,int contentbuflen);
|
||||
HBITMAP DCPCALL ListGetPreviewBitmapW(WCHAR* FileToLoad,int width,int height,
|
||||
#include "common.h"
|
||||
|
||||
/* Contents of file listplug.h */
|
||||
|
||||
#define lc_copy 1
|
||||
#define lc_newparams 2
|
||||
#define lc_selectall 3
|
||||
#define lc_setpercent 4
|
||||
|
||||
#define lcp_wraptext 1
|
||||
#define lcp_fittowindow 2
|
||||
#define lcp_ansi 4
|
||||
#define lcp_ascii 8
|
||||
#define lcp_variable 12
|
||||
#define lcp_forceshow 16
|
||||
#define lcp_fitlargeronly 32
|
||||
#define lcp_center 64
|
||||
|
||||
#define lcs_findfirst 1
|
||||
#define lcs_matchcase 2
|
||||
#define lcs_wholewords 4
|
||||
#define lcs_backwards 8
|
||||
|
||||
#define itm_percent 0xFFFE
|
||||
#define itm_fontstyle 0xFFFD
|
||||
#define itm_wrap 0xFFFC
|
||||
#define itm_fit 0xFFFB
|
||||
#define itm_next 0xFFFA
|
||||
#define itm_center 0xFFF9
|
||||
|
||||
#define LISTPLUGIN_OK 0
|
||||
|
||||
#define LISTPLUGIN_ERROR 1
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
DWORD PluginInterfaceVersionLow;
|
||||
DWORD PluginInterfaceVersionHi;
|
||||
char DefaultIniName[MAX_PATH];
|
||||
} ListDefaultParamStruct;
|
||||
|
||||
HWND DCPCALL ListLoad(HWND ParentWin,char* FileToLoad,int ShowFlags);
|
||||
HWND DCPCALL ListLoadW(HWND ParentWin,WCHAR* FileToLoad,int ShowFlags);
|
||||
int DCPCALL ListLoadNext(HWND ParentWin,HWND PluginWin,char* FileToLoad,int ShowFlags);
|
||||
int DCPCALL ListLoadNextW(HWND ParentWin,HWND PluginWin,WCHAR* FileToLoad,int ShowFlags);
|
||||
void DCPCALL ListCloseWindow(HWND ListWin);
|
||||
void DCPCALL ListGetDetectString(char* DetectString,int maxlen);
|
||||
int DCPCALL ListSearchText(HWND ListWin,char* SearchString,int SearchParameter);
|
||||
int DCPCALL ListSearchTextW(HWND ListWin,WCHAR* SearchString,int SearchParameter);
|
||||
|
||||
int DCPCALL ListSearchDialog(HWND ListWin,int FindNext);
|
||||
int DCPCALL ListSendCommand(HWND ListWin,int Command,int Parameter);
|
||||
int DCPCALL ListPrint(HWND ListWin,char* FileToPrint,char* DefPrinter,
|
||||
int PrintFlags,RECT* Margins);
|
||||
int DCPCALL ListPrintW(HWND ListWin,WCHAR* FileToPrint,WCHAR* DefPrinter,
|
||||
int PrintFlags,RECT* Margins);
|
||||
int DCPCALL ListNotificationReceived(HWND ListWin,int Message,WPARAM wParam,LPARAM lParam);
|
||||
void DCPCALL ListSetDefaultParams(ListDefaultParamStruct* dps);
|
||||
HBITMAP DCPCALL ListGetPreviewBitmap(char* FileToLoad,int width,int height,
|
||||
|
||||
char* contentbuf,int contentbuflen);
|
||||
HBITMAP DCPCALL ListGetPreviewBitmapW(WCHAR* FileToLoad,int width,int height,
|
||||
char* contentbuf,int contentbuflen);
|
||||
|
|
@ -1,99 +1,99 @@
|
|||
// Lister API definitions.
|
||||
// This unit is written by Christian Ghisler, it's from Total Commander
|
||||
// Lister API Guide, which can be found at http://ghisler.com.
|
||||
// Version: 2.0.
|
||||
|
||||
unit WlxPlugin;
|
||||
|
||||
interface
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
uses
|
||||
Windows;
|
||||
{$ENDIF}
|
||||
|
||||
const
|
||||
lc_copy=1;
|
||||
lc_newparams=2;
|
||||
lc_selectall=3;
|
||||
lc_setpercent=4;
|
||||
lcp_wraptext=1;
|
||||
lcp_fittowindow=2;
|
||||
lcp_ansi=4;
|
||||
lcp_ascii=8;
|
||||
lcp_variable=12;
|
||||
lcp_forceshow=16;
|
||||
lcp_fitlargeronly=32;
|
||||
lcp_center=64;
|
||||
lcs_findfirst=1;
|
||||
lcs_matchcase=2;
|
||||
lcs_wholewords=4;
|
||||
lcs_backwards=8;
|
||||
itm_percent=$FFFE;
|
||||
itm_fontstyle=$FFFD;
|
||||
itm_wrap=$FFFC;
|
||||
itm_fit=$FFFB;
|
||||
itm_next=$FFFA;
|
||||
itm_center=$FFF9;
|
||||
LISTPLUGIN_OK=0;
|
||||
LISTPLUGIN_ERROR=1;
|
||||
|
||||
const
|
||||
MAX_PATH=32000;
|
||||
|
||||
type
|
||||
{ Unsigned integer with pointer size }
|
||||
THandle = {$IFDEF CPU64}QWord{$ELSE}LongWord{$ENDIF};
|
||||
|
||||
const
|
||||
wlxInvalidHandle: THandle = THandle(-1);
|
||||
|
||||
type
|
||||
tListDefaultParamStruct=record
|
||||
size,
|
||||
PluginInterfaceVersionLow,
|
||||
PluginInterfaceVersionHi:longint;
|
||||
DefaultIniName:array[0..MAX_PATH-1] of char;
|
||||
end;
|
||||
|
||||
pListDefaultParamStruct=^tListDefaultParamStruct;
|
||||
|
||||
type tdateformat=record
|
||||
wYear,wMonth,wDay:word;
|
||||
end;
|
||||
pdateformat=^tdateformat;
|
||||
|
||||
type ttimeformat=record
|
||||
wHour,wMinute,wSecond:word;
|
||||
end;
|
||||
ptimeformat=^ttimeformat;
|
||||
|
||||
type HBITMAP = type THandle;
|
||||
|
||||
|
||||
{ Function prototypes: Functions need to be defined exactly like this!}
|
||||
|
||||
(*
|
||||
|
||||
function ListLoad(ParentWin:thandle;FileToLoad:pchar;ShowFlags:integer):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListLoadW(ParentWin:thandle;FileToLoad:pwidechar;ShowFlags:integer):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListLoadNext(ParentWin,PluginWin:thandle;FileToLoad:pchar;ShowFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListLoadNextW(ParentWin,PluginWin:thandle;FileToLoad:pwidechar;ShowFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ListCloseWindow(ListWin:thandle); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ListGetDetectString(DetectString:pchar;maxlen:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListSearchText(ListWin:thandle;SearchString:pchar; SearchParameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListSearchTextW(ListWin:thandle;SearchString:pwidechar; SearchParameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListSearchDialog(ListWin:thandle;FindNext:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListSendCommand(ListWin:thandle;Command,Parameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListPrint(ListWin:thandle;FileToPrint,DefPrinter:pchar; PrintFlags:integer;var Margins:trect):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListPrintW(ListWin:thandle;FileToPrint,DefPrinter:pwidechar; PrintFlags:integer;var Margins:trect):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListNotificationReceived(ListWin:thandle;Message,wParam,lParam:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ListSetDefaultParams(dps:pListDefaultParamStruct); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListGetPreviewBitmap(FileToLoad:pchar;width,height:integer; contentbuf:pchar;contentbuflen:integer):hbitmap; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListGetPreviewBitmapW(FileToLoad:pwidechar;width,height:integer; contentbuf:pchar;contentbuflen:integer):hbitmap; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
*)
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
// Lister API definitions.
|
||||
// This unit is written by Christian Ghisler, it's from Total Commander
|
||||
// Lister API Guide, which can be found at http://ghisler.com.
|
||||
// Version: 2.0.
|
||||
|
||||
unit WlxPlugin;
|
||||
|
||||
interface
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
uses
|
||||
Windows;
|
||||
{$ENDIF}
|
||||
|
||||
const
|
||||
lc_copy=1;
|
||||
lc_newparams=2;
|
||||
lc_selectall=3;
|
||||
lc_setpercent=4;
|
||||
lcp_wraptext=1;
|
||||
lcp_fittowindow=2;
|
||||
lcp_ansi=4;
|
||||
lcp_ascii=8;
|
||||
lcp_variable=12;
|
||||
lcp_forceshow=16;
|
||||
lcp_fitlargeronly=32;
|
||||
lcp_center=64;
|
||||
lcs_findfirst=1;
|
||||
lcs_matchcase=2;
|
||||
lcs_wholewords=4;
|
||||
lcs_backwards=8;
|
||||
itm_percent=$FFFE;
|
||||
itm_fontstyle=$FFFD;
|
||||
itm_wrap=$FFFC;
|
||||
itm_fit=$FFFB;
|
||||
itm_next=$FFFA;
|
||||
itm_center=$FFF9;
|
||||
LISTPLUGIN_OK=0;
|
||||
LISTPLUGIN_ERROR=1;
|
||||
|
||||
const
|
||||
MAX_PATH=32000;
|
||||
|
||||
type
|
||||
{ Unsigned integer with pointer size }
|
||||
THandle = {$IFDEF CPU64}QWord{$ELSE}LongWord{$ENDIF};
|
||||
|
||||
const
|
||||
wlxInvalidHandle: THandle = THandle(-1);
|
||||
|
||||
type
|
||||
tListDefaultParamStruct=record
|
||||
size,
|
||||
PluginInterfaceVersionLow,
|
||||
PluginInterfaceVersionHi:longint;
|
||||
DefaultIniName:array[0..MAX_PATH-1] of char;
|
||||
end;
|
||||
|
||||
pListDefaultParamStruct=^tListDefaultParamStruct;
|
||||
|
||||
type tdateformat=record
|
||||
wYear,wMonth,wDay:word;
|
||||
end;
|
||||
pdateformat=^tdateformat;
|
||||
|
||||
type ttimeformat=record
|
||||
wHour,wMinute,wSecond:word;
|
||||
end;
|
||||
ptimeformat=^ttimeformat;
|
||||
|
||||
type HBITMAP = type THandle;
|
||||
|
||||
|
||||
{ Function prototypes: Functions need to be defined exactly like this!}
|
||||
|
||||
(*
|
||||
|
||||
function ListLoad(ParentWin:thandle;FileToLoad:pchar;ShowFlags:integer):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListLoadW(ParentWin:thandle;FileToLoad:pwidechar;ShowFlags:integer):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListLoadNext(ParentWin,PluginWin:thandle;FileToLoad:pchar;ShowFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListLoadNextW(ParentWin,PluginWin:thandle;FileToLoad:pwidechar;ShowFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ListCloseWindow(ListWin:thandle); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ListGetDetectString(DetectString:pchar;maxlen:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListSearchText(ListWin:thandle;SearchString:pchar; SearchParameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListSearchTextW(ListWin:thandle;SearchString:pwidechar; SearchParameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListSearchDialog(ListWin:thandle;FindNext:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListSendCommand(ListWin:thandle;Command,Parameter:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListPrint(ListWin:thandle;FileToPrint,DefPrinter:pchar; PrintFlags:integer;var Margins:trect):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListPrintW(ListWin:thandle;FileToPrint,DefPrinter:pwidechar; PrintFlags:integer;var Margins:trect):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListNotificationReceived(ListWin:thandle;Message,wParam,lParam:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
procedure ListSetDefaultParams(dps:pListDefaultParamStruct); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListGetPreviewBitmap(FileToLoad:pchar;width,height:integer; contentbuf:pchar;contentbuflen:integer):hbitmap; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function ListGetPreviewBitmapW(FileToLoad:pwidechar;width,height:integer; contentbuf:pchar;contentbuflen:integer):hbitmap; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
*)
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue