/*
    ####             #    #     # #
    #   #            #    #       #          The FreeWare C library for 
    #   #  ##   ###  #  # #     # ###             RISC OS machines
    #   # #  # #     # #  #     # #  #   ___________________________________
    #   # ####  ###  ##   #     # #  #                                      
    #   # #        # # #  #     # #  #    Please refer to the accompanying
    ####   ### ####  #  # ##### # ###    documentation for conditions of use
    ________________________________________________________________________

    File:    Coord.Convert0.c
    Author:  Copyright  1992 Jason Williams
    Version: 1.01 (26 Apr 1992)
    Purpose: Window <--> Screen coordinate conversion routines
*/


#include "Desk.Core.h"
#include "Desk.Wimp.h"
#include "Desk.Coord.h"

/*  Note: The window workarea origin (0, 0) is at the TOP LEFT corner of the
 *        work area.
 */


extern void Desk_Coord_WindowOrigin(Desk_wimp_point *origin, const Desk_convert_block *convert)
{
  origin->x = convert->screenrect.min.x - convert->scroll.x;
  origin->y = convert->screenrect.max.y - convert->scroll.y;
}
