NetSurf
Macros | Functions | Variables
url_suggest.h File Reference

URL Suggestion Menu (interface). More...

#include "oslib/wimp.h"
Include dependency graph for url_suggest.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define URL_SUGGEST_MAX_URLS   16
 

Functions

bool ro_gui_url_suggest_init (void)
 
bool ro_gui_url_suggest_get_menu_available (void)
 Check if there is a URL suggestion menu available for use. More...
 
bool ro_gui_url_suggest_prepare_menu (void)
 Builds the URL suggestion menu. More...
 
const char * ro_gui_url_suggest_get_selection (wimp_selection *selection)
 Process a selection from the URL Suggest menu. More...
 

Variables

wimp_menu * ro_gui_url_suggest_menu
 

Detailed Description

URL Suggestion Menu (interface).

Definition in file url_suggest.h.

Macro Definition Documentation

◆ URL_SUGGEST_MAX_URLS

#define URL_SUGGEST_MAX_URLS   16

Definition at line 28 of file url_suggest.h.

Function Documentation

◆ ro_gui_url_suggest_get_menu_available()

bool ro_gui_url_suggest_get_menu_available ( void  )

Check if there is a URL suggestion menu available for use.

Todo:
Ideally this should be able to decide if there's a menu available without actually having to build it all.
Returns
true if the menu has entries; else false.

Definition at line 81 of file url_suggest.c.

References ro_gui_url_suggest_prepare_menu().

Referenced by ro_gui_url_bar_update_urlsuggest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_url_suggest_get_selection()

const char * ro_gui_url_suggest_get_selection ( wimp_selection *  selection)

Process a selection from the URL Suggest menu.

Parameters
*selectionThe menu selection.
Returns
Pointer to the URL that was selected, or NULL for none.

Definition at line 230 of file url_suggest.c.

References ro_gui_url_suggest_menu, and url_suggest_item::url.

Referenced by ro_gui_url_bar_menu_select().

Here is the caller graph for this function:

◆ ro_gui_url_suggest_init()

bool ro_gui_url_suggest_init ( void  )

Referenced by ro_gui_menu_init().

Here is the caller graph for this function:

◆ ro_gui_url_suggest_prepare_menu()

bool ro_gui_url_suggest_prepare_menu ( void  )

Builds the URL suggestion menu.

This is called by ro_gui_menu_create() when it is asked to display the url_suggest_menu.

/return true if the menu has entries; else false.

Definition at line 94 of file url_suggest.c.

References url_suggest_item::next, ro_gui_url_suggest_callback(), ro_gui_url_suggest_menu, suggest_entries, suggest_list, suggest_time, url_suggest_item::url, URL_SUGGEST_MAX_URLS, and urldb_iterate_entries().

Referenced by ro_gui_dialog_open_url_menu_prepare(), ro_gui_dialog_prepare_open_url(), ro_gui_options_home_initialise(), ro_gui_options_home_menu_prepare(), ro_gui_url_bar_menu_prepare(), and ro_gui_url_suggest_get_menu_available().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ro_gui_url_suggest_menu

wimp_menu* ro_gui_url_suggest_menu
extern