summaryrefslogtreecommitdiff
path: root/src/corelib/gdi
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-22 17:26:10 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-28 10:57:21 +0200
commit2c92fb8a8b26c42b5ce215c4c7ecab5f022da304 (patch)
tree9f8e05efc288fa8ae2bdf17bf6bbc8dbcf53063a /src/corelib/gdi
parent463bc1af0193395a5ce73fbe79f008f46e987194 (diff)
downloadfpGUI-2c92fb8a8b26c42b5ce215c4c7ecab5f022da304.tar.xz
Implemented a bare minimum MimeType to Win Clipboard lookup function.
Diffstat (limited to 'src/corelib/gdi')
-rw-r--r--src/corelib/gdi/fpg_oledragdrop.pas11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/gdi/fpg_oledragdrop.pas b/src/corelib/gdi/fpg_oledragdrop.pas
index 0002c695..56415fad 100644
--- a/src/corelib/gdi/fpg_oledragdrop.pas
+++ b/src/corelib/gdi/fpg_oledragdrop.pas
@@ -187,7 +187,9 @@ type
property OnDropFiles: TDropFilesEvent read FOnDropFiles write FOnDropFiles;
end;
+
function WindowsMimeLookup(const CFFormat: string): string;
+function WindowsClipboardLoopup(const AMime: string): DWORD;
function EnumDataToStringList(DataObj: IDataObject): TStringList;
function GetFormatEtc(const CFFormat: DWORD): FORMATETC;
@@ -219,6 +221,15 @@ begin
Result := CFFormat;
end;
+function WindowsClipboardLoopup(const AMime: string): DWORD;
+begin
+ { TODO: We need to implement this correctly }
+ if AMime = 'text/plain' then
+ Result := CF_TEXT
+ else
+ Result := CF_TEXT; // fallback result
+end;
+
function WindowsClipboardFormatToString(const CFFormat: integer): string;
begin
{ replace know clipboard formats with mime types }