OWLNext
7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
signatur.h
Go to the documentation of this file.
1
//----------------------------------------------------------------------------
2
// ObjectWindows
3
// Copyright (c) 1992, 1996 by Borland International, All Rights Reserved
4
// Copyright (c) 1998 by Yura Bidus
5
//
6
/// \file
7
/// Message handler signature templates
8
//----------------------------------------------------------------------------
9
10
#if !defined(OWL_SIGNATUR_H)
11
#define OWL_SIGNATUR_H
12
13
#include <
owl/private/defs.h
>
14
#if defined(BI_HAS_PRAGMA_ONCE)
15
# pragma once
16
#endif
17
18
#if defined(OWL5_COMPAT)
19
20
namespace
owl
{
21
22
class
_OWLCLASS
TCommandEnabler;
23
class
_OWLCLASS
TDocument;
24
class
_OWLCLASS
TView;
25
class
_OWLCLASS
TDockingSlip;
26
class
_OWLCLASS
TWindow;
27
class
_OWLCLASS
TPoint;
28
class
_OWLCLASS
TDropInfo;
29
class
_OWLCLASS
TSize;
30
class
_OWLCLASS
TRect;
31
32
struct
_OWLCLASS
THelpHitInfo;
33
34
35
36
////////////////////////////////////////////////////////////////////////////
37
// These macros are used for declaring signature templates for OWL dispatch
38
// tables. The signatures are used to ensure that methods provided to the
39
// macros are of the proper form (ie, signature). Eg:
40
//
41
// DECLARE_DISPSIGNATURE1 (void, v_EnterPage_Sig, TEnterPageNotify &)
42
//
43
// This creates a signature verification template called v_EnterPage_Sig
44
// that is used like this:
45
//
46
// #define EV_TABN_ENTERPAGE(id,method)
47
// { nmEnterPage, id, (::owl::TAnyDispatcher)::owl::v_LPARAM_Dispatch,
48
// (TMyPMF) v_EnterPage_Sig (&TMyClass::method) }
49
//
50
// All this will simply guarantee that "method" is of the form:
51
//
52
// void Method (TEnterPageNotify &);
53
//
54
// The number on the end of DECLARE_DISPSIGNATUREx is either 0, 1, 2, 3 or
55
// 4, depending on the number of arguments the method takes.
56
//
57
#define DECLARE_SIGNATURE0(R,Name) \
58
template <class T> \
59
inline R (T::*Name(R (T::*pmf)()))() \
60
{ return pmf; }
61
62
#define DECLARE_SIGNATURE1(R,Name,P1) \
63
template <class T> \
64
inline R (T::*Name(R (T::*pmf)(P1)))(P1) \
65
{ return pmf; }
66
67
#define DECLARE_SIGNATURE2(R,Name,P1,P2) \
68
template <class T> \
69
inline R (T::*Name(R (T::*pmf)(P1,P2)))(P1,P2) \
70
{ return pmf; }
71
72
#define DECLARE_SIGNATURE3(R,Name,P1,P2,P3) \
73
template <class T> \
74
inline R (T::*Name(R (T::*pmf)(P1,P2,P3)))(P1,P2,P3) \
75
{ return pmf; }
76
77
#define DECLARE_SIGNATURE4(R,Name,P1,P2,P3,P4) \
78
template <class T> \
79
inline R (T::*Name(R (T::*pmf)(P1,P2,P3,P4)))(P1,P2,P3,P4) \
80
{ return pmf; }
81
82
#define DECLARE_SIGNATURE5(R,Name,P1,P2,P3,P4,P5) \
83
template <class T> \
84
inline R (T::*Name(R (T::*pmf)(P1,P2,P3,P4,P5)))\
85
(P1,P2,P3,P4,P5) \
86
{ return pmf; }
87
88
#define DECLARE_SIGNATURE6(R,Name,P1,P2,P3,P4,P5,P6) \
89
template <class T> \
90
inline R (T::*Name(R (T::*pmf)(P1,P2,P3,P4,P5,P6)))\
91
(P1,P2,P3,P4,P5,P6) \
92
{ return pmf; }
93
94
#define DECLARE_SIGNATURE7(R,Name,P1,P2,P3,P4,P5,P6,P8) \
95
template <class T> \
96
inline R (T::*Name(R (T::*pmf)(P1,P2,P3,P4,P5,P6,P8)))\
97
(P1,P2,P3,P4,P5,P6,P8) \
98
{ return pmf; }
99
100
#define DECLARE_SIGNATURE9(R,Name,P1,P2,P3,P4,P5,P6,P8,P9) \
101
template <class T> \
102
inline R (T::*Name(R (T::*pmf)(P1,P2,P3,P4,P5,P6,P8,P9)))\
103
(P1,P2,P3,P4,P5,P6,P8,P9) \
104
{ return pmf; }
105
106
#define DECLARE_SIGNATURE10(R,Name,P1,P2,P3,P4,P5,P6,P8,P9,P10) \
107
template <class T> \
108
inline R (T::*Name(R (T::*pmf)\
109
(P1,P2,P3,P4,P5,P6,P8,P9,P10)))(P1,P2,P3,P4,P5,P6,P8,P9,P10) \
110
{ return pmf; }
111
112
#define DECLARE_SIGNATURE11(R,Name,P1,P2,P3,P4,P5,P6,P8,P9,P10,P11) \
113
template <class T> \
114
inline R (T::*Name(R (T::*pmf)\
115
(P1,P2,P3,P4,P5,P6,P8,P9,PP10,P11)))(P1,P2,P3,P4,P5,P6,P8,P9,P10,P11) \
116
{ return pmf; }
117
118
#define DECLARE_SIGNATURE12(R,Name,P1,P2,P3,P4,P5,P6,P8,P9,P10,P11,P12) \
119
template <class T> \
120
inline R (T::*Name(R (T::*pmf)\
121
(P1,P2,P3,P4,P5,P6,P8,P9,P10,P11,P12)))(P1,P2,P3,P4,P5,P6,P8,P9,P10,P11,P12)\
122
{ return pmf; }
123
124
//----------------------------------------------------------------------------
125
// LEGEND: in order to keep signature names from getting too long, the
126
// following abbreviations are used for the data types passed to and
127
// returned from the methods. The first code is the return type, the
128
// rest are args in left to right order.
129
//
130
// - v (void return)
131
// - i,I (int)
132
// - I32 (int32)
133
// - U (uint)
134
// - B (bool)
135
// - H (HANDLE)
136
// - W (HWND)
137
// - S (char *)
138
// - CS (const char *)
139
// - other types spelled out
140
//
141
142
//----------------------------------------------------------------------------
143
144
DECLARE_SIGNATURE0
(
bool
,
B_Sig
)
145
DECLARE_SIGNATURE1
(
bool
,
B_B_Sig
,
bool
)
146
DECLARE_SIGNATURE1
(
bool
,
B_I_Sig
,
int
)
147
DECLARE_SIGNATURE1
(
bool
,
B_U_Sig
,
uint
)
148
DECLARE_SIGNATURE1
(
bool
,
B_CREATE_Sig
,
CREATESTRUCT
&)
149
DECLARE_SIGNATURE1
(
bool
,
B_CS_Sig
,
LPCTSTR
)
150
DECLARE_SIGNATURE1
(
bool
,
B_MSG_Sig
,
MSG
*)
151
DECLARE_SIGNATURE1
(
bool
,
B_RECT_Sig
,TRect *)
152
DECLARE_SIGNATURE1
(
bool
,
B_HDC_Sig
,
HDC
)
153
DECLARE_SIGNATURE2
(
bool
,
B_U_RECT_Sig
,
uint
,TRect&)
154
DECLARE_SIGNATURE2
(
bool
,
B_U_U_Sig
,
uint
,
uint
)
155
DECLARE_SIGNATURE3
(
bool
,
B_W_U_U_Sig
,
HWND
,
uint
,
uint
)
156
DECLARE_SIGNATURE3
(
bool
,
B_U_U_POINT_Sig
,
uint
,
uint
,
const
TPoint&)
157
DECLARE_SIGNATURE3
(
bool
,
B_U_i_POINT_Sig
,
uint
,
int
,
const
TPoint&)
158
159
DECLARE_SIGNATURE2
(
bool
,
B_B_HKL_Sig
,
bool
,
HKL
)
160
DECLARE_SIGNATURE2
(
bool
,
B_I_HKL_Sig
,
int
,
HKL
)
161
162
DECLARE_SIGNATURE1
(
void
,
v_HRGN_Sig
,
HRGN
)
163
DECLARE_SIGNATURE3
(
void
,
v_B_I_I_Sig
,
bool
,
int
,
int
)
164
DECLARE_SIGNATURE1
(
bool
,
B_I32_Sig
,
int32
)
165
DECLARE_SIGNATURE1
(
bool
,
B_PPALETTE_Sig
,
LOGPALETTE
* *)
166
167
//----------------------------------------------------------------------------
168
DECLARE_SIGNATURE0
(
LPCTSTR
,
CS_Sig
)
169
DECLARE_SIGNATURE0
(
HANDLE
,
H_Sig
)
170
DECLARE_SIGNATURE0
(
HFONT
,
HFONT_Sig
)
171
DECLARE_SIGNATURE1
(
HICON
,
HICON_B_Sig
,
bool
)
172
DECLARE_SIGNATURE1
(
int
,
i_CREATE_Sig
,
CREATESTRUCT
&)
173
DECLARE_SIGNATURE1
(
int
,
i_U_Sig
,
uint
)
174
DECLARE_SIGNATURE2
(
HICON
,
HICON_B_HICON_Sig
,
bool
,
HICON
)
175
DECLARE_SIGNATURE3
(
HBRUSH
,
HBRUSH_HDC_W_U_Sig
,
HDC
,
HWND
,
uint
)
176
DECLARE_SIGNATURE3
(
int
,
i_U_W_U_Sig
,
uint
,
HWND
,
uint
)
177
//----------------------------------------------------------------------------
178
179
DECLARE_SIGNATURE1
(
LRESULT
,
LRESULT_MDICREATESTRUCT_Sig
,
MDICREATESTRUCT
&)
180
DECLARE_SIGNATURE2
(
int
,
LRESULT_U_COMPAREITEM_Sig
,
uint
,
const
COMPAREITEMSTRUCT
&)
181
DECLARE_SIGNATURE2
(
int32
,
I32_U_I32_Sig
,
uint
,
int32
)
182
DECLARE_SIGNATURE2
(
LRESULT
,
LRESULT_WPARAM_LPARAM_Sig
,
WPARAM
,
LPARAM
)
//Used for EV_MESSAGE
183
DECLARE_SIGNATURE3
(
LRESULT
,
LRESULT_U_U_HMENU_Sig
,
uint
,
uint
,
HMENU
)
184
185
//----------------------------------------------------------------------------
186
187
DECLARE_SIGNATURE0
(
uint32
,
U32_Sig
)
188
DECLARE_SIGNATURE1
(
uint32
,
U32_VOIDFP_Sig
,
void
*)
189
190
//----------------------------------------------------------------------------
191
192
DECLARE_SIGNATURE0
(
uint
,
U_Sig
)
193
DECLARE_SIGNATURE2
(
uint
,
U_B_CALCSIZE_Sig
,
bool
,
NCCALCSIZE_PARAMS
&)
194
DECLARE_SIGNATURE1
(
uint
,
U_MSG_Sig
,
const
MSG
*)
195
DECLARE_SIGNATURE1
(
uint
,
U_POINT_Sig
,
const
TPoint&)
196
DECLARE_SIGNATURE3
(
uint
,
U_W_U_U_Sig
,
HWND
,
uint
,
uint
)
197
198
//----------------------------------------------------------------------------
199
200
DECLARE_SIGNATURE0
(
void
,
v_Sig
)
201
DECLARE_SIGNATURE1
(
void
,
v_B_Sig
,
bool
)
202
DECLARE_SIGNATURE1
(
void
,
v_COMMANDENABLER_Sig
,TCommandEnabler&)
203
DECLARE_SIGNATURE1
(
void
,
v_CS_Sig
,
LPCTSTR
)
204
DECLARE_SIGNATURE1
(
void
,
v_DROP_Sig
,TDropInfo)
205
DECLARE_SIGNATURE1
(
void
,
v_H_Sig
,
HANDLE
)
206
DECLARE_SIGNATURE1
(
void
,
v_HDC_Sig
,
HDC
)
207
DECLARE_SIGNATURE2
(
void
,
v_B_B_Sig
,
bool
,
bool
)
208
DECLARE_SIGNATURE2
(
void
,
v_B_HTASK_Sig
,
bool
,
HTASK
)
209
DECLARE_SIGNATURE2
(
void
,
v_B_U_Sig
,
bool
,
uint
)
210
DECLARE_SIGNATURE2
(
void
,
v_H_B_Sig
,
HANDLE
,
bool
)
211
DECLARE_SIGNATURE2
(
void
,
v_HDC_U_Sig
,
HDC
,
uint
)
212
DECLARE_SIGNATURE3
(
void
,
v_B_W_W_Sig
,
bool
,
HWND
,
HWND
)
213
214
DECLARE_SIGNATURE1
(
void
,
v_HELPINFO_Sig
,
const
HELPINFO
&)
215
216
DECLARE_SIGNATURE2
(
bool
,
b_HWND_COPYDATASTRUCT_Sig
,
HWND
,
const
COPYDATASTRUCT
&)
217
218
DECLARE_SIGNATURE2
(
void
,
v_HFONT_B_Sig
,
HFONT
,
bool
)
219
DECLARE_SIGNATURE1
(
void
,
v_HMENU_Sig
,
HMENU
)
220
DECLARE_SIGNATURE3
(
void
,
v_HMENU_U_B_Sig
,
HMENU
,
uint
,
bool
)
221
DECLARE_SIGNATURE1
(
void
,
v_i_Sig
,
int
)
222
DECLARE_SIGNATURE1
(
void
,
v_MINMAXINFO_Sig
,
MINMAXINFO
&)
223
DECLARE_SIGNATURE1
(
void
,
v_OWLDOCUMENT_Sig
,TDocument&)
224
DECLARE_SIGNATURE1
(
void
,
v_OWLVIEW_Sig
,TView&)
225
DECLARE_SIGNATURE2
(
void
,
v_OWLWINDOWDOCKED_Sig
,
uint
,
const
TDockingSlip&)
226
DECLARE_SIGNATURE1
(
void
,
v_OWLHELPHIT_Sig
,
const
THelpHitInfo&)
227
DECLARE_SIGNATURE1
(
void
,
v_POINT_Sig
,
const
TPoint&)
228
DECLARE_SIGNATURE1
(
void
,
v_S_Sig
,
LPTSTR
)
229
DECLARE_SIGNATURE1
(
void
,
v_U_Sig
,
uint
)
230
DECLARE_SIGNATURE3
(
void
,
v_U_B_W_Sig
,
uint
,
bool
,
HWND
)
231
DECLARE_SIGNATURE2
(
void
,
v_U_CS_Sig
,
uint
,
LPCTSTR
)
232
DECLARE_SIGNATURE2
(
void
,
v_U_DELETEITEM_Sig
,
uint
,
const
DELETEITEMSTRUCT
&)
233
DECLARE_SIGNATURE2
(
void
,
v_U_DRAWITEM_Sig
,
uint
,
const
DRAWITEMSTRUCT
&)
234
DECLARE_SIGNATURE2
(
void
,
v_U_MEASUREITEM_Sig
,
uint
,
MEASUREITEMSTRUCT
&)
235
DECLARE_SIGNATURE2
(
void
,
v_U_POINT_Sig
,
uint
,
const
TPoint&)
236
DECLARE_SIGNATURE2
(
void
,
v_U_S_Sig
,
uint
,
LPTSTR
)
237
DECLARE_SIGNATURE2
(
void
,
v_U_SIZE_Sig
,
uint
,
const
TSize&)
238
DECLARE_SIGNATURE2
(
void
,
v_U_STYLE_Sig
,
uint
,
STYLESTRUCT
&)
239
DECLARE_SIGNATURE2
(
void
,
v_U_CSTYLE_Sig
,
uint
,
const
STYLESTRUCT
&)
240
DECLARE_SIGNATURE2
(
void
,
v_U_U_Sig
,
uint
,
uint
)
241
DECLARE_SIGNATURE3
(
void
,
v_U_U_HMENU_Sig
,
uint
,
uint
,
HMENU
)
242
DECLARE_SIGNATURE3
(
void
,
v_U_U_U_Sig
,
uint
,
uint
,
uint
)
243
DECLARE_SIGNATURE3
(
void
,
v_U_U_W_Sig
,
uint
,
uint
,
HWND
)
244
DECLARE_SIGNATURE2
(
void
,
v_U_W_Sig
,
uint
,
HWND
)
245
DECLARE_SIGNATURE1
(
void
,
v_W_Sig
,
HWND
)
246
DECLARE_SIGNATURE2
(
void
,
v_W_H_Sig
,
HWND
,
HANDLE
)
247
DECLARE_SIGNATURE3
(
void
,
v_W_I_I_Sig
,
HWND
,
int
,
int
)
248
DECLARE_SIGNATURE3
(
void
,
v_W_U_U_Sig
,
HWND
,
uint
,
uint
)
249
DECLARE_SIGNATURE2
(
void
,
v_W_W_Sig
,
HWND
,
HWND
)
250
DECLARE_SIGNATURE1
(
void
,
v_WINDOWPOS_Sig
,
WINDOWPOS
&)
251
DECLARE_SIGNATURE1
(
void
,
v_CWINDOWPOS_Sig
,
const
WINDOWPOS
&)
252
253
254
}
// OWL namespace
255
//
256
// Aliases for compatibility
257
//
258
#define B_LPARAM_Sig B_I32_Sig
259
#define I32_U_U_HMENU_Sig LRESULT_U_U_HMENU_Sig
260
#define I32_U_COMPAREITEM_Sig LRESULT_U_COMPAREITEM_Sig
261
#define I32_MDICREATESTRUCT_Sig LRESULT_MDICREATESTRUCT_Sig
262
263
#endif
264
265
#endif
// OWL_SIGNATUR_H
VarType
Definition
safearray.h:14
owl
Object Windows Library (OWLNext Core)
Definition
animctrl.h:22
owl::int32
signed long int32
Definition
number.h:30
owl::uint32
unsigned long uint32
Definition
number.h:34
owl::uint
unsigned int uint
Definition
number.h:25
HTASK
#define HTASK
Definition
defs.h:127
defs.h
_OWLCLASS
#define _OWLCLASS
Definition
defs.h:338
include
owl
signatur.h
Generated by
1.10.0