NetSurf
|
#include <stdbool.h>
#include "oslib/wimp.h"
Go to the source code of this file.
Data Structures | |
struct | query_callback |
Macros | |
#define | QUERY_INVALID ((query_id)-1) |
Typedefs | |
typedef int | query_id |
Enumerations | |
enum | query_response { QUERY_CONTINUE , QUERY_YES , QUERY_NO , QUERY_ESCAPE } |
Functions | |
query_id | query_user_xy (const char *query, const char *detail, const query_callback *cb, void *pw, const char *yes, const char *no, int x, int y) |
Display a query to the user, requesting a response, at a specified screen position (x,y). More... | |
void | ro_gui_query_init (void) |
void | ro_gui_query_window_bring_to_front (query_id id) |
query_id | query_user (const char *query, const char *detail, const query_callback *cb, void *pw, const char *yes, const char *no) |
Display a query to the user, requesting a response, near the current pointer position to keep the required mouse travel small, but also protecting against spurious mouse clicks. More... | |
void | query_close (query_id) |
Close a query window without waiting for a response from the user. More... | |
enum query_response |
void query_close | ( | query_id | id | ) |
Close a query window without waiting for a response from the user.
(should normally only be called if the user has responded in some other way of which the query window in unaware.)
id | id of query window to close |
Definition at line 293 of file query.c.
References ro_gui_query_close(), ro_gui_query_window_lookup_id(), and gui_query_window::window.
Referenced by ro_gui_download_window_destroy(), ro_gui_download_window_destroy_wrapper(), and ro_gui_hotlist_remove_page().
query_id query_user | ( | const char * | query, |
const char * | detail, | ||
const query_callback * | cb, | ||
void * | pw, | ||
const char * | yes, | ||
const char * | no | ||
) |
Display a query to the user, requesting a response, near the current pointer position to keep the required mouse travel small, but also protecting against spurious mouse clicks.
query | message token of query |
detail | parameter used in expanding tokenised message |
cb | table of callback functions to be called when user responds |
pw | handle to be passed to callback functions |
yes | text to use for 'Yes' button' (or NULL for default) |
no | text to use for 'No' button (or NULL for default) |
Definition at line 112 of file query.c.
References gui_query_window::cb, gui_query_window::pw, and query_user_xy().
Referenced by ro_gui_download_save(), ro_gui_download_window_destroy(), ro_gui_hotlist_remove_page(), and ro_gui_save_content().
query_id query_user_xy | ( | const char * | query, |
const char * | detail, | ||
const query_callback * | cb, | ||
void * | pw, | ||
const char * | yes, | ||
const char * | no, | ||
int | x, | ||
int | y | ||
) |
Display a query to the user, requesting a response, at a specified screen position (x,y).
The window is positioned relative to the given location such that the required mouse travel is small, but non-zero for protection spurious double-clicks.
query | message token of query |
detail | parameter used in expanding tokenised message |
cb | table of callback functions to be called when user responds |
pw | handle to be passed to callback functions |
yes | text to use for 'Yes' button' (or NULL for default) |
no | text to use for 'No' button (or NULL for default) |
x | x position in screen coordinates (-1 = centred on screen) |
y | y position in screen coordinates (-1 = centred on screen) |
Definition at line 142 of file query.c.
References gui_query_window::cb, gui_query_window::default_confirm, gui_query_window_list, ICON_QUERY_HELP, ICON_QUERY_MESSAGE, ICON_QUERY_NO, ICON_QUERY_YES, gui_query_window::id, max, messages_get(), gui_query_window::next, next_id, NSERROR_BAD_ENCODING, NSERROR_OK, NSLOG, gui_query_window::prev, gui_query_window::pw, QUERY_INVALID, query_no_width, query_template, query_yes_width, ro_gui_dialog_open(), ro_gui_dialog_open_xy(), ro_gui_query_apply(), ro_gui_query_click(), ro_gui_query_close(), ro_gui_set_icon_string(), ro_gui_wimp_event_register_cancel(), ro_gui_wimp_event_register_close_window(), ro_gui_wimp_event_register_mouse_click(), ro_gui_wimp_event_register_ok(), ro_gui_wimp_event_set_user_data(), ro_warn_user(), utf8_to_local_encoding(), width, and gui_query_window::window.
Referenced by query_user().
void ro_gui_query_init | ( | void | ) |
Definition at line 76 of file query.c.
References query_template, and ro_gui_dialog_load_template().
Referenced by gui_init().
void ro_gui_query_window_bring_to_front | ( | query_id | id | ) |
Definition at line 303 of file query.c.
References NSLOG, ro_gui_dialog_open(), ro_gui_query_window_lookup_id(), ro_warn_user(), and gui_query_window::window.
Referenced by ro_gui_download_window_destroy().