dlls/winemac.drv/window.c
/***********************************************************************
 *              macdrv_window_to_mac_rect
 *
 * Convert a rect from client to Mac window coordinates
 */
macdrv_window_to_mac_rect
Convert a rect from client to Mac window coordinates
macdrv_window_to_mac_rect Convert a rect from client to Mac window coordinates
static void macdrv_window_to_mac_rect(struct macdrv_win_data *data, DWORD style, RECT *rect)
{
    RECT rc;
    if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return;
    if (IsRectEmpty(rect)) return;
    get_mac_rect_offset(data, style, &rc);
    rect->left   -= rc.left;
    rect->right  -= rc.right;
    rect->top    -= rc.top;
    rect->bottom -= rc.bottom;
    if (rect->top >= rect->bottom) rect->bottom = rect->top + 1;
    if (rect->left >= rect->right) rect->right = rect->left + 1;
}
static void macdrv_window_to_mac_rect ( struct macdrv_win_data * data , DWORD style , RECT * rect ) { RECT rc ; if ( ( style & ( WS_POPUP | WS_CHILD ) ) == WS_CHILD ) return ; if ( IsRectEmpty ( rect ) ) return ; get_mac_rect_offset ( data , style , & rc ) ; rect -> left -= rc . left ; rect -> right -= rc . right ; rect -> top -= rc . top ; rect -> bottom -= rc . bottom ; if ( rect -> top >= rect -> bottom ) rect -> bottom = rect -> top + 1 ; if ( rect -> left >= rect -> right ) rect -> right = rect -> left + 1 ; }
macdrv_window_to_mac_rect
 Convert a rect from client to Mac window coordinates
macdrv_window_to_mac_rect Convert a rect from client to Mac window coordinates