BSOne.SFC/EM.Lib/ImageEn_SRC/Source/Delphi10.1Berlin/iexWindowsFunctions.hpp

198 lines
10 KiB
C++

// CodeGear C++Builder
// Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'iexWindowsFunctions.pas' rev: 37.00 (Windows)
#ifndef iexWindowsFunctionsHPP
#define iexWindowsFunctionsHPP
#pragma delphiheader begin
#pragma option push
#if defined(__BORLANDC__) && !defined(__clang__)
#pragma option -w- // All warnings off
#pragma option -Vx // Zero-length empty class member
#endif
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.UITypes.hpp>
#include <iemview.hpp>
#include <Winapi.Windows.hpp>
#include <Vcl.Forms.hpp>
#include <Winapi.ActiveX.hpp>
#include <System.Win.ComObj.hpp>
#include <Vcl.Controls.hpp>
#include <System.Classes.hpp>
#include <hyiedefs.hpp>
#include <Winapi.Messages.hpp>
//-- user supplied -----------------------------------------------------------
namespace Iexwindowsfunctions
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TIEFileDragDrop;
class DELPHICLASS TIEFolderWatch;
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TIEFileDropEvent)(System::TObject* Sender, System::Classes::TStrings* ssFiles, int dwEffect);
class PASCALIMPLEMENTATION TIEFileDragDrop : public System::TInterfacedObject
{
typedef System::TInterfacedObject inherited;
private:
Vcl::Controls::TWinControl* fControl;
HWND fControlHandle;
bool fDroppingActive;
TIEFileDropEvent fOnFileDrop;
Hyiedefs::TIEFileDragDropActions fDropActions;
void __fastcall GetFileNames(const _di_IDataObject dataObj, System::Classes::TStrings* Dest);
_di_IDataObject __fastcall GetDataObject(System::Classes::TStrings* ssFiles);
int __fastcall GetDragEffect(int KeyState);
void __fastcall SetDroppingActive(const bool Value);
HRESULT __stdcall DragEnter(const _di_IDataObject dataObj, int grfKeyState, Winapi::Windows::TPoint pt, int &dwEffect);
HRESULT __stdcall DragOver(System::LongInt grfKeyState, Winapi::Windows::TPoint pt, System::LongInt &dwEffect);
HRESULT __stdcall DragLeave();
HRESULT __stdcall Drop(const _di_IDataObject dataObj, System::LongInt grfKeyState, Winapi::Windows::TPoint pt, System::LongInt &dwEffect);
HRESULT __stdcall QueryContinueDrag(System::LongBool fEscapePressed, System::LongInt grfKeyState);
HRESULT __stdcall GiveFeedback(System::LongInt dwEffect);
public:
__property bool ActivateDropping = {read=fDroppingActive, write=SetDroppingActive, nodefault};
__property Hyiedefs::TIEFileDragDropActions DropActions = {read=fDropActions, write=fDropActions, nodefault};
__fastcall TIEFileDragDrop(Vcl::Controls::TWinControl* Control, TIEFileDropEvent OnFileDrop);
__fastcall virtual ~TIEFileDragDrop();
void __fastcall InitiateDragging(System::Classes::TStrings* ssFilenames, Hyiedefs::TIEFileDragDropActions DragActions);
private:
void *__IDropSource; // IDropSource
void *__IDropTarget; // IDropTarget
public:
#if defined(MANAGED_INTERFACE_OPERATORS)
// {00000121-0000-0000-C000-000000000046}
operator _di_IDropSource()
{
_di_IDropSource intf;
this->GetInterface(intf);
return intf;
}
#else
operator IDropSource*(void) { return (IDropSource*)&__IDropSource; }
#endif
#if defined(MANAGED_INTERFACE_OPERATORS)
// {00000122-0000-0000-C000-000000000046}
operator _di_IDropTarget()
{
_di_IDropTarget intf;
this->GetInterface(intf);
return intf;
}
#else
operator IDropTarget*(void) { return (IDropTarget*)&__IDropTarget; }
#endif
};
enum DECLSPEC_DENUM TWatchOption : unsigned char { woFileName, woFolderName, woAttributes, woSize, woLastWrite, woLastAccess, woCreation, woSecurity };
typedef System::Set<TWatchOption, TWatchOption::woFileName, TWatchOption::woSecurity> TWatchOptions;
enum DECLSPEC_DENUM TWatchAction : unsigned char { waAdded, waRemoved, waModified, waRenamedOld, waRenamedNew };
typedef System::Set<TWatchAction, TWatchAction::waAdded, TWatchAction::waRenamedNew> TWatchActions;
typedef void __fastcall (__closure *TFileChangeNotifyEvent)(System::TObject* const Sender, const TWatchAction Action, const System::UnicodeString FileName);
typedef void __fastcall (__closure *TOnError)(System::TObject* const Sender, const int ErrorCode, const System::UnicodeString ErrorMessage);
class PASCALIMPLEMENTATION TIEFolderWatch : public System::TObject
{
typedef System::TObject inherited;
private:
TWatchOptions FWatchOptions;
TWatchActions FWatchActions;
bool FWatchSubTree;
System::Classes::TThread* FWatchThread;
int FBufferSize;
HWND FWndHandle;
System::UnicodeString FPath;
Winapi::Windows::THandle FAbortEvent;
TOnError FOnError;
System::Classes::TNotifyEvent FOnChange;
TFileChangeNotifyEvent FOnNotify;
void __fastcall WatchWndProc(Winapi::Messages::TMessage &Msg);
void __fastcall SetPath(const System::UnicodeString Value);
void __fastcall SetWatchOptions(const TWatchOptions Value);
void __fastcall SetWatchActions(const TWatchActions Value);
void __fastcall SetWatchSubTree(const bool Value);
void __fastcall DeallocateHWnd(HWND Wnd);
int __fastcall MakeFilter();
protected:
virtual void __fastcall Change();
void __fastcall AllocWatchThread();
void __fastcall ReleaseWatchThread();
void __fastcall RestartWatchThread();
virtual void __fastcall Notify(const int Action, const System::UnicodeString FileName);
public:
__fastcall TIEFolderWatch();
__fastcall virtual ~TIEFolderWatch();
void __fastcall Start();
void __fastcall Stop();
bool __fastcall Running();
__property bool WatchSubTree = {read=FWatchSubTree, write=SetWatchSubTree, nodefault};
__property TWatchOptions WatchOptions = {read=FWatchOptions, write=SetWatchOptions, nodefault};
__property TWatchActions WatchActions = {read=FWatchActions, write=SetWatchActions, nodefault};
__property int BufferSize = {read=FBufferSize, write=FBufferSize, nodefault};
__property System::UnicodeString Path = {read=FPath, write=SetPath};
__property TFileChangeNotifyEvent OnNotify = {read=FOnNotify, write=FOnNotify};
__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
__property TOnError OnError = {read=FOnError, write=FOnError};
};
//-- var, const, procedure ---------------------------------------------------
static _DELPHI_CONST System::Word cShutdownTimeout = System::Word(0xbb8);
static _DELPHI_CONST System::Int8 cFileWaitTimeout = System::Int8(0x0);
extern DELPHI_PACKAGE void __fastcall WindowsLaunchFile(Winapi::Windows::THandle Handle, const System::UnicodeString sFilename);
extern DELPHI_PACKAGE System::UnicodeString __fastcall WindowsProgramFilesFolder(void);
extern DELPHI_PACKAGE System::UnicodeString __fastcall WindowsTempFolder(void);
extern DELPHI_PACKAGE System::UnicodeString __fastcall GetWindowsSpecialFolder(const int iCSIDL);
extern DELPHI_PACKAGE void __fastcall WindowsAddToRecentDocs(const System::UnicodeString Filename);
extern DELPHI_PACKAGE bool __fastcall WindowsCopy(HWND Handle, System::UnicodeString sFromFilename, System::UnicodeString sDestFolder, bool bRenameOnCollision, bool bShowConfirmation, bool bShowProgress, bool bVerboseErrors = true)/* overload */;
extern DELPHI_PACKAGE bool __fastcall WindowsCopy(HWND Handle, System::Classes::TStrings* ssFiles, const System::UnicodeString sDestFolder, bool bRenameOnCollision, bool bShowConfirmation, bool bShowProgress, bool bVerboseErrors = true)/* overload */;
extern DELPHI_PACKAGE bool __fastcall WindowsMove(HWND Handle, System::UnicodeString sFromFilename, System::UnicodeString sDestFolder, bool bRenameOnCollision, bool bShowConfirmation, bool bShowProgress, bool bVerboseErrors = true)/* overload */;
extern DELPHI_PACKAGE bool __fastcall WindowsMove(HWND Handle, System::Classes::TStrings* ssFiles, const System::UnicodeString sDestFolder, bool bRenameOnCollision, bool bShowConfirmation, bool bShowProgress, bool bVerboseErrors = true)/* overload */;
extern DELPHI_PACKAGE bool __fastcall WindowsErase(HWND Handle, System::UnicodeString sFilename, bool bSendToRecycleBin, bool bShowConfirmation, bool bShowProgress, bool bVerboseErrors = true)/* overload */;
extern DELPHI_PACKAGE bool __fastcall WindowsErase(HWND Handle, System::Classes::TStrings* ssFiles, bool bSendToRecycleBin, bool bShowConfirmation, bool bShowProgress, bool bVerboseErrors = true)/* overload */;
extern DELPHI_PACKAGE bool __fastcall WindowsRename(HWND Handle, const System::UnicodeString sFilename, const System::UnicodeString sNewName, bool bRenameOnCollision, bool bShowConfirmation, bool bVerboseErrors = true, bool bCheckForOverwrite = true)/* overload */;
extern DELPHI_PACKAGE System::UnicodeString __fastcall WindowsLocalAppDataFolder(void);
extern DELPHI_PACKAGE System::UnicodeString __fastcall WindowsMyDocumentsFolder(void);
extern DELPHI_PACKAGE System::UnicodeString __fastcall WindowsMyPicturesFolder(void);
extern DELPHI_PACKAGE System::UnicodeString __fastcall WindowsMyMusicFolder(void);
extern DELPHI_PACKAGE System::UnicodeString __fastcall WindowsMyVideosFolder(void);
extern DELPHI_PACKAGE System::UnicodeString __fastcall WindowsDesktopFolder(void);
extern DELPHI_PACKAGE bool __fastcall WindowsSelectDirectory(const System::UnicodeString Caption, System::UnicodeString &Directory, Vcl::Controls::TWinControl* Parent = (Vcl::Controls::TWinControl*)(0x0), bool bAllowNewFolder = true);
extern DELPHI_PACKAGE bool __fastcall CutFilesToClipboard(HWND Handle, System::Classes::TStrings* Filenames);
extern DELPHI_PACKAGE bool __fastcall CopyFilesToClipboard(HWND Handle, System::Classes::TStrings* Filenames);
extern DELPHI_PACKAGE bool __fastcall PasteFilesFromClipboard(HWND Handle, System::Classes::TStrings* ssFilenames, /* out */ bool &bMoveFiles);
extern DELPHI_PACKAGE bool __fastcall CanPasteFilesFromClipboard(HWND Handle);
extern DELPHI_PACKAGE void __fastcall PopupSystemMenu(HWND Handle, System::Classes::TStrings* ssFileList, int x, int y);
extern DELPHI_PACKAGE void __fastcall ShowWindowsPrintWizard(Iemview::TImageEnMView* ImageEnMView, bool bAllImages)/* overload */;
extern DELPHI_PACKAGE void __fastcall ShowWindowsPrintWizard(System::Classes::TStrings* ssFiles)/* overload */;
extern DELPHI_PACKAGE void __fastcall WaitForFileReady(const System::UnicodeString FileName, const unsigned Timeout = (unsigned)(0x0));
} /* namespace Iexwindowsfunctions */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_IEXWINDOWSFUNCTIONS)
using namespace Iexwindowsfunctions;
#endif
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // iexWindowsFunctionsHPP