comparison os2/dw.c @ 311:24c1dfffe97e

Unified the callback functions for tree and container widgets.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 31 Mar 2003 09:57:45 +0000
parents 77105fe19c1f
children 41b890c649e7
comparison
equal deleted inserted replaced
310:77105fe19c1f 311:24c1dfffe97e
2145 { 2145 {
2146 PCNRITEM pci = (PCNRITEM)pre->pRecord; 2146 PCNRITEM pci = (PCNRITEM)pre->pRecord;
2147 2147
2148 if(pci && pre->fEmphasisMask & CRA_CURSORED && (pci->rc.flRecordAttr & CRA_CURSORED)) 2148 if(pci && pre->fEmphasisMask & CRA_CURSORED && (pci->rc.flRecordAttr & CRA_CURSORED))
2149 { 2149 {
2150 int (* API treeselectfunc)(HWND, HWND, char *, void *, void *) = (int (* API)(HWND, HWND, char *, void *, void *))tmp->signalfunction;
2151
2150 if(dw_window_get_data(tmp->window, "_dw_container")) 2152 if(dw_window_get_data(tmp->window, "_dw_container"))
2151 { 2153 result = treeselectfunc(tmp->window, 0, pci->rc.pszIcon, tmp->data, 0);
2152 int (* API containerselectfunc)(HWND, char *, void *) = (int (* API)(HWND, char *, void *))tmp->signalfunction;
2153
2154 result = containerselectfunc(tmp->window, pci->rc.pszIcon, tmp->data);
2155 }
2156 else 2154 else
2157 { 2155 {
2158 int (* API treeselectfunc)(HWND, HWND, char *, void *, void *) = (int (* API)(HWND, HWND, char *, void *, void *))tmp->signalfunction;
2159
2160 if(lasthcnr == tmp->window && lastitem == (HWND)pci) 2156 if(lasthcnr == tmp->window && lastitem == (HWND)pci)
2161 { 2157 {
2162 lasthcnr = 0; 2158 lasthcnr = 0;
2163 lastitem = 0; 2159 lastitem = 0;
2164 } 2160 }
2165 else 2161 else
2166 { 2162 {
2167 lasthcnr = tmp->window; 2163 lasthcnr = tmp->window;
2168 lastitem = (HWND)pci; 2164 lastitem = (HWND)pci;
2169 result = treeselectfunc(tmp->window, (HWND)pci, pci->rc.pszIcon, pci->user, tmp->data); 2165 result = treeselectfunc(tmp->window, (HWND)pci, pci->rc.pszIcon, tmp->data, pci->user);
2170 } 2166 }
2171 } 2167 }
2172 tmp = NULL; 2168 tmp = NULL;
2173 } 2169 }
2174 } 2170 }