summaryrefslogtreecommitdiff
path: root/plugins/Libs/delphicommctrl.inc
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2014-03-08 15:01:30 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2014-03-08 15:01:30 +0000
commitebbc20d1aabb7c462251e126929a4b2c7d3c3753 (patch)
treefcca9187f311c19ed6c50113feae34f76ba0d5f8 /plugins/Libs/delphicommctrl.inc
parent5f366013221edfc085a66446a24da366d4ea0739 (diff)
temporary revert
git-svn-id: http://svn.miranda-ng.org/main/trunk@8479 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Libs/delphicommctrl.inc')
-rw-r--r--plugins/Libs/delphicommctrl.inc149
1 files changed, 61 insertions, 88 deletions
diff --git a/plugins/Libs/delphicommctrl.inc b/plugins/Libs/delphicommctrl.inc
index 48d8bbf22d..c7fa1bc628 100644
--- a/plugins/Libs/delphicommctrl.inc
+++ b/plugins/Libs/delphicommctrl.inc
@@ -2,6 +2,7 @@
delpicommctrl.inc
-- included in KOL.pas --
*******************************************************************************}
+
{$IFNDEF FPC}
{$IFNDEF TMSG_WINDOWS}
{$DEFINE TMSG_DECODED}
@@ -10,7 +11,7 @@
{$IFDEF TMSG_DECODED}
{$I MsgDecode.pas}
type
- TMsg = record
+ TMsg = packed record
CASE Integer OF
0: (
hwnd: HWND;
@@ -27,27 +28,6 @@ type
tagMSG = TMsg;
{$ENDIF TMSG_DECODED}
-{$IFNDEF _D2009orHigher}
-{$IFNDEF WIN64}
-type
- INT_PTR = Integer;
- UINT_PTR = Cardinal;
- LONG_PTR = Integer;
- ULONG_PTR = Cardinal;
- DWORD_PTR = ULONG_PTR;
- PINT_PTR = ^INT_PTR;
- PUINT_PTR = ^UINT_PTR;
- PLONG_PTR = ^LONG_PTR;
- PULONG_PTR = ^ULONG_PTR;
- PDWORD_PTR = ^DWORD_PTR;
-const
- GWLP_WNDPROC = GWL_WNDPROC;
- GWLP_HINSTANCE = GWL_HINSTANCE;
- GWLP_HWNDPARENT = GWL_HWNDPARENT;
- GWLP_USERDATA = GWL_USERDATA;
- GWLP_ID = GWL_ID;
-{$ENDIF}
-{$ENDIF}
////////////////////////////////////////////////////////////////////////////
// this part of unit contains definitions moved here from CommCtrl.pas
@@ -58,7 +38,7 @@ type
PTCItemA = ^TTCItemA;
PTCItemW = ^TTCItemW;
PTCItem = {$IFDEF UNICODE_CTRLS} PTCItemW {$ELSE} PTCItemA {$ENDIF};
- tagTCITEMA = record
+ tagTCITEMA = packed record
mask: UINT;
dwState: UINT;
dwStateMask: UINT;
@@ -67,7 +47,7 @@ type
iImage: Integer;
lParam: LPARAM;
end;
- tagTCITEMW = record
+ tagTCITEMW = packed record
mask: UINT;
dwState: UINT;
dwStateMask: UINT;
@@ -78,7 +58,7 @@ type
end;
PTCKeyDown = ^TTCKeyDown;
- TTCKEYDOWN = record
+ TTCKEYDOWN = packed record
hdr: TNMHDR;
wVKey: Word;
flags: UINT;
@@ -520,7 +500,7 @@ const
LVN_SETDISPINFO = {$IFDEF UNICODE_CTRLS} LVN_SETDISPINFOW {$ELSE} LVN_SETDISPINFOA {$ENDIF};
type
- tagNMLVODSTATECHANGE = record
+ tagNMLVODSTATECHANGE = packed record
hdr: TNMHdr;
iFrom: Integer;
iTo: Integer;
@@ -532,9 +512,9 @@ type
type
PLVColumn = ^TLVColumn;
- TLVColumn = record
+ TLVColumn = packed record
mask: DWORD;
- fmt: Integer;
+ fmt: DWORD;
cx: Integer;
pszText: PKOL_Char;
cchTextMax: Integer;
@@ -545,11 +525,11 @@ type
end;
PLVItem = ^TLVItem;
- TLVItem = record
+ TLVItem = packed record
mask: DWORD;
iItem: Integer;
iSubItem: Integer;
- state: DWORD;
+ state: Integer;
stateMask: DWORD;
pszText: PKOL_Char;
cchTextMax: Integer;
@@ -559,13 +539,13 @@ type
end;
PLVDispInfo = ^TLVDispInfo;
- TLVDispInfo = record
+ TLVDispInfo = packed record
hdr: TNMHDR;
item: TLVItem;
end;
PLVFindInfoA = ^TLVFindInfo;
- TLVFindInfo = record
+ TLVFindInfo = packed record
flags: UINT;
psz: PKOLChar;
lParam: LPARAM;
@@ -573,7 +553,7 @@ type
vkDirection: UINT;
end;
PLVFindInfoW = ^TLVFindInfoW;
- TLVFindInfoW = record
+ TLVFindInfoW = packed record
flags: UINT;
psz: PWideChar;
lParam: LPARAM;
@@ -581,7 +561,7 @@ type
vkDirection: UINT;
end;
- TLVHitTestInfo = record
+ TLVHitTestInfo = packed record
pt: TPoint;
flags: DWORD;
iItem: Integer;
@@ -607,7 +587,7 @@ type
PHDItemA = ^THDItemA;
PHDItemW = ^THDItemW;
PHDItem = {$IFDEF UNICODE_CTRLS} PHDItemW {$ELSE} PHDItemA {$ENDIF};
- _HD_ITEMA = record
+ _HD_ITEMA = packed record
Mask: Cardinal;
cxy: Integer;
pszText: PAnsiChar;
@@ -618,7 +598,7 @@ type
iImage: Integer; // index of bitmap in ImageList
iOrder: Integer; // where to draw this item
end;
- _HD_ITEMW = record
+ _HD_ITEMW = packed record
Mask: Cardinal;
cxy: Integer;
pszText: PWideChar;
@@ -813,16 +793,16 @@ const
TVN_KEYDOWN = TVN_FIRST-12;
TVN_SINGLEEXPAND = TVN_FIRST-15;
- TVI_ROOT = THandle(-$10000); // $FFFF0000; //dmiko: win64 compat.
- TVI_FIRST = THandle(-$FFFF); // $FFFF0001;
- TVI_LAST = THandle(-$FFFE); // $FFFF0002;
- TVI_SORT = THandle(-$FFFD); // $FFFF0003;
+ TVI_ROOT = $FFFF0000;
+ TVI_FIRST = $FFFF0001;
+ TVI_LAST = $FFFF0002;
+ TVI_SORT = $FFFF0003;
type
PTVItemA = ^TTVItemA;
PTVItemW = ^TTVItemW;
PTVItem = {$IFDEF UNICODE_CTRLS} PTVItemW {$ELSE} PTVItemA {$ENDIF};
- tagTVITEMA = record
+ tagTVITEMA = packed record
mask: UINT;
hItem: THandle;
state: UINT;
@@ -834,7 +814,7 @@ type
cChildren: Integer;
lParam: LPARAM;
end;
- tagTVITEMW = record
+ tagTVITEMW = packed record
mask: UINT;
hItem: THandle;
state: UINT;
@@ -858,7 +838,7 @@ type
TV_ITEM = {$IFDEF UNICODE_CTRLS} TV_ITEMW {$ELSE} TV_ITEMA {$ENDIF};
// only used for Get and Set messages. no notifies
- tagTVITEMEXA = record
+ tagTVITEMEXA = packed record
mask: UINT;
hItem: THandle;
state: UINT;
@@ -871,7 +851,7 @@ type
lParam: LPARAM;
iIntegral: Integer;
end;
- tagTVITEMEXW = record
+ tagTVITEMEXW = packed record
mask: UINT;
hItem: THandle;
state: UINT;
@@ -895,16 +875,16 @@ type
PNMTreeViewA = ^TNMTreeViewA;
PNMTreeViewW = ^TNMTreeViewW;
PNMTreeView = {$IFDEF UNICODE_CTRLS} PNMTreeViewW {$ELSE} PNMTreeViewA {$ENDIF};
- tagNMTREEVIEWA = record
+ tagNMTREEVIEWA = packed record
hdr: TNMHDR;
- action: DWORD;
+ action: Integer;
itemOld: TTVItemA;
itemNew: TTVItemA;
ptDrag: TPoint;
end;
- tagNMTREEVIEWW = record
+ tagNMTREEVIEWW = packed record
hdr: TNMHDR;
- action: DWORD;
+ action: Integer;
itemOld: TTVItemW;
itemNew: TTVItemW;
ptDrag: TPoint;
@@ -920,12 +900,12 @@ type
NM_TREEVIEWW = tagNMTREEVIEWW;
NM_TREEVIEW = {$IFDEF UNICODE_CTRLS} NM_TREEVIEWW {$ELSE} NM_TREEVIEWA {$ENDIF};
- tagNMCUSTOMDRAWINFO = record
+ tagNMCUSTOMDRAWINFO = packed record
hdr: TNMHdr;
dwDrawStage: DWORD;
hdc: HDC;
rc: TRect;
- dwItemSpec: DWORD_PTR; // this is control specific, but it's how to specify an item. valid only with CDDS_ITEM bit set
+ dwItemSpec: DWORD; // this is control specific, but it's how to specify an item. valid only with CDDS_ITEM bit set
uItemState: UINT;
lItemlParam: LPARAM;
end;
@@ -971,7 +951,7 @@ const
CDIS_INDETERMINATE = $0100;
type
- tagNMLVCUSTOMDRAW = record
+ tagNMLVCUSTOMDRAW = packed record
nmcd: TNMCustomDraw;
clrText: COLORREF;
clrTextBk: COLORREF;
@@ -986,11 +966,11 @@ type
PTVDispInfoA = ^TTVDispInfoA;
PTVDispInfoW = ^TTVDispInfoW;
PTVDispInfo = {$IFDEF UNICODE_CTRLS} PTVDispInfoW {$ELSE} PTVDispInfoA {$ENDIF};
- tagTVDISPINFOA = record
+ tagTVDISPINFOA = packed record
hdr: TNMHDR;
item: TTVItemA;
end;
- tagTVDISPINFOW = record
+ tagTVDISPINFOW = packed record
hdr: TNMHDR;
item: TTVItemW;
end;
@@ -1005,19 +985,19 @@ type
TV_DISPINFOW = tagTVDISPINFOW;
TV_DISPINFO = {$IFDEF UNICODE_CTRLS} TV_DISPINFOW {$ELSE} TV_DISPINFOA {$ENDIF};
- tagNMMOUSE = record
+ tagNMMOUSE = packed record
hdr: TNMHdr;
- dwItemSpec: DWORD_PTR;
- dwItemData: DWORD_PTR;
+ dwItemSpec: DWORD;
+ dwItemData: DWORD;
pt: TPoint;
- dwHitInfo: LPARAM; // any specifics about where on the item or control the mouse is
+ dwHitInfo: DWORD; // any specifics about where on the item or control the mouse is
end;
PNMMouse = ^TNMMouse;
TNMMouse = tagNMMOUSE;
type
PTVHitTestInfo = ^TTVHitTestInfo;
- TTVHitTestInfo = record
+ TTVHitTestInfo = packed Record
pt: TPoint;
fl: DWORD;
hItem: THandle;
@@ -1324,28 +1304,24 @@ const
type
PTBAddBitmap = ^TTBAddBitmap;
- TTBAddBitmap = record
- hInst: HINST;
- nID: UINT_PTR;
+ TTBAddBitmap = packed record
+ hInst: THandle;
+ nID: UINT;
end;
PTBButton = ^TTBButton;
- TTBButton = record
+ TTBButton = packed record
iBitmap: Integer;
idCommand: Integer;
fsState: Byte;
fsStyle: Byte;
- {$IFDEF WIN64}
- bReserved: array[1..6] of Byte;
- {$ELSE}
bReserved: array[1..2] of Byte;
- {$ENDIF}
- dwData: DWORD_PTR;
- iString: INT_PTR;
+ dwData: Longint;
+ iString: Integer;
end;
PTBButtonInfo = ^TTBButtonInfo;
- TTBButtonInfo = record
+ TTBButtonInfo = packed record
cbSize: UINT;
dwMask: DWORD;
idCommand: Integer;
@@ -1353,29 +1329,28 @@ type
fsState: Byte;
fsStyle: Byte;
cx: Word;
- lParam: DWORD_PTR;
+ lParam: DWORD;
pszText: PKOLChar;
cchText: Integer;
end;
PColorMap = ^TColorMap;
- TColorMap = record
+ TColorMap = packed record
cFrom: TColorRef;
cTo: TColorRef;
end;
PTBNotify = ^TTBnotify;
- TTBNotify = record
+ TTBNotify = packed record
hdr: TNMHdr;
iItem: Integer;
tbButton: TTBButton;
cchText: Integer;
- pszText: PKOLChar;
- rcButton: TRect; //ie5
+ pszText: PChar;
end;
PNMTBCustomDraw = ^TNMTBCustomDraw;
- TNMTBCustomDraw = record
+ TNMTBCustomDraw = packed record
nmcd: TNMCUSTOMDRAW;
hbrMonoDither: HBrush;
hbrLines : HBrush;
@@ -1393,7 +1368,7 @@ type
end;
PTooltipText = ^TTooltipText;
- TTooltipText = record
+ TTooltipText = packed record
hdr: TNMHdr;
lpszText: PKOLChar;
szText: array[0..79] of KOLChar;
@@ -1403,13 +1378,13 @@ type
end;
PToolInfo = ^TToolInfo;
- TToolInfo = record
+ TToolInfo = packed record
cbSize: UINT;
uFlags: UINT;
hwnd: HWND;
- uId: UINT_PTR;
+ uId: UINT;
Rect: TRect;
- hInst: HINST;
+ hInst: THandle;
lpszText: PKOLChar;
lParam: LPARAM;
end;
@@ -1423,14 +1398,14 @@ const
TME_QUERY = $40000000;
TME_CANCEL = $80000000;
- HOVER_DEFAULT = THandle(-1);// $FFFFFFFF;
+ HOVER_DEFAULT = $FFFFFFFF;
ODT_HEADER = 100;
ODT_TAB = 101;
ODT_LISTVIEW = 102;
type
- tagTRACKMOUSEEVENT = record
+ tagTRACKMOUSEEVENT = packed record
cbSize: DWORD;
dwFlags: DWORD;
hwndTrack: HWND;
@@ -1444,13 +1419,11 @@ type
/////////////////////////////////////////////////////////
// Some stuff from new Delphi versions (not available in old ones):
-{$IFNDEF FPC}
-{$IFNDEF UNICODE_CTRLS}
+ {$IFNDEF UNICODE_CTRLS}
const
//IDC_HAND = MakeIntResource(32649);
IDC_HAND = PChar(32649);
{$ENDIF}
-{$ENDIF}
/////////////////////////////////////////////////////////
const
@@ -1543,13 +1516,13 @@ const
// structures
type
- tagNMDATETIMESTRINGA = record
+ tagNMDATETIMESTRINGA = packed record
nmhdr: TNmHdr;
pszUserString: PAnsiChar; // string user entered
st: TSystemTime; // app fills this in
dwFlags: DWORD; // GDT_VALID or GDT_NONE
end;
- tagNMDATETIMESTRINGW = record
+ tagNMDATETIMESTRINGW = packed record
nmhdr: TNmHdr;
pszUserString: PWideChar; // string user entered
st: TSystemTime; // app fills this in
@@ -1600,13 +1573,13 @@ const
HDN_GETDISPINFOW = HDN_FIRST-29;
type
- tagNMHEADERA = record
+ tagNMHEADERA = packed record
Hdr: TNMHdr;
Item: Integer;
Button: Integer;
PItem: PHDItemA;
end;
- tagNMHEADERW = record
+ tagNMHEADERW = packed record
Hdr: TNMHdr;
Item: Integer;
Button: Integer;