mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: DialogAPI - SetProperty/GetProperty functions
This commit is contained in:
parent
1c6a71258c
commit
210959a833
4 changed files with 194 additions and 5 deletions
|
|
@ -60,6 +60,13 @@
|
|||
|
||||
#define DM_USER 0x4000 /* Starting value for user defined messages */
|
||||
|
||||
/* Set/Get Property */
|
||||
#define TK_STRING 1
|
||||
#define TK_FLOAT 2
|
||||
#define TK_INT32 3
|
||||
#define TK_INT64 4
|
||||
#define TK_BOOL 5
|
||||
|
||||
// MessageBox: To indicate the buttons displayed in the message box,
|
||||
// specify one of the following values.
|
||||
#define MB_OK 0x00000000
|
||||
|
|
@ -110,6 +117,8 @@ typedef BOOL (DCPCALL *tDialogBoxLRSProc)(intptr_t LRSData, unsigned long DataSi
|
|||
typedef BOOL (DCPCALL *tDialogBoxLFMFileProc)(char* LFMFileName, tDlgProc DlgProc);
|
||||
typedef uintptr_t (DCPCALL *tDialogBoxParamProc)(void* Data, uint32_t DataSize, tDlgProc DlgProc, uint32_t Flags, void *UserData, void* Reserved);
|
||||
typedef int (DCPCALL *tTranslateStringProc)(void *Translation, const char *Identifier, const char *Original, char *Output, int OutLen);
|
||||
typedef intptr_t (DCPCALL *tSetProperty)(uintptr_t pDlg, const char* DlgItemName, const char *PropName, void *PropValue, int PropType);
|
||||
typedef intptr_t (DCPCALL *tGetProperty)(uintptr_t pDlg, const char* DlgItemName, const char *PropName, void *PropValue, int PropType, int PropSize);
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
|
|
@ -128,7 +137,9 @@ typedef struct {
|
|||
uintptr_t VersionAPI;
|
||||
tMsgChoiceBoxProc MsgChoiceBox;
|
||||
tDialogBoxParamProc DialogBoxParam;
|
||||
unsigned char Reserved[4091 * sizeof(void *)];
|
||||
tSetProperty SetProperty;
|
||||
tGetProperty GetProperty;
|
||||
unsigned char Reserved[4089 * sizeof(void *)];
|
||||
} tExtensionStartupInfo;
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,14 @@ const
|
|||
|
||||
DM_USER = $4000; // Starting value for user defined messages
|
||||
|
||||
const
|
||||
// Set/Get Property
|
||||
TK_STRING = 1;
|
||||
TK_FLOAT = 2;
|
||||
TK_INT32 = 3;
|
||||
TK_INT64 = 4;
|
||||
TK_BOOL = 5;
|
||||
|
||||
const
|
||||
// MessageBox: To indicate the buttons displayed in the message box,
|
||||
// specify one of the following values.
|
||||
|
|
@ -117,6 +125,8 @@ type
|
|||
TDialogBoxLFMFileProc = function(lfmFileName: PAnsiChar; DlgProc: TDlgProc): LongBool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TDialogBoxParamProc = function(Data: Pointer; DataSize: LongWord; DlgProc: TDlgProc; Flags: LongWord; UserData, Reserved: Pointer): UIntPtr; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TTranslateStringProc = function(Translation: Pointer; Identifier, Original: PAnsiChar; Output: PAnsiChar; OutLen: Integer): Integer {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TSetProperty = function(pDlg: UIntPtr; DlgItemName, PropName: PAnsiChar; PropValue: Pointer; PropType: Integer): PtrInt; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
TGetProperty = function(pDlg: UIntPtr; DlgItemName, PropName: PAnsiChar; PropValue: Pointer; PropType, PropSize: Integer): PtrInt; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
type
|
||||
PExtensionStartupInfo = ^TExtensionStartupInfo;
|
||||
|
|
@ -139,8 +149,10 @@ type
|
|||
VersionAPI: UIntPtr;
|
||||
MsgChoiceBox: TMsgChoiceBoxProc;
|
||||
DialogBoxParam: TDialogBoxParamProc;
|
||||
SetProperty: TSetProperty;
|
||||
GetProperty: TGetProperty;
|
||||
// Reserved for future API extension
|
||||
Reserved: packed array [0..Pred(4091 * SizeOf(Pointer))] of Byte;
|
||||
Reserved: packed array [0..Pred(4089 * SizeOf(Pointer))] of Byte;
|
||||
end;
|
||||
|
||||
type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue