-
-
Notifications
You must be signed in to change notification settings - Fork 122
/
DW.NativeImage.Win.pas
60 lines (48 loc) · 1.95 KB
/
DW.NativeImage.Win.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
unit DW.NativeImage.Win;
{*******************************************************}
{ }
{ Kastri }
{ }
{ Delphi Worlds Cross-Platform Library }
{ }
{ Copyright 2020-2024 Dave Nottage under MIT license }
{ which is located in the root folder of this library }
{ }
{*******************************************************}
interface
implementation
uses
// RTL
System.Classes,
// FMX
FMX.Presentation.Messages, FMX.Presentation.Factory, FMX.Controls, FMX.Controls.Presentation, FMX.Presentation.Win,
FMX.Presentation.Win.Style, FMX.Controls.Model,
// DW
DW.NativeImage;
type
TWinNativeImage = class(TWinStyledPresentation)
private
// [Weak] FModel: TCustomNativeImageModel;
procedure MMLoadFromFile(var AMessage: TDispatchMessageWithValue<string>); message MM_NATIVEIMAGE_LOADFROMFILE;
procedure MMLoadFromStream(var AMessage: TDispatchMessageWithValue<TStream>); message MM_NATIVEIMAGE_LOADFROMSTREAM;
protected
function DefineModelClass: TDataModelClass; override;
end;
{ TWinNativeImage }
function TWinNativeImage.DefineModelClass: TDataModelClass;
begin
Result := TCustomNativeImageModel;
end;
procedure TWinNativeImage.MMLoadFromFile(var AMessage: TDispatchMessageWithValue<string>);
begin
// TODO
end;
procedure TWinNativeImage.MMLoadFromStream(var AMessage: TDispatchMessageWithValue<TStream>);
begin
// TODO
end;
initialization
TPresentationProxyFactory.Current.Register(TNativeImage, TControlType.Platform, TWinPresentationProxy<TWinNativeImage>);
finalization
TPresentationProxyFactory.Current.Unregister(TNativeImage, TControlType.Platform, TWinPresentationProxy<TWinNativeImage>);
end.