NetSurf
Functions
url_complete.h File Reference

Central repository for URL data (interface). More...

#include <stdbool.h>
#include <oslib/wimp.h>
Include dependency graph for url_complete.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ro_gui_url_complete_start (struct toolbar *toolbar)
 Should be called when the caret is placed into a URL completion icon. More...
 
bool ro_gui_url_complete_keypress (struct toolbar *toolbar, uint32_t key)
 Handles a keypress for URL completion. More...
 
void ro_gui_url_complete_resize (struct toolbar *toolbar, wimp_open *open)
 Move and resize the url completion window to match the toolbar. More...
 
bool ro_gui_url_complete_close (void)
 Try to close the current url completion window. More...
 
void ro_gui_url_complete_redraw (wimp_draw *redraw)
 Redraws a section of the URL completion window. More...
 
void ro_gui_url_complete_entering (wimp_entering *entering)
 Handle the pointer entering the URL completion window. More...
 
bool ro_gui_url_complete_click (wimp_pointer *pointer)
 Handle mouse clicks in the URL completion window. More...
 

Detailed Description

Central repository for URL data (interface).

Definition in file url_complete.h.

Function Documentation

◆ ro_gui_url_complete_click()

bool ro_gui_url_complete_click ( wimp_pointer *  pointer)

Handle mouse clicks in the URL completion window.

Parameters
pointerthe pointer state
Returns
whether the click was handled
Todo:
The interaction of components here is hideous

Definition at line 667 of file url_complete.c.

References browser_window_navigate(), gui_window::bw, BW_NAVIGATE_HISTORY, dialog_url_complete, mouse_x, mouse_y, NSLOG, nsurl_access(), ro_gui_url_complete_close(), ro_gui_url_complete_keypress(), ro_gui_window_lookup(), ro_toolbar_get_url(), ro_toolbar_set_url(), ro_warn_user(), gui_window::state, gui_window::toolbar, gui_window::url, url_complete_matches, url_complete_matches_selection, url_complete_original_url, and url_complete_parent.

Referenced by ro_gui_dialog_init(), and ro_gui_url_complete_mouse_at().

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

◆ ro_gui_url_complete_close()

bool ro_gui_url_complete_close ( void  )

Try to close the current url completion window.

Returns
whether the window was closed

Definition at line 497 of file url_complete.c.

References dialog_url_complete, NSLOG, ro_warn_user(), url_complete_keypress_selection, url_complete_matched_string, url_complete_matches, url_complete_matches_allocated, url_complete_matches_available, url_complete_matches_selection, url_complete_original_url, and url_complete_parent.

Referenced by gui_window_destroy(), ro_gui_url_complete_click(), ro_gui_url_complete_keypress(), ro_gui_url_complete_resize(), ro_gui_url_complete_start(), ro_gui_window_click(), ro_gui_window_handle_local_keypress(), ro_gui_window_launch_url(), ro_gui_window_menu_prepare(), and ro_toolbar_click().

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

◆ ro_gui_url_complete_entering()

void ro_gui_url_complete_entering ( wimp_entering *  entering)

Handle the pointer entering the URL completion window.

Parameters
*enteringThe pointer entering data block.

Definition at line 641 of file url_complete.c.

References ro_gui_url_complete_mouse_at(), and ro_mouse_track_start().

Referenced by ro_gui_dialog_init().

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

◆ ro_gui_url_complete_keypress()

bool ro_gui_url_complete_keypress ( struct toolbar toolbar,
uint32_t  key 
)

Handles a keypress for URL completion.

Parameters
*toolbarThe toolbar to be updated.
keythe key pressed (as UTF32 code or wimp key + bit31 set)
Returns
true to indicate keypress handled; else false.

Definition at line 100 of file url_complete.c.

References dialog_url_complete, height, IS_WIMP_KEY, MAXIMUM_VISIBLE_LINES, NSLOG, nsoption_bool, nsurl_access(), parent, PTR_WIMP_OPEN, ro_gui_url_complete_close(), ro_gui_url_complete_resize(), ro_toolbar_get_display_url(), ro_toolbar_get_parent_window(), ro_toolbar_get_url(), ro_toolbar_set_url(), ro_warn_user(), url_complete_callback(), url_complete_keypress_selection, url_complete_matched_string, url_complete_matches, url_complete_matches_allocated, url_complete_matches_available, url_complete_matches_reset, url_complete_matches_selection, url_complete_memory_exhausted, url_complete_original_url, url_complete_parent, url_complete_redraw, urldb_iterate_entries(), and urldb_iterate_partial().

Referenced by ro_gui_url_complete_click(), ro_gui_window_handle_local_keypress(), and ro_toolbar_keypress().

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

◆ ro_gui_url_complete_redraw()

void ro_gui_url_complete_redraw ( wimp_draw *  redraw)

Redraws a section of the URL completion window.

Parameters
redrawthe area to redraw

Definition at line 537 of file url_complete.c.

References line(), NSLOG, nsurl_access(), nsurl_length(), ro_content_filetype_from_type(), ro_gui_user_redraw(), ro_gui_wimp_sprite_exists(), ro_warn_user(), type, url_data::type, url_complete_icon, url_complete_icon_null, url_complete_icon_sprite, url_complete_matches, url_complete_matches_selection, url_complete_sprite, and urldb_get_url_data().

Referenced by ro_gui_dialog_init().

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

◆ ro_gui_url_complete_resize()

void ro_gui_url_complete_resize ( struct toolbar toolbar,
wimp_open *  open 
)

Move and resize the url completion window to match the toolbar.

Parameters
*toolbarThe toolbar to update
*openthe wimp_open request (updated on exit)

Definition at line 398 of file url_complete.c.

References dialog_url_complete, MAXIMUM_VISIBLE_LINES, NSLOG, ro_get_vscroll_width(), ro_gui_url_complete_close(), ro_toolbar_get_display_url(), ro_toolbar_get_url_field_extent(), ro_toolbar_get_window(), ro_warn_user(), url_complete_matches, url_complete_matches_available, url_complete_matches_reset, and url_complete_parent.

Referenced by ro_gui_url_complete_keypress(), and ro_gui_window_open().

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

◆ ro_gui_url_complete_start()

void ro_gui_url_complete_start ( struct toolbar toolbar)

Should be called when the caret is placed into a URL completion icon.

Parameters
*toolbarThe toolbar to initialise URL completion for.

Definition at line 76 of file url_complete.c.

References parent, ro_gui_url_complete_close(), ro_toolbar_get_display_url(), ro_toolbar_get_parent_window(), ro_toolbar_get_url(), url_complete_matched_string, and url_complete_parent.

Referenced by gui_window_create(), ro_gui_window_handle_local_keypress(), ro_gui_window_set_url(), and ro_toolbar_click().

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