Make the SPACE_RenderBox compatibility functions public

This commit is contained in:
Chris Young 2014-11-15 13:52:06 +00:00
parent e909c93804
commit b2fd904eef
2 changed files with 20 additions and 3 deletions

View File

@ -1201,7 +1201,8 @@ static void ami_update_quals(struct gui_window_2 *gwin)
}
}
static nserror ami_gui_get_space_box(Object *obj, struct IBox **bbox)
/* exported interface documented in amiga/gui.h */
nserror ami_gui_get_space_box(Object *obj, struct IBox **bbox)
{
if(LIB_IS_AT_LEAST((struct Library *)SpaceBase, 53, 6)) {
*bbox = AllocVecTagList(sizeof(struct IBox), NULL);
@ -1214,14 +1215,14 @@ static nserror ami_gui_get_space_box(Object *obj, struct IBox **bbox)
return NSERROR_OK;
}
static void ami_gui_free_space_box(struct IBox *bbox)
/* exported interface documented in amiga/gui.h */
void ami_gui_free_space_box(struct IBox *bbox)
{
if(LIB_IS_AT_LEAST((struct Library *)SpaceBase, 53, 6)) {
FreeVec(bbox);
}
}
static bool ami_spacebox_to_ns_coords(struct gui_window_2 *gwin, int *x, int *y,
int space_x, int space_y)
{

View File

@ -171,6 +171,22 @@ nserror ami_gui_new_blank_tab(struct gui_window_2 *gwin);
char *ami_gui_get_cache_favicon_name(nsurl *url, bool only_if_avail);
int ami_gui_count_windows(int window, int *tabs);
/**
* Compatibility function to get space.gadget render area.
*
* @param obj A space.gadget object.
* @param bbox A pointer to a struct IBox *.
* @return error status.
*/
nserror ami_gui_get_space_box(Object *obj, struct IBox **bbox);
/**
* Free any data obtained via ami_gui_get_space_box().
*
* @param bbox A pointer to a struct IBox.
*/
void ami_gui_free_space_box(struct IBox *bbox);
struct TextFont *origrpfont;
struct MinList *window_list;
struct Screen *scrn;