Commit 9e4771fe authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

- Document control completeness.

- Remove unneeded include. - Fix TEXT define. - Fix tabs. - Small optimisation in DrawInsert.
parent bb6d87f6
...@@ -18,6 +18,15 @@ ...@@ -18,6 +18,15 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* NOTES
*
* This code was audited for completeness against the documented features
* of Comctl32.dll version 6.0 on Mar. 10, 2004, by Robert Shearman.
*
* Unless otherwise noted, we believe this code to be complete, as per
* the specification mentioned above.
* If you discover missing features or bugs please note them below.
*
*/ */
#include <stdarg.h> #include <stdarg.h>
...@@ -27,16 +36,15 @@ ...@@ -27,16 +36,15 @@
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h" #include "winuser.h"
#include "winnls.h" #include "winnls.h"
#include "winnt.h"
#include "commctrl.h" #include "commctrl.h"
#include "comctl32.h" #include "comctl32.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(commctrl); WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
#ifndef TEXT /* for compiler compatibility we only accept literal ASCII strings */
# define TEXT(string) string #undef TEXT
#endif #define TEXT(string) string
#define DRAGLIST_SUBCLASSID 0 #define DRAGLIST_SUBCLASSID 0
#define DRAGLIST_SCROLLPERIOD 200 #define DRAGLIST_SCROLLPERIOD 200
...@@ -50,17 +58,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(commctrl); ...@@ -50,17 +58,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
/* internal Wine specific data for the drag list control */ /* internal Wine specific data for the drag list control */
typedef struct _DRAGLISTDATA typedef struct _DRAGLISTDATA
{ {
/* are we currently in dragging mode? */ /* are we currently in dragging mode? */
BOOL dragging; BOOL dragging;
/* cursor to use as determined by DL_DRAGGING notification. /* cursor to use as determined by DL_DRAGGING notification.
* NOTE: as we use LoadCursor we don't have to use DeleteCursor * NOTE: as we use LoadCursor we don't have to use DeleteCursor
* when we are finished with it */ * when we are finished with it */
HCURSOR cursor; HCURSOR cursor;
/* optimisation so that we don't have to load the cursor /* optimisation so that we don't have to load the cursor
* all of the time whilst dragging */ * all of the time whilst dragging */
LRESULT last_dragging_response; LRESULT last_dragging_response;
/* prevents flicker with drawing drag arrow */ /* prevents flicker with drawing drag arrow */
RECT last_drag_icon_rect; RECT last_drag_icon_rect;
} DRAGLISTDATA; } DRAGLISTDATA;
...@@ -259,6 +268,9 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem) ...@@ -259,6 +268,9 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
if (!GetWindowSubclass(hwndLB, DragList_SubclassWindowProc, DRAGLIST_SUBCLASSID, (DWORD_PTR*)&data)) if (!GetWindowSubclass(hwndLB, DragList_SubclassWindowProc, DRAGLIST_SUBCLASSID, (DWORD_PTR*)&data))
return; return;
if (nItem < 0)
SetRectEmpty(&rcDragIcon);
/* prevent flicker by only redrawing when necessary */ /* prevent flicker by only redrawing when necessary */
if (!EqualRect(&rcDragIcon, &data->last_drag_icon_rect)) if (!EqualRect(&rcDragIcon, &data->last_drag_icon_rect))
{ {
...@@ -266,6 +278,8 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem) ...@@ -266,6 +278,8 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
RedrawWindow(hwndParent, &data->last_drag_icon_rect, NULL, RedrawWindow(hwndParent, &data->last_drag_icon_rect, NULL,
RDW_INTERNALPAINT | RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW); RDW_INTERNALPAINT | RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
CopyRect(&data->last_drag_icon_rect, &rcDragIcon);
if (nItem >= 0) if (nItem >= 0)
{ {
hdc = GetDC(hwndParent); hdc = GetDC(hwndParent);
...@@ -275,7 +289,6 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem) ...@@ -275,7 +289,6 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
ReleaseDC(hwndParent, hdc); ReleaseDC(hwndParent, hdc);
} }
} }
CopyRect(&data->last_drag_icon_rect, &rcDragIcon);
} }
/*********************************************************************** /***********************************************************************
......
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