From 57948a37464ac988332bb7889fc6de0eeec39daf Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Thu, 1 Dec 2005 01:22:23 +0000 Subject: [project @ 2005-12-01 01:22:23 by rjw] Add function to check for specific window furniture svn path=/import/netsurf/; revision=1889 --- riscos/wimp.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'riscos/wimp.c') diff --git a/riscos/wimp.c b/riscos/wimp.c index 6e7624be2..820835b58 100644 --- a/riscos/wimp.c +++ b/riscos/wimp.c @@ -850,3 +850,25 @@ void ro_gui_wimp_update_window_furniture(wimp_w w, wimp_window_flags bic_mask, } } } + + +/** + * Checks whether a piece of window furniture is present for a window. + * + * \param w the window to modify + * \param mask the furniture flags to check + */ +bool ro_gui_wimp_check_window_furniture(wimp_w w, wimp_window_flags mask) { + wimp_window_state state; + os_error *error; + + state.w = w; + error = xwimp_get_window_state(&state); + if (error) { + LOG(("xwimp_get_window_state: 0x%x: %s", + error->errnum, error->errmess)); + warn_user("WimpError", error->errmess); + return false; + } + return state.flags & mask; +} -- cgit v1.2.3