FindController

A #WebKitFindController is used to search text in a #WebKitWebView. You can get a #WebKitWebView<!-- -->'s #WebKitFindController with webkit_web_view_get_find_controller(), and later use it to search for text using webkit_find_controller_search(), or get the number of matches using webkit_find_controller_count_matches(). The operations are asynchronous and trigger signals when ready, such as #WebKitFindController::found-text, #WebKitFindController::failed-to-find-text or #WebKitFindController::counted-matches<!-- -->.

Constructors

this
this(WebKitFindController* webKitFindController, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

addOnCountedMatches
gulong addOnCountedMatches(void delegate(uint, FindController) dlg, ConnectFlags connectFlags)

This signal is emitted when the #WebKitFindController has counted the number of matches for a given text after a call to webkit_find_controller_count_matches().

addOnFailedToFindText
gulong addOnFailedToFindText(void delegate(FindController) dlg, ConnectFlags connectFlags)

This signal is emitted when a search operation does not find any result for the given text. It will be issued if the text is not found asynchronously after a call to webkit_find_controller_search(), webkit_find_controller_search_next() or webkit_find_controller_search_previous().

addOnFoundText
gulong addOnFoundText(void delegate(uint, FindController) dlg, ConnectFlags connectFlags)

This signal is emitted when a given text is found in the web page text. It will be issued if the text is found asynchronously after a call to webkit_find_controller_search(), webkit_find_controller_search_next() or webkit_find_controller_search_previous().

countMatches
void countMatches(string searchText, uint findOptions, uint maxMatchCount)

Counts the number of matches for @search_text found in the #WebKitWebView with the provided @find_options. The number of matches will be provided by the #WebKitFindController::counted-matches signal.

getFindControllerStruct
WebKitFindController* getFindControllerStruct(bool transferOwnership)

Get the main Gtk struct

getMaxMatchCount
uint getMaxMatchCount()

Gets the maximum number of matches to report during a text lookup. This number is passed as the last argument of webkit_find_controller_search() or webkit_find_controller_count_matches().

getOptions
uint getOptions()

Gets a bitmask containing the #WebKitFindOptions associated with the current search.

getSearchText
string getSearchText()

Gets the text that @find_controller is currently searching for. This text is passed to either webkit_find_controller_search() or webkit_find_controller_count_matches().

getStruct
void* getStruct()

the main Gtk struct as a void*

getWebView
WebView getWebView()

Gets the #WebKitWebView this find controller is associated to. Do not dereference the returned instance as it belongs to the #WebKitFindController.

search
void search(string searchText, uint findOptions, uint maxMatchCount)

Looks for @search_text in the #WebKitWebView associated with @find_controller since the beginning of the document highlighting up to @max_match_count matches. The outcome of the search will be asynchronously provided by the #WebKitFindController::found-text and #WebKitFindController::failed-to-find-text signals.

searchFinish
void searchFinish()

Finishes a find operation started by webkit_find_controller_search(). It will basically unhighlight every text match found.

searchNext
void searchNext()

Looks for the next occurrence of the search text.

searchPrevious
void searchPrevious()

Looks for the previous occurrence of the search text.

Static functions

getType
GType getType()

Variables

webKitFindController
WebKitFindController* webKitFindController;

the main Gtk struct

Meta