-
Notifications
You must be signed in to change notification settings - Fork 4
/
Pen.inc
137 lines (113 loc) · 3.61 KB
/
Pen.inc
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
//----------------------------------------
// ´úÂëÓÉGenlibVcl¹¤¾ß×Ô¶¯Éú³É¡£
// Copyright ? ying32. All Rights Reserved.
//
//----------------------------------------
function Pen_Create: TPen; cdecl;
begin
Result := TPen.Create;
end;
procedure Pen_Free(AObj: TPen); cdecl;
begin
AObj.Free;
end;
procedure Pen_Assign(AObj: TPen; Source: TPersistent); cdecl;
begin
AObj.Assign(Source);
end;
//function Pen_HandleAllocated(AObj: TPen): LongBool; cdecl;
//begin
// Result := AObj.HandleAllocated;
//end;
function Pen_GetNamePath(AObj: TPen): PWideChar; cdecl;
begin
Result := PWideChar(AObj.GetNamePath);
end;
function Pen_ClassName(AObj: TPen): PWideChar; cdecl;
begin
Result := ShortstrToPWideChar(AObj.ClassName);
end;
function Pen_Equals(AObj: TPen; Obj: TObject): LongBool; cdecl;
begin
Result := AObj.Equals(Obj);
end;
function Pen_GetHashCode(AObj: TPen): Integer; cdecl;
begin
Result := AObj.GetHashCode;
end;
function Pen_ToString(AObj: TPen): PWideChar; cdecl;
begin
Result := PWideChar(AObj.ToString);
end;
function Pen_GetHandle(AObj: TPen): HPEN; cdecl;
begin
Result := AObj.Handle;
end;
procedure Pen_SetHandle(AObj: TPen; AValue: HPEN); cdecl;
begin
AObj.Handle := AValue;
end;
function Pen_GetColor(AObj: TPen): TColor; cdecl;
begin
Result := AObj.Color;
end;
procedure Pen_SetColor(AObj: TPen; AValue: TColor); cdecl;
begin
AObj.Color := AValue;
end;
function Pen_GetMode(AObj: TPen): TPenMode; cdecl;
begin
Result := AObj.Mode;
end;
procedure Pen_SetMode(AObj: TPen; AValue: TPenMode); cdecl;
begin
AObj.Mode := AValue;
end;
function Pen_GetStyle(AObj: TPen): TPenStyle; cdecl;
begin
Result := AObj.Style;
end;
procedure Pen_SetStyle(AObj: TPen; AValue: TPenStyle); cdecl;
begin
AObj.Style := AValue;
end;
function Pen_GetWidth(AObj: TPen): Integer; cdecl;
begin
Result := AObj.Width;
end;
procedure Pen_SetWidth(AObj: TPen; AValue: Integer); cdecl;
begin
AObj.Width := AValue;
end;
procedure Pen_SetOnChange(AObj: TPen; AEventId: NativeUInt); stdcall;
begin
if AEventId = 0 then
begin
AObj.OnChange := nil;
TEventClass.Remove(AObj, geChange);
Exit;
end;
AObj.OnChange := TEventClass.OnChange;
TEventClass.Add(AObj, geChange, AEventId);
end;
exports
Pen_Create {$IFNDEF MSWINDOWS}name '_Pen_Create'{$ENDIF},
Pen_Free {$IFNDEF MSWINDOWS}name '_Pen_Free'{$ENDIF},
Pen_Assign {$IFNDEF MSWINDOWS}name '_Pen_Assign'{$ENDIF},
//Pen_HandleAllocated {$IFNDEF MSWINDOWS}name '_Pen_HandleAllocated'{$ENDIF},
Pen_GetNamePath {$IFNDEF MSWINDOWS}name '_Pen_GetNamePath'{$ENDIF},
Pen_ClassName {$IFNDEF MSWINDOWS}name '_Pen_ClassName'{$ENDIF},
Pen_Equals {$IFNDEF MSWINDOWS}name '_Pen_Equals'{$ENDIF},
Pen_GetHashCode {$IFNDEF MSWINDOWS}name '_Pen_GetHashCode'{$ENDIF},
Pen_ToString {$IFNDEF MSWINDOWS}name '_Pen_ToString'{$ENDIF},
Pen_GetHandle {$IFNDEF MSWINDOWS}name '_Pen_GetHandle'{$ENDIF},
Pen_SetHandle {$IFNDEF MSWINDOWS}name '_Pen_SetHandle'{$ENDIF},
Pen_GetColor {$IFNDEF MSWINDOWS}name '_Pen_GetColor'{$ENDIF},
Pen_SetColor {$IFNDEF MSWINDOWS}name '_Pen_SetColor'{$ENDIF},
Pen_GetMode {$IFNDEF MSWINDOWS}name '_Pen_GetMode'{$ENDIF},
Pen_SetMode {$IFNDEF MSWINDOWS}name '_Pen_SetMode'{$ENDIF},
Pen_GetStyle {$IFNDEF MSWINDOWS}name '_Pen_GetStyle'{$ENDIF},
Pen_SetStyle {$IFNDEF MSWINDOWS}name '_Pen_SetStyle'{$ENDIF},
Pen_GetWidth {$IFNDEF MSWINDOWS}name '_Pen_GetWidth'{$ENDIF},
Pen_SetWidth {$IFNDEF MSWINDOWS}name '_Pen_SetWidth'{$ENDIF},
Pen_SetOnChange {$IFNDEF MSWINDOWS}name '_Pen_SetOnChange'{$ENDIF};