Add a few functions for front ends to use.

This commit is contained in:
Michael Drake 2013-08-28 14:23:22 +01:00
parent 91018643db
commit bd39d108db
6 changed files with 70 additions and 3 deletions

View File

@ -844,3 +844,17 @@ void cookie_manager_keypress(uint32_t key)
treeview_keypress(cm_ctx.tree, key);
}
/* Exported interface, documented in cookie_manager.h */
bool cookie_manager_has_selection(void)
{
return treeview_has_selection(cm_ctx.tree);
}
/* Exported interface, documented in cookie_manager.h */
int cookie_manager_get_height(void)
{
return treeview_get_height(cm_ctx.tree);
}

View File

@ -90,7 +90,6 @@ void cookie_manager_redraw(int x, int y, struct rect *clip,
*/
void cookie_manager_mouse_action(browser_mouse_state mouse, int x, int y);
/**
* Key press handling.
*
@ -99,4 +98,18 @@ void cookie_manager_mouse_action(browser_mouse_state mouse, int x, int y);
*/
void cookie_manager_keypress(uint32_t key);
/**
* Determine whether there is a selection
*
* \return true iff there is a selection
*/
bool cookie_manager_has_selection(void);
/**
* Find current height
*
* \return height in px
*/
int cookie_manager_get_height(void);
#endif

View File

@ -949,3 +949,17 @@ void global_history_keypress(uint32_t key)
treeview_keypress(gh_ctx.tree, key);
}
/* Exported interface, documented in global_history.h */
bool global_history_has_selection(void)
{
return treeview_has_selection(gh_ctx.tree);
}
/* Exported interface, documented in global_history.h */
int global_history_get_height(void)
{
return treeview_get_height(gh_ctx.tree);
}

View File

@ -90,7 +90,6 @@ void global_history_redraw(int x, int y, struct rect *clip,
*/
void global_history_mouse_action(browser_mouse_state mouse, int x, int y);
/**
* Key press handling.
*
@ -99,4 +98,18 @@ void global_history_mouse_action(browser_mouse_state mouse, int x, int y);
*/
void global_history_keypress(uint32_t key);
/**
* Determine whether there is a selection
*
* \return true iff there is a selection
*/
bool global_history_has_selection(void);
/**
* Find current height
*
* \return height in px
*/
int global_history_get_height(void);
#endif

View File

@ -505,3 +505,10 @@ void sslcert_viewer_keypress(struct sslcert_session_data *ssl_d,
{
treeview_keypress(ssl_d->tree, key);
}
/* Exported interface, documented in sslcert_viewer.h */
int sslcert_viewer_get_height(struct sslcert_session_data *ssl_d)
{
return treeview_get_height(ssl_d->tree);
}

View File

@ -111,7 +111,6 @@ void sslcert_viewer_redraw(struct sslcert_session_data *ssl_d,
void sslcert_viewer_mouse_action(struct sslcert_session_data *ssl_d,
browser_mouse_state mouse, int x, int y);
/**
* Key press handling.
*
@ -122,4 +121,11 @@ void sslcert_viewer_mouse_action(struct sslcert_session_data *ssl_d,
void sslcert_viewer_keypress(struct sslcert_session_data *ssl_d,
uint32_t key);
/**
* Find current height
*
* \return height in px
*/
int sslcert_viewer_get_height(struct sslcert_session_data *ssl_d);
#endif