Commit 26ff83df authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Changed some treeview related definitions.

parent a9c17d2e
......@@ -17,7 +17,7 @@
* -drag&drop.
* -scrollbars.
* -Unicode messages
* -TVITEMEX
* -TV_ITEMEX
*
* FIXMEs:
-GetNextItem: add flags for traversing child lists.
......@@ -512,7 +512,7 @@ TREEVIEW_SetItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TV_ITEM *tvItem;
INT32 iItem,len;
tvItem=(LPTVITEM) lParam;
tvItem=(LPTV_ITEM) lParam;
iItem=tvItem->hItem;
TRACE (treeview,"item %d,mask %x\n",iItem,tvItem->mask);
......@@ -715,12 +715,12 @@ static LRESULT
TREEVIEW_GetItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{
TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(wndPtr);
LPTVITEM tvItem;
LPTV_ITEM tvItem;
TREEVIEW_ITEM *wineItem;
INT32 iItem;
TRACE (treeview,"\n");
tvItem=(LPTVITEM) lParam;
tvItem=(LPTV_ITEM) lParam;
iItem=tvItem->hItem;
wineItem = TREEVIEW_ValidItem (infoPtr, iItem);
......@@ -850,13 +850,13 @@ TREEVIEW_InsertItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{
TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(wndPtr);
TVINSERTSTRUCT *ptdi;
TVINSERTSTRUCTA *ptdi;
TV_ITEM *tvItem;
TREEVIEW_ITEM *wineItem, *parentItem, *prevsib, *sibItem;
INT32 iItem,listItems,i,len;
TRACE (treeview,"\n");
ptdi = (TVINSERTSTRUCT *) lParam;
ptdi = (TVINSERTSTRUCTA *) lParam;
/* check if memory is available */
......@@ -1261,7 +1261,7 @@ TREEVIEW_SendTreeviewNotify (WND *wndPtr, UINT32 code, UINT32 action,
INT32 oldItem, INT32 newItem, POINT32 pt)
{
TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(wndPtr);
NMTREEVIEW nmhdr;
NM_TREEVIEW nmhdr;
TREEVIEW_ITEM *wineItem;
TRACE (treeview,"code:%x action:%x olditem:%x newitem:%x\n",
......
......@@ -1755,7 +1755,23 @@ typedef struct {
INT32 iSelectedImage;
INT32 cChildren;
LPARAM lParam;
} TV_ITEM, *LPTVITEM;
} TVITEMA, *LPTVITEMA;
typedef struct {
UINT32 mask;
HTREEITEM hItem;
UINT32 state;
UINT32 stateMask;
LPWSTR pszText;
int cchTextMax;
int iImage;
int iSelectedImage;
int cChildren;
LPARAM lParam;
} TVITEMW, *LPTVITEMW;
#define LPTV_ITEM LPTVITEMA
#define TV_ITEM TVITEMA
typedef struct {
UINT32 mask;
......@@ -1768,34 +1784,72 @@ typedef struct {
INT32 iSelectedImage;
INT32 cChildren;
LPARAM lParam;
INT32 iIntegral;
} TV_ITEMEX, *LPTVITEMEX;
int iIntegral;
} TVITEMEXA, *LPTVITEMEXA;
#define TVITEM TV_ITEM
typedef struct {
UINT32 mask;
HTREEITEM hItem;
UINT32 state;
UINT32 stateMask;
LPWSTR pszText;
int cchTextMax;
int iImage;
int iSelectedImage;
int cChildren;
LPARAM lParam;
int iIntegral;
} TVITEMEXW, *LPTV_ITEMEXW;
#define TV_ITEMEX TVITEMEXA
#define LPTV_ITEMEXA LPTVITEMEXA
typedef struct tagTVINSERTSTRUCTA {
HTREEITEM hParent;
HTREEITEM hInsertAfter;
TVITEMA item;
} TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
typedef struct tagTVINSERTSTRUCT {
typedef struct tagTVINSERTSTRUCTW {
HTREEITEM hParent;
HTREEITEM hInsertAfter;
TV_ITEM item;
} TVINSERTSTRUCT, *LPTVINSERTSTRUCT;
TVITEMW item;
} TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
#define TV_INSERTSTRUCT TVINSERTSTRUCT
#define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
#define TV_INSERTSTRUCT TVINSERTSTRUCTA
#define LPTV_INSERTSTRUCT LPTVINSERTSTRUCTA
typedef struct tagNMTREEVIEWA {
NMHDR hdr;
UINT32 action;
TVITEMA itemOld;
TVITEMA itemNew;
POINT32 ptDrag;
} NMTREEVIEWA, *LPNMTREEVIEWA;
typedef struct tagNMTREEVIEW {
typedef struct tagNMTREEVIEWW {
NMHDR hdr;
UINT32 action;
TVITEM itemOld;
TVITEM itemNew;
TVITEMW itemOld;
TVITEMW itemNew;
POINT32 ptDrag;
} NMTREEVIEW, *LPNMTREEVIEW;
} NMTREEVIEWW, *LPNMTREEVIEWW;
#define NM_TREEVIEW NMTREEVIEWA
#define LPNM_TREEVIEW LPNMTREEVIEWA
typedef struct tagTVDISPINFOA {
NMHDR hdr;
TVITEMA item;
} NMTVDISPINFOA, *LPNMTVDISPINFOA;
typedef struct tagTVDISPINFO {
typedef struct tagTVDISPINFOW {
NMHDR hdr;
TVITEM item;
} NMTVDISPINFO, *LPNMTVDISPINFO;
TVITEMW item;
} NMTVDISPINFOW, *LPNMTVDISPINFOW;
#define NMTVDISPINFO NMTVDISPINFOA
#define LPNMTVDISPINFO LPNMTVDISPINFOA
typedef INT32 (CALLBACK *PFNTVCOMPARE)(LPARAM, LPARAM, LPARAM);
......@@ -1817,9 +1871,9 @@ typedef struct tagTVHITTESTINFO {
#define TV_HITTESTINFO TVHITTESTINFO
#define TreeView_InsertItem(hwndHD, phdi) \
(INT32)SendMessage32A((hwnd), TVM_INSERTITEM, 0, \
(LPARAM)(LPTV_INSERTSTRUCT)(phdi))
#define TreeView_InsertItem32A(hwnd, phdi) \
(INT32)SendMessage32A((hwnd), TVM_INSERTITEM32A, 0, \
(LPARAM)(LPTVINSERTSTRUCTA)(phdi))
#define TreeView_DeleteItem(hwnd, hItem) \
(BOOL32)SendMessage32A((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
#define TreeView_DeleteAllItems(hwnd) \
......@@ -1877,7 +1931,7 @@ typedef struct tagTVHITTESTINFO {
#define TreeView_Select(hwnd, hitem, code) \
(UINT32)SendMessage32A((hwnd), TVM_SELECTITEM, (WPARAM)code, \
(UINT32)SendMessage32A((hwnd), TVM_SELECTITEM, (WPARAM32)code, \
(LPARAM)(UINT32)(hitem))
......@@ -1890,11 +1944,11 @@ typedef struct tagTVHITTESTINFO {
TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
*/
#define TreeView_GetItem(hwnd, pitem) \
(BOOL32)SendMessage32A((hwnd), TVM_GETITEM, 0, (LPARAM) (TV_ITEM *)(pitem))
#define TreeView_GetItem32A(hwnd, pitem) \
(BOOL32)SendMessage32A((hwnd), TVM_GETITEM32A, 0, (LPARAM) (TVITEMA *)(pitem))
#define TreeView_SetItem(hwnd, pitem) \
(BOOL32)SendMessage32A((hwnd), TVM_SETITEM, 0, (LPARAM)(const TV_ITEM *)(pitem))
#define TreeView_SetItem32A(hwnd, pitem) \
(BOOL32)SendMessage32A((hwnd), TVM_SETITEM32A, 0, (LPARAM)(const TVITEMA *)(pitem))
#define TreeView_EditLabel(hwnd, hitem) \
(HWND)SendMessage32A((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
......@@ -1908,32 +1962,32 @@ typedef struct tagTVHITTESTINFO {
#define TreeView_HitTest(hwnd, lpht) \
(HTREEITEM)SendMessage32A((hwnd), TVM_HITTEST, 0,\
(LPARAM)(LPTV_HITTESTINFO)(lpht))
(LPARAM)(LPTVHITTESTINFO)(lpht))
#define TreeView_CreateDragImage(hwnd, hitem) \
(HIMAGELIST)SendMessage32A((hwnd), TVM_CREATEDRAGIMAGE, 0,\
(LPARAM)(HTREEITEM)(hitem))
#define TreeView_SortChildren(hwnd, hitem, recurse) \
(BOOL)SendMessage32A((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
(BOOL32)SendMessage32A((hwnd), TVM_SORTCHILDREN, (WPARAM32)recurse,\
(LPARAM)(HTREEITEM)(hitem))
#define TreeView_EnsureVisible(hwnd, hitem) \
(BOOL)SendMessage32A((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT32)(hitem))
(BOOL32)SendMessage32A((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT32)(hitem))
#define TreeView_SortChildrenCB(hwnd, psort, recurse) \
(BOOL)SendMessage32A((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
(BOOL32)SendMessage32A((hwnd), TVM_SORTCHILDRENCB, (WPARAM32)recurse, \
(LPARAM)(LPTV_SORTCB)(psort))
#define TreeView_EndEditLabelNow(hwnd, fCancel) \
(BOOL)SendMessage32A((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
(BOOL32)SendMessage32A((hwnd), TVM_ENDEDITLABELNOW, (WPARAM32)fCancel, 0)
#define TreeView_GetISearchString(hwndTV, lpsz) \
(BOOL)SendMessage32A((hwndTV), TVM_GETISEARCHSTRING, 0, \
(BOOL32)SendMessage32A((hwndTV), TVM_GETISEARCHSTRING, 0, \
(LPARAM)(LPTSTR)lpsz)
#define TreeView_SetItemHeight(hwnd, iHeight) \
(INT32)SendMessage32A((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
(INT32)SendMessage32A((hwnd), TVM_SETITEMHEIGHT, (WPARAM32)iHeight, 0)
#define TreeView_GetItemHeight(hwnd) \
(INT32)SendMessage32A((hwnd), TVM_GETITEMHEIGHT, 0, 0)
......@@ -2679,6 +2733,7 @@ typedef struct tagNMIPADDRESS
* Property sheet support (callback procs)
*/
#define WC_PROPSHEET32A "SysPropertySheet"
#define WC_PROPSHEET32W L"SysPropertySheet"
#define WC_PROPSHEET WINELIB_NAME_AW(WC_PROPSHEET)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment