mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-12 05:49:19 +03:00
[project @ 2005-12-01 01:22:23 by rjw]
Add function to check for specific window furniture svn path=/import/netsurf/; revision=1889
This commit is contained in:
parent
adc0083ef4
commit
57948a3746
@ -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;
|
||||
}
|
||||
|
@ -55,5 +55,6 @@ void ro_gui_set_icon_colours(wimp_w window, wimp_i icon,
|
||||
void ro_gui_user_redraw(wimp_draw *redraw, bool user_fill, os_colour user_colour);
|
||||
void ro_gui_wimp_update_window_furniture(wimp_w w, wimp_window_flags bic_mask,
|
||||
wimp_window_flags xor_mask);
|
||||
bool ro_gui_wimp_check_window_furniture(wimp_w w, wimp_window_flags mask);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user