comparison win/dw.c @ 346:81fae15885d7

Implemented switch-page on OS/2, and changed the signal prototype to unsigned long instead of int. Also dw_notebook_page_query should return unsigned long as well.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 11 Apr 2003 13:35:50 +0000
parents 6a374f337d1f
children 2216e65ad2ae
comparison
equal deleted inserted replaced
345:599644ca9064 346:81fae15885d7
1579 else if(tmp->message == TCN_SELCHANGE) 1579 else if(tmp->message == TCN_SELCHANGE)
1580 { 1580 {
1581 NMHDR FAR *tem=(NMHDR FAR *)mp2; 1581 NMHDR FAR *tem=(NMHDR FAR *)mp2;
1582 if(tmp->window == tem->hwndFrom && tem->code == tmp->message) 1582 if(tmp->window == tem->hwndFrom && tem->code == tmp->message)
1583 { 1583 {
1584 int (*switchpagefunc)(HWND, int, void *) = tmp->signalfunction; 1584 int (*switchpagefunc)(HWND, unsigned long, void *) = tmp->signalfunction;
1585 int num=dw_notebook_page_query(tem->hwndFrom); 1585 unsigned long num=dw_notebook_page_query(tem->hwndFrom);
1586 result = switchpagefunc(tem->hwndFrom, num, tmp->data); 1586 result = switchpagefunc(tem->hwndFrom, num, tmp->data);
1587 tmp = NULL;
1587 } 1588 }
1588 } 1589 }
1589 } 1590 }
1590 break; 1591 break;
1591 case WM_COMMAND: 1592 case WM_COMMAND:
5053 /* 5054 /*
5054 * Queries the currently visible page ID. 5055 * Queries the currently visible page ID.
5055 * Parameters: 5056 * Parameters:
5056 * handle: Handle to the notebook widget. 5057 * handle: Handle to the notebook widget.
5057 */ 5058 */
5058 unsigned int API dw_notebook_page_query(HWND handle) 5059 unsigned long API dw_notebook_page_query(HWND handle)
5059 { 5060 {
5060 NotebookPage **array = (NotebookPage **)dw_window_get_data(handle, "_dw_array"); 5061 NotebookPage **array = (NotebookPage **)dw_window_get_data(handle, "_dw_array");
5061 int physid = TabCtrl_GetCurSel(handle); 5062 int physid = TabCtrl_GetCurSel(handle);
5062 5063
5063 if(physid > -1 && physid < 256 && array && array[physid]) 5064 if(physid > -1 && physid < 256 && array && array[physid])