diff options
| author | Pietro Gagliardi <[email protected]> | 2014-12-21 10:38:52 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-12-21 10:38:52 -0500 |
| commit | 9e66dc006edec187b7be9e62b3e2d15abfe86de4 (patch) | |
| tree | 9c1471bb23309bd834bf39929d7014e7fcb8ed90 /wintable/new/util.h | |
| parent | 0c216088531dc7a8b400cd93911bd031ff987107 (diff) | |
Added mouse tracking code. Not used yet.
Diffstat (limited to 'wintable/new/util.h')
| -rw-r--r-- | wintable/new/util.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/wintable/new/util.h b/wintable/new/util.h index fd6166a..d23ac27 100644 --- a/wintable/new/util.h +++ b/wintable/new/util.h @@ -89,3 +89,22 @@ static LONG columnWidth(struct table *t, intptr_t n) panic("error getting Table column width"); return r.right - r.left; } + +/* TODO: +http://blogs.msdn.com/b/oldnewthing/archive/2003/10/13/55279.aspx +http://blogs.msdn.com/b/oldnewthing/archive/2003/10/14/55286.aspx +we'll need to make sure that initial edge case works properly +(TODO get the linked article in the latter) +also implement retrack() as so, in the WM_MOUSEMOVE handler +*/ +static void retrack(struct table *t) +{ + TRACKMOUSEEVENT tm; + + ZeroMemory(&tm, sizeof (TRACKMOUSEEVENT)); + tm.cbSize = sizeof (TRACKMOUSEEVENT); + tm.dwFlags = TME_LEAVE; // TODO TME_NONCLIENT as well? + tm.hwndTrack = t->hwnd; + if ((*tableTrackMouseEvent)(&tm) == 0) + panic("error retracking Table mouse events"); +} |
