The the size of domains
lParam,
wParam and
lResult is 32bit on win32 and 64bit on x64. Therefore it is not as simple as it used to be.
The
gui_api class contains a number of constants:
Code: Select all
constants
wNull : wParam = uncheckedConvert(wParam, nullHandle).
wFalse : wParam = wNull.
wTrue : wParam = uncheckedConvert(wParam, uncheckedConvert(handle, 1)).
wMinusOne : wParam = uncheckedConvert(wParam, uncheckedConvert(handle, -1)).
lNull : lParam = uncheckedConvert(lParam, nullHandle).
lFalse : lParam = lNull.
lTrue : lParam = uncheckedConvert(lParam, wTrue).
lMinusOne : lParam = uncheckedConvert(lParam, uncheckedConvert(handle, -1)).
rNull : lResult = uncheckedConvert(lResult, nullHandle).
rFalse : lResult = rNull.
rTrue : lResult = uncheckedConvert(lResult, wTrue).
rMinusOne : lResult = uncheckedConvert(lResult, uncheckedConvert(handle, -1)).
% @short Constant of type wParam/lParam/lResult.
% @end
Injection functions:
Code: Select all
predicates
mkW : (integer Integer) -> wParam WParam.
mkW : (unsigned Unsigned) -> wParam WParam.
mkL : (integer Integer) -> lParam LParam.
mkL : (unsigned Unsigned) -> lParam LParam.
mkR : (integer Unsigned) -> lResult LResult.
mkR : (unsigned Unsigned) -> lResult LResult.
% @short Make an wParam/lParam/lResult from an integer/unsigned.
% @end
And projection functions:
Code: Select all
predicates
getUnsigned : (unsignedNative WParam) -> unsigned Integer language prolog as "gui_api_getParam".
getUnsigned : (integerNative WParam) -> unsigned Integer language prolog as "gui_api_getParam".
getUnsigned : (wParam WParam) -> unsigned Unsigned language prolog as "gui_api_getParam".
getUnsigned : (lParam LParam) -> unsigned Unsigned language prolog as "gui_api_getParam".
getUnsigned : (lResult LResult) -> unsigned Unsigned language prolog as "gui_api_getParam".
getInteger : (unsignedNative WParam) -> integer Integer language prolog as "gui_api_getParam".
getInteger : (integerNative WParam) -> integer Integer language prolog as "gui_api_getParam".
getInteger : (wParam WParam) -> integer Integer language prolog as "gui_api_getParam".
getInteger : (lParam LParam) -> integer Integer language prolog as "gui_api_getParam".
getInteger : (lResult LResult) -> integer Integer language prolog as "gui_api_getParam".
% @short Convert a wParam/lParam/lResult to an unsigned/integer.
% @end
To assist with these domains. Pointers and pointer-represented values should simply be uncehckedConverted to/from the corresponding domain.
If you want to return 0 you can use
gui_api::rNull.