Mercurial > dwindows
comparison win/dw.c @ 1858:952a41463240
Make sure callbacks have their calling convention specified explicitly on Windows.
Was hoping this would fix the problem of MinGW and Visual C compiled versions not
mixing properly, but this has not seemed to have fixed it... will continue to look.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 28 Feb 2013 13:55:33 +0000 |
parents | 417176df4755 |
children | c836603d3f14 |
comparison
equal
deleted
inserted
replaced
1857:417176df4755 | 1858:952a41463240 |
---|---|
1697 /* The main window procedure for Dynamic Windows, all the resizing code is done here. */ | 1697 /* The main window procedure for Dynamic Windows, all the resizing code is done here. */ |
1698 LRESULT CALLBACK _wndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2) | 1698 LRESULT CALLBACK _wndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2) |
1699 { | 1699 { |
1700 int result = -1, taskbar = FALSE; | 1700 int result = -1, taskbar = FALSE; |
1701 SignalHandler *tmp = Root; | 1701 SignalHandler *tmp = Root; |
1702 void (*windowfunc)(PVOID); | 1702 void (DWSIGNAL *windowfunc)(PVOID); |
1703 ULONG origmsg = msg; | 1703 ULONG origmsg = msg; |
1704 | 1704 |
1705 /* Deal with translating some messages */ | 1705 /* Deal with translating some messages */ |
1706 if (msg == WM_USER+2) | 1706 if (msg == WM_USER+2) |
1707 { | 1707 { |
1728 { | 1728 { |
1729 case WM_TIMER: | 1729 case WM_TIMER: |
1730 { | 1730 { |
1731 if (!hWnd) | 1731 if (!hWnd) |
1732 { | 1732 { |
1733 int (*timerfunc)(void *) = tmp->signalfunction; | 1733 int (DWSIGNAL *timerfunc)(void *) = tmp->signalfunction; |
1734 if (tmp->id == (int)mp1) | 1734 if (tmp->id == (int)mp1) |
1735 { | 1735 { |
1736 if (!timerfunc(tmp->data)) | 1736 if (!timerfunc(tmp->data)) |
1737 { | 1737 { |
1738 dw_timer_disconnect(tmp->id); | 1738 dw_timer_disconnect(tmp->id); |
1743 result = 0; | 1743 result = 0; |
1744 } | 1744 } |
1745 break; | 1745 break; |
1746 case WM_SETFOCUS: | 1746 case WM_SETFOCUS: |
1747 { | 1747 { |
1748 int (*setfocusfunc)(HWND, void *) = (int (*)(HWND, void *))tmp->signalfunction; | 1748 int (DWSIGNAL *setfocusfunc)(HWND, void *) = (int (*)(HWND, void *))tmp->signalfunction; |
1749 | 1749 |
1750 if(hWnd == tmp->window) | 1750 if(hWnd == tmp->window) |
1751 { | 1751 { |
1752 result = setfocusfunc(tmp->window, tmp->data); | 1752 result = setfocusfunc(tmp->window, tmp->data); |
1753 tmp = NULL; | 1753 tmp = NULL; |
1754 } | 1754 } |
1755 } | 1755 } |
1756 break; | 1756 break; |
1757 case WM_SIZE: | 1757 case WM_SIZE: |
1758 { | 1758 { |
1759 int (*sizefunc)(HWND, int, int, void *) = tmp->signalfunction; | 1759 int (DWSIGNAL *sizefunc)(HWND, int, int, void *) = tmp->signalfunction; |
1760 if(hWnd == tmp->window) | 1760 if(hWnd == tmp->window) |
1761 { | 1761 { |
1762 result = sizefunc(tmp->window, LOWORD(mp2), HIWORD(mp2), tmp->data); | 1762 result = sizefunc(tmp->window, LOWORD(mp2), HIWORD(mp2), tmp->data); |
1763 tmp = NULL; | 1763 tmp = NULL; |
1764 } | 1764 } |
1765 } | 1765 } |
1766 break; | 1766 break; |
1767 case WM_LBUTTONDOWN: | 1767 case WM_LBUTTONDOWN: |
1768 { | 1768 { |
1769 int (*buttonfunc)(HWND, int, int, int, void *) = (int (*)(HWND, int, int, int, void *))tmp->signalfunction; | 1769 int (DWSIGNAL *buttonfunc)(HWND, int, int, int, void *) = (int (*)(HWND, int, int, int, void *))tmp->signalfunction; |
1770 | 1770 |
1771 if(hWnd == tmp->window) | 1771 if(hWnd == tmp->window) |
1772 { | 1772 { |
1773 int button=0; | 1773 int button=0; |
1774 | 1774 |
1799 } | 1799 } |
1800 } | 1800 } |
1801 break; | 1801 break; |
1802 case WM_LBUTTONUP: | 1802 case WM_LBUTTONUP: |
1803 { | 1803 { |
1804 int (*buttonfunc)(HWND, int, int, int, void *) = (int (*)(HWND, int, int, int, void *))tmp->signalfunction; | 1804 int (DWSIGNAL *buttonfunc)(HWND, int, int, int, void *) = (int (*)(HWND, int, int, int, void *))tmp->signalfunction; |
1805 | 1805 |
1806 if(hWnd == tmp->window) | 1806 if(hWnd == tmp->window) |
1807 { | 1807 { |
1808 int button=0; | 1808 int button=0; |
1809 | 1809 |
1835 } | 1835 } |
1836 break; | 1836 break; |
1837 case WM_MOUSEMOVE: | 1837 case WM_MOUSEMOVE: |
1838 { | 1838 { |
1839 POINTS pts = MAKEPOINTS(mp2); | 1839 POINTS pts = MAKEPOINTS(mp2); |
1840 int (*motionfunc)(HWND, int, int, int, void *) = (int (*)(HWND, int, int, int, void *))tmp->signalfunction; | 1840 int (DWSIGNAL *motionfunc)(HWND, int, int, int, void *) = (int (*)(HWND, int, int, int, void *))tmp->signalfunction; |
1841 | 1841 |
1842 if(hWnd == tmp->window) | 1842 if(hWnd == tmp->window) |
1843 { | 1843 { |
1844 int keys = 0; | 1844 int keys = 0; |
1845 | 1845 |
1855 } | 1855 } |
1856 } | 1856 } |
1857 break; | 1857 break; |
1858 case WM_CHAR: | 1858 case WM_CHAR: |
1859 { | 1859 { |
1860 int (*keypressfunc)(HWND, char, int, int, void *, char *) = tmp->signalfunction; | 1860 int (DWSIGNAL *keypressfunc)(HWND, char, int, int, void *, char *) = tmp->signalfunction; |
1861 | 1861 |
1862 if(hWnd == tmp->window || _toplevel_window(hWnd) == tmp->window) | 1862 if(hWnd == tmp->window || _toplevel_window(hWnd) == tmp->window) |
1863 { | 1863 { |
1864 int special = 0; | 1864 int special = 0; |
1865 char *utf8 = NULL, ch[2] = {0}; | 1865 char *utf8 = NULL, ch[2] = {0}; |
1885 } | 1885 } |
1886 } | 1886 } |
1887 break; | 1887 break; |
1888 case WM_CLOSE: | 1888 case WM_CLOSE: |
1889 { | 1889 { |
1890 int (*closefunc)(HWND, void *) = tmp->signalfunction; | 1890 int (DWSIGNAL *closefunc)(HWND, void *) = tmp->signalfunction; |
1891 | 1891 |
1892 if(hWnd == tmp->window) | 1892 if(hWnd == tmp->window) |
1893 { | 1893 { |
1894 result = closefunc(tmp->window, tmp->data); | 1894 result = closefunc(tmp->window, tmp->data); |
1895 tmp = NULL; | 1895 tmp = NULL; |
1898 break; | 1898 break; |
1899 case WM_PAINT: | 1899 case WM_PAINT: |
1900 { | 1900 { |
1901 PAINTSTRUCT ps; | 1901 PAINTSTRUCT ps; |
1902 DWExpose exp; | 1902 DWExpose exp; |
1903 int (*exposefunc)(HWND, DWExpose *, void *) = tmp->signalfunction; | 1903 int (DWSIGNAL *exposefunc)(HWND, DWExpose *, void *) = tmp->signalfunction; |
1904 | 1904 |
1905 if ( hWnd == tmp->window ) | 1905 if ( hWnd == tmp->window ) |
1906 { | 1906 { |
1907 BeginPaint(hWnd, &ps); | 1907 BeginPaint(hWnd, &ps); |
1908 exp.x = ps.rcPaint.left; | 1908 exp.x = ps.rcPaint.left; |
1930 { | 1930 { |
1931 if(tem->hdr.code == TVN_SELCHANGED && tmp->message == TVN_SELCHANGED) | 1931 if(tem->hdr.code == TVN_SELCHANGED && tmp->message == TVN_SELCHANGED) |
1932 { | 1932 { |
1933 if(tmp->window == tem->hdr.hwndFrom && !dw_window_get_data(tmp->window, "_dw_select_item")) | 1933 if(tmp->window == tem->hdr.hwndFrom && !dw_window_get_data(tmp->window, "_dw_select_item")) |
1934 { | 1934 { |
1935 int (*treeselectfunc)(HWND, HTREEITEM, char *, void *, void *) = tmp->signalfunction; | 1935 int (DWSIGNAL *treeselectfunc)(HWND, HTREEITEM, char *, void *, void *) = tmp->signalfunction; |
1936 TVITEM tvi; | 1936 TVITEM tvi; |
1937 void **ptrs; | 1937 void **ptrs; |
1938 | 1938 |
1939 tvi.mask = TVIF_HANDLE | TVIF_PARAM; | 1939 tvi.mask = TVIF_HANDLE | TVIF_PARAM; |
1940 tvi.hItem = tem->itemNew.hItem; | 1940 tvi.hItem = tem->itemNew.hItem; |
1950 } | 1950 } |
1951 else if(tem->hdr.code == TVN_ITEMEXPANDED && tmp->message == TVN_ITEMEXPANDED) | 1951 else if(tem->hdr.code == TVN_ITEMEXPANDED && tmp->message == TVN_ITEMEXPANDED) |
1952 { | 1952 { |
1953 if(tmp->window == tem->hdr.hwndFrom && tem->action == TVE_EXPAND) | 1953 if(tmp->window == tem->hdr.hwndFrom && tem->action == TVE_EXPAND) |
1954 { | 1954 { |
1955 int (*treeexpandfunc)(HWND, HTREEITEM, void *) = tmp->signalfunction; | 1955 int (DWSIGNAL *treeexpandfunc)(HWND, HTREEITEM, void *) = tmp->signalfunction; |
1956 | 1956 |
1957 result = treeexpandfunc(tmp->window, tem->itemNew.hItem, tmp->data); | 1957 result = treeexpandfunc(tmp->window, tem->itemNew.hItem, tmp->data); |
1958 tmp = NULL; | 1958 tmp = NULL; |
1959 } | 1959 } |
1960 } | 1960 } |
1961 else if(tem->hdr.code == NM_RCLICK && tmp->message == NM_RCLICK) | 1961 else if(tem->hdr.code == NM_RCLICK && tmp->message == NM_RCLICK) |
1962 { | 1962 { |
1963 if(tmp->window == tem->hdr.hwndFrom) | 1963 if(tmp->window == tem->hdr.hwndFrom) |
1964 { | 1964 { |
1965 int (*containercontextfunc)(HWND, char *, int, int, void *, void *) = tmp->signalfunction; | 1965 int (DWSIGNAL *containercontextfunc)(HWND, char *, int, int, void *, void *) = tmp->signalfunction; |
1966 HTREEITEM hti; | 1966 HTREEITEM hti; |
1967 TVITEM tvi; | 1967 TVITEM tvi; |
1968 TVHITTESTINFO thi; | 1968 TVHITTESTINFO thi; |
1969 void **ptrs = NULL; | 1969 void **ptrs = NULL; |
1970 LONG x, y; | 1970 LONG x, y; |
2006 | 2006 |
2007 memset(&lvi, 0, sizeof(LV_ITEM)); | 2007 memset(&lvi, 0, sizeof(LV_ITEM)); |
2008 | 2008 |
2009 if(iItem > -1) | 2009 if(iItem > -1) |
2010 { | 2010 { |
2011 int (*treeselectfunc)(HWND, HWND, char *, void *, void *) = tmp->signalfunction; | 2011 int (DWSIGNAL *treeselectfunc)(HWND, HWND, char *, void *, void *) = tmp->signalfunction; |
2012 | 2012 |
2013 lvi.iItem = iItem; | 2013 lvi.iItem = iItem; |
2014 lvi.mask = LVIF_PARAM; | 2014 lvi.mask = LVIF_PARAM; |
2015 | 2015 |
2016 ListView_GetItem(tmp->window, &lvi); | 2016 ListView_GetItem(tmp->window, &lvi); |
2029 else if(tmp->message == TCN_SELCHANGE) | 2029 else if(tmp->message == TCN_SELCHANGE) |
2030 { | 2030 { |
2031 NMHDR FAR *tem=(NMHDR FAR *)mp2; | 2031 NMHDR FAR *tem=(NMHDR FAR *)mp2; |
2032 if(tmp->window == tem->hwndFrom && tem->code == tmp->message) | 2032 if(tmp->window == tem->hwndFrom && tem->code == tmp->message) |
2033 { | 2033 { |
2034 int (*switchpagefunc)(HWND, unsigned long, void *) = tmp->signalfunction; | 2034 int (DWSIGNAL *switchpagefunc)(HWND, unsigned long, void *) = tmp->signalfunction; |
2035 unsigned long num=dw_notebook_page_get(tem->hwndFrom); | 2035 unsigned long num=dw_notebook_page_get(tem->hwndFrom); |
2036 result = switchpagefunc(tem->hwndFrom, num, tmp->data); | 2036 result = switchpagefunc(tem->hwndFrom, num, tmp->data); |
2037 tmp = NULL; | 2037 tmp = NULL; |
2038 } | 2038 } |
2039 } | 2039 } |
2040 else if(tmp->message == LVN_COLUMNCLICK) | 2040 else if(tmp->message == LVN_COLUMNCLICK) |
2041 { | 2041 { |
2042 NMLISTVIEW FAR *tem=(NMLISTVIEW FAR *)mp2; | 2042 NMLISTVIEW FAR *tem=(NMLISTVIEW FAR *)mp2; |
2043 if(tmp->window == tem->hdr.hwndFrom && tem->hdr.code == tmp->message) | 2043 if(tmp->window == tem->hdr.hwndFrom && tem->hdr.code == tmp->message) |
2044 { | 2044 { |
2045 int (*columnclickfunc)(HWND, int, void *) = tmp->signalfunction; | 2045 int (DWSIGNAL *columnclickfunc)(HWND, int, void *) = tmp->signalfunction; |
2046 result = columnclickfunc(tem->hdr.hwndFrom, tem->iSubItem, tmp->data); | 2046 result = columnclickfunc(tem->hdr.hwndFrom, tem->iSubItem, tmp->data); |
2047 tmp = NULL; | 2047 tmp = NULL; |
2048 } | 2048 } |
2049 } | 2049 } |
2050 else if(tmp->message == WM_VSCROLL) | 2050 else if(tmp->message == WM_VSCROLL) |
2051 { | 2051 { |
2052 NMUPDOWN FAR *tem=(NMUPDOWN FAR *)mp2; | 2052 NMUPDOWN FAR *tem=(NMUPDOWN FAR *)mp2; |
2053 if(tmp->window == tem->hdr.hwndFrom && tem->hdr.code == UDN_DELTAPOS) | 2053 if(tmp->window == tem->hdr.hwndFrom && tem->hdr.code == UDN_DELTAPOS) |
2054 { | 2054 { |
2055 int (*valuechangefunc)(HWND, int, void *) = tmp->signalfunction; | 2055 int (DWSIGNAL *valuechangefunc)(HWND, int, void *) = tmp->signalfunction; |
2056 result = valuechangefunc(tmp->window, tem->iPos + tem->iDelta, tmp->data); | 2056 result = valuechangefunc(tmp->window, tem->iPos + tem->iDelta, tmp->data); |
2057 tmp = NULL; | 2057 tmp = NULL; |
2058 } | 2058 } |
2059 } | 2059 } |
2060 } | 2060 } |
2061 break; | 2061 break; |
2062 case WM_COMMAND: | 2062 case WM_COMMAND: |
2063 { | 2063 { |
2064 int (*clickfunc)(HWND, void *) = tmp->signalfunction; | 2064 int (DWSIGNAL *clickfunc)(HWND, void *) = tmp->signalfunction; |
2065 HWND command; | 2065 HWND command; |
2066 ULONG passthru = (ULONG)LOWORD(mp1); | 2066 ULONG passthru = (ULONG)LOWORD(mp1); |
2067 ULONG message = (ULONG)HIWORD(mp1); | 2067 ULONG message = (ULONG)HIWORD(mp1); |
2068 | 2068 |
2069 command = (HWND)(uintptr_t)passthru; | 2069 command = (HWND)(uintptr_t)passthru; |
2070 | 2070 |
2071 if (message == LBN_SELCHANGE || message == CBN_SELCHANGE) | 2071 if (message == LBN_SELCHANGE || message == CBN_SELCHANGE) |
2072 { | 2072 { |
2073 int (*listboxselectfunc)(HWND, int, void *) = tmp->signalfunction; | 2073 int (DWSIGNAL *listboxselectfunc)(HWND, int, void *) = tmp->signalfunction; |
2074 | 2074 |
2075 if (tmp->message == LBN_SELCHANGE && tmp->window == (HWND)mp2) | 2075 if (tmp->message == LBN_SELCHANGE && tmp->window == (HWND)mp2) |
2076 { | 2076 { |
2077 result = listboxselectfunc(tmp->window, dw_listbox_selected(tmp->window), tmp->data); | 2077 result = listboxselectfunc(tmp->window, dw_listbox_selected(tmp->window), tmp->data); |
2078 tmp = NULL; | 2078 tmp = NULL; |
2118 case WM_HSCROLL: | 2118 case WM_HSCROLL: |
2119 case WM_VSCROLL: | 2119 case WM_VSCROLL: |
2120 { | 2120 { |
2121 TCHAR tmpbuf[100] = {0}; | 2121 TCHAR tmpbuf[100] = {0}; |
2122 HWND handle = (HWND)mp2; | 2122 HWND handle = (HWND)mp2; |
2123 int (*valuechangefunc)(HWND, int, void *) = tmp->signalfunction; | 2123 int (DWSIGNAL *valuechangefunc)(HWND, int, void *) = tmp->signalfunction; |
2124 | 2124 |
2125 if(!GetClassName(handle, tmpbuf, 99)) | 2125 if(!GetClassName(handle, tmpbuf, 99)) |
2126 { | 2126 { |
2127 GetClassName(hWnd, tmpbuf, 99); | 2127 GetClassName(hWnd, tmpbuf, 99); |
2128 } | 2128 } |
2623 if (tmp->message == WM_COMMAND) | 2623 if (tmp->message == WM_COMMAND) |
2624 { | 2624 { |
2625 /* Make sure it's the right window, and the right ID */ | 2625 /* Make sure it's the right window, and the right ID */ |
2626 if (tmp->window == handle) | 2626 if (tmp->window == handle) |
2627 { | 2627 { |
2628 int (*clickfunc)(HWND, void *) = tmp->signalfunction; | 2628 int (DWSIGNAL *clickfunc)(HWND, void *) = tmp->signalfunction; |
2629 clickfunc(tmp->window, tmp->data); | 2629 clickfunc(tmp->window, tmp->data); |
2630 tmp = NULL; | 2630 tmp = NULL; |
2631 } | 2631 } |
2632 } | 2632 } |
2633 if (tmp) | 2633 if (tmp) |
2960 | 2960 |
2961 while(tmp) | 2961 while(tmp) |
2962 { | 2962 { |
2963 if(tmp->message == NM_DBLCLK && tmp->window == hWnd) | 2963 if(tmp->message == NM_DBLCLK && tmp->window == hWnd) |
2964 { | 2964 { |
2965 int (*containerselectfunc)(HWND, char *, void *) = tmp->signalfunction; | 2965 int (DWSIGNAL *containerselectfunc)(HWND, char *, void *) = tmp->signalfunction; |
2966 | 2966 |
2967 /* Seems to be having lParam as 1 which really sucks */ | 2967 /* Seems to be having lParam as 1 which really sucks */ |
2968 if(lvi.lParam < 100) | 2968 if(lvi.lParam < 100) |
2969 lvi.lParam = 0; | 2969 lvi.lParam = 0; |
2970 | 2970 |
2983 | 2983 |
2984 while(tmp) | 2984 while(tmp) |
2985 { | 2985 { |
2986 if(tmp->message == NM_RCLICK && tmp->window == hWnd) | 2986 if(tmp->message == NM_RCLICK && tmp->window == hWnd) |
2987 { | 2987 { |
2988 int (*containercontextfunc)(HWND, char *, int, int, void *, void *) = tmp->signalfunction; | 2988 int (DWSIGNAL *containercontextfunc)(HWND, char *, int, int, void *, void *) = tmp->signalfunction; |
2989 LONG x,y; | 2989 LONG x,y; |
2990 LV_ITEM lvi; | 2990 LV_ITEM lvi; |
2991 int iItem; | 2991 int iItem; |
2992 LVHITTESTINFO lhi; | 2992 LVHITTESTINFO lhi; |
2993 | 2993 |
3541 /* Find any callbacks for this function */ | 3541 /* Find any callbacks for this function */ |
3542 while(tmp) | 3542 while(tmp) |
3543 { | 3543 { |
3544 if(tmp->message == WM_COMMAND) | 3544 if(tmp->message == WM_COMMAND) |
3545 { | 3545 { |
3546 int (*clickfunc)(HWND, void *) = tmp->signalfunction; | 3546 int (DWSIGNAL *clickfunc)(HWND, void *) = tmp->signalfunction; |
3547 | 3547 |
3548 /* Make sure it's the right window, and the right ID */ | 3548 /* Make sure it's the right window, and the right ID */ |
3549 if(tmp->window == hwnd) | 3549 if(tmp->window == hwnd) |
3550 { | 3550 { |
3551 int checkbox = DW_POINTER_TO_INT(dw_window_get_data(hwnd, "_dw_checkbox")); | 3551 int checkbox = DW_POINTER_TO_INT(dw_window_get_data(hwnd, "_dw_checkbox")); |
3577 /* Find any callbacks for this function */ | 3577 /* Find any callbacks for this function */ |
3578 while(tmp) | 3578 while(tmp) |
3579 { | 3579 { |
3580 if(tmp->message == WM_COMMAND) | 3580 if(tmp->message == WM_COMMAND) |
3581 { | 3581 { |
3582 int (*clickfunc)(HWND, void *) = tmp->signalfunction; | 3582 int (DWSIGNAL *clickfunc)(HWND, void *) = tmp->signalfunction; |
3583 | 3583 |
3584 /* Make sure it's the right window, and the right ID */ | 3584 /* Make sure it's the right window, and the right ID */ |
3585 if(tmp->window == hwnd) | 3585 if(tmp->window == hwnd) |
3586 { | 3586 { |
3587 retval = clickfunc(tmp->window, tmp->data); | 3587 retval = clickfunc(tmp->window, tmp->data); |
11912 | 11912 |
11913 typedef struct _dwprint | 11913 typedef struct _dwprint |
11914 { | 11914 { |
11915 PRINTDLG pd; | 11915 PRINTDLG pd; |
11916 DOCINFO di; | 11916 DOCINFO di; |
11917 int (*drawfunc)(HPRINT, HPIXMAP, int, void *); | 11917 int (DWSIGNAL *drawfunc)(HPRINT, HPIXMAP, int, void *); |
11918 void *drawdata; | 11918 void *drawdata; |
11919 unsigned long flags; | 11919 unsigned long flags; |
11920 } DWPrint; | 11920 } DWPrint; |
11921 | 11921 |
11922 /* | 11922 /* |
12370 | 12370 |
12371 while(tmp) | 12371 while(tmp) |
12372 { | 12372 { |
12373 if(((window < (HWND)65536 && (int)(intptr_t)window == tmp->id) || tmp->window == window) && tmp->message == message) | 12373 if(((window < (HWND)65536 && (int)(intptr_t)window == tmp->id) || tmp->window == window) && tmp->message == message) |
12374 { | 12374 { |
12375 void (*discfunc)(HWND, void *) = (void (*)(HWND, void *))tmp->discfunction; | 12375 void (DWSIGNAL *discfunc)(HWND, void *) = (void (*)(HWND, void *))tmp->discfunction; |
12376 | 12376 |
12377 if(discfunc) | 12377 if(discfunc) |
12378 { | 12378 { |
12379 discfunc(tmp->window, tmp->data); | 12379 discfunc(tmp->window, tmp->data); |
12380 } | 12380 } |
12411 | 12411 |
12412 while(tmp) | 12412 while(tmp) |
12413 { | 12413 { |
12414 if((window < (HWND)65536 && (int)(intptr_t)window == tmp->id) || tmp->window == window) | 12414 if((window < (HWND)65536 && (int)(intptr_t)window == tmp->id) || tmp->window == window) |
12415 { | 12415 { |
12416 void (*discfunc)(HWND, void *) = (void (*)(HWND, void *))tmp->discfunction; | 12416 void (DWSIGNAL *discfunc)(HWND, void *) = (void (*)(HWND, void *))tmp->discfunction; |
12417 | 12417 |
12418 if(discfunc) | 12418 if(discfunc) |
12419 { | 12419 { |
12420 discfunc(tmp->window, tmp->data); | 12420 discfunc(tmp->window, tmp->data); |
12421 } | 12421 } |
12453 | 12453 |
12454 while(tmp) | 12454 while(tmp) |
12455 { | 12455 { |
12456 if(((window < (HWND)65536 && (int)(intptr_t)window == tmp->id) || tmp->window == window) && tmp->data == data) | 12456 if(((window < (HWND)65536 && (int)(intptr_t)window == tmp->id) || tmp->window == window) && tmp->data == data) |
12457 { | 12457 { |
12458 void (*discfunc)(HWND, void *) = (void (*)(HWND, void *))tmp->discfunction; | 12458 void (DWSIGNAL *discfunc)(HWND, void *) = (void (*)(HWND, void *))tmp->discfunction; |
12459 | 12459 |
12460 if(discfunc) | 12460 if(discfunc) |
12461 { | 12461 { |
12462 discfunc(tmp->window, tmp->data); | 12462 discfunc(tmp->window, tmp->data); |
12463 } | 12463 } |