Changeset 2635 for trunk/src/comctl32/comctl32.c
- Timestamp:
- Feb 4, 2000, 6:02:09 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/comctl32.c
r2523 r2635 1 /* $Id: comctl32.c,v 1.1 2 2000-01-26 18:04:29cbratschi Exp $ */1 /* $Id: comctl32.c,v 1.13 2000-02-04 17:02:06 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 common controls implementation … … 12 12 */ 13 13 14 /* WINE 990923level (commctrl.c) */14 /* WINE 20000130 level (commctrl.c) */ 15 15 16 16 #include "comctl32.h" … … 837 837 } 838 838 839 static int iTrackMax = 0; 840 static HWND TrackingList[10]; 841 static UINT timer; 842 843 static void CALLBACK TrackMouseEventProc(HWND hwndUnused, UINT uMsg, UINT idEvent, DWORD dwTime) { 844 int i = 0; 845 POINT pos; 846 HWND hwnd; 847 BOOL keepTracking = FALSE; 848 GetCursorPos(&pos); 849 hwnd = WindowFromPoint(pos); 850 /* Loop through the list of windows waiting on mouse exit */ 851 while (i < iTrackMax) { 852 if (TrackingList[i] != hwnd) 853 PostMessageA(TrackingList[i], WM_MOUSELEAVE, 0, 0); 854 else 855 keepTracking = TRUE; 856 857 858 i++; 859 } 860 861 if (keepTracking) { 862 iTrackMax = 1; 863 TrackingList[0] = hwnd; 864 } 865 else 866 KillTimer(0, timer); 867 } 868 869 /*********************************************************************** 870 * _TrackMouseEvent [COMCTL32.25] 871 * 872 * Requests notification of mouse events 873 * 874 * PARAMS 875 * ptme [I,O] pointer to TRACKMOUSEEVENT information structure. 876 * 877 * RETURNS 878 * Success: non-zero 879 * Failure: zero 880 * 881 */ 882 883 BOOL WINAPI 884 _TrackMouseEvent (TRACKMOUSEEVENT *ptme) 885 { 886 DWORD flags = 0; 887 int i; 888 BOOL cancel = 0, hover = 0, leave = 0, query = 0; 889 if (ptme->cbSize != sizeof(TRACKMOUSEEVENT)) { 890 //WARN("wrong TRACKMOUSEEVENT size from app"); 891 return E_INVALIDARG; 892 } 893 894 //TRACE("%lx, %lx, %x, %lx\n", ptme->cbSize, ptme->dwFlags, ptme->hwndTrack, ptme->dwHoverTime); 895 896 flags = ptme->dwFlags; 897 if ( flags & TME_CANCEL ) { 898 cancel = 1; 899 flags &= ~ TME_CANCEL; 900 } 901 if ( flags & TME_HOVER ) { 902 hover = 1; 903 flags &= ~ TME_HOVER; 904 //FIXME("TME_HOVER unimplemented\n" ); 905 } 906 if ( flags & TME_LEAVE ) { 907 leave = 1; 908 flags &= ~ TME_LEAVE; 909 } 910 if ( flags & TME_QUERY ) { 911 query = 1; 912 flags &= ~ TME_QUERY; 913 //FIXME("TME_QUERY unimplemented\n" ); 914 } 915 916 //if ( flags ) 917 // FIXME("Unknown flag(s) %ld\n", flags & ~(TME_CANCEL | TME_HOVER | TME_LEAVE | TME_QUERY) ); 918 919 if (leave) { 920 if (cancel) { 921 for (i = 0; i < iTrackMax; i++) 922 if (TrackingList[i] == ptme->hwndTrack) 923 TrackingList[i] = TrackingList[--iTrackMax]; 924 } 925 else { 926 if (iTrackMax == sizeof (TrackingList) / sizeof *TrackingList) 927 return FALSE; 928 929 /* Add hwndTrack to the track list */ 930 TrackingList[iTrackMax++] = ptme->hwndTrack; 931 if (!timer) 932 timer = SetTimer(0, 0, 50, TrackMouseEventProc); 933 } 934 } 935 936 return TRUE; 937 } 938 939
Note:
See TracChangeset
for help on using the changeset viewer.