mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
Add a few functions for front ends to use.
This commit is contained in:
parent
91018643db
commit
bd39d108db
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user