bool GUIGetMousePosn( gui_window *wnd, gui_point *point ) { WPI_POINT pt; if( !_wpi_getsystemmetrics( SM_MOUSEPRESENT ) ) { return( false ); } _wpi_getcursorpos( &pt ); #ifdef __OS2_PM__ // close your eyes!!! gross hack coming up _wpi_screentoclient( wnd->hwnd, &pt ); pt.y = _wpi_cvtc_y( wnd->hwnd, pt.y ); _wpi_clienttoscreen( wnd->hwnd, &pt ); #endif GUIMakeRelative( wnd, &pt, point ); return( true ); }
bool SendPointEvent( WPI_PARAM1 wparam, WPI_PARAM2 lparam, gui_window *wnd, gui_event gui_ev, bool force_current ) { WPI_POINT currentpoint; gui_point point; if( force_current || !EditControlHasFocus ) { wparam = wparam; lparam = lparam; currentpoint.x = GET_WM_MOUSEMOVE_POSX( wparam, lparam ); currentpoint.y = GET_WM_MOUSEMOVE_POSY( wparam, lparam ); if( force_current && ( GUICurrWnd != wnd ) && ( GUICurrWnd != NULL ) ) { //wnd = GUICurrWnd; } currentpoint.y = _wpi_cvtc_y( wnd->hwnd, currentpoint.y ); _wpi_clienttoscreen( wnd->hwnd, ¤tpoint ); GUIMakeRelative( wnd, ¤tpoint, &point ); GUIEVENTWND( wnd, gui_ev, &point ); return( TRUE ); } return( FALSE ); }