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

    File:    Window.IsOpen.c
    Author:  Copyright  1995 Mike Smith
    Version: 1.01 (10 Nov 1995)
    Purpose: Finds whether a window is open.
    History: 1.00 (Nov 1995)    - MS
             1.01 (10 Nov 1995) - JS - tidied up a bit and added error 
                                       handling.
*/

#include "Desk.Error2.h"
#include "Desk.Window.h"


Desk_bool Desk_Window_IsOpen( Desk_window_handle window)
{
  Desk_window_state state;
  Desk_Wimp_GetWindowState(window, &state);
  return (state.flags.data.open) ? Desk_bool_TRUE : Desk_bool_FALSE;
}
