25#ifndef _NETSURF_RISCOS_WIMP_EVENT_H_
26#define _NETSURF_RISCOS_WIMP_EVENT_H_
34#include "oslib/wimp.h"
37#define IS_WIMP_KEY (1u<<31)
49 const char *(*get_help_suffix)(wimp_w w, wimp_i i,
50 os_coord *pos, wimp_mouse_state buttons));
52 os_coord *pos, wimp_mouse_state buttons);
70 bool menu_auto,
bool position_ibar);
72 wimp_i down,
int min,
int max,
int stepping,
76 wimp_i gright, wimp_menu *menu);
80 void (*callback)(wimp_pointer *pointer));
83 bool (*callback)(wimp_w w));
86 bool (*callback)(wimp_pointer *pointer));
88 bool (*callback)(wimp_key *key));
90 void (*callback)(wimp_open *open));
92 void (*callback)(wimp_w w));
94 void (*callback)(wimp_draw *redraw));
96 void (*callback)(wimp_scroll *scroll));
98 void (*callback)(wimp_entering *entering));
100 bool (*callback)(wimp_w w, wimp_i i, wimp_menu *m,
103 bool (*callback)(wimp_w w, wimp_i i, wimp_menu *m,
106 void (*callback)(wimp_w w, wimp_i i, wimp_menu *m,
109 void (*callback)(wimp_w w, wimp_i i, wimp_menu *m));
Interface to utility string handling.
char from[32]
Encoding name to convert from.
char to[32]
Encoding name to convert to.
bool ro_gui_wimp_event_register_text_field(wimp_w w, wimp_i i)
Register a text field to be automatically handled.
bool ro_gui_wimp_event_register_keypress(wimp_w w, bool(*callback)(wimp_key *key))
Register a function to be called for all keypresses within a particular window.
bool ro_gui_wimp_event_register_numeric_field(wimp_w w, wimp_i i, wimp_i up, wimp_i down, int min, int max, int stepping, int decimal_places)
Register a numeric field to be automatically handled.
bool ro_gui_wimp_event_set_help_prefix(wimp_w w, const char *help_prefix)
Set the associated help prefix for a given window.
const char * ro_gui_wimp_event_get_help_prefix(wimp_w w)
Get the associated help prefix.
bool ro_gui_wimp_event_mouse_click(wimp_pointer *pointer)
Handles a mouse click event in a registered window.
bool ro_gui_wimp_event_register_redraw_window(wimp_w w, void(*callback)(wimp_draw *redraw))
Register a function to be called for all window redraw operations.
bool ro_gui_wimp_event_register_menu_gright(wimp_w w, wimp_i i, wimp_i gright, wimp_menu *menu)
Register an icon menu to be automatically handled.
void ro_gui_wimp_event_finalise(wimp_w w)
Free any resources associated with a window.
void * ro_gui_wimp_event_get_user_data(wimp_w w)
Gets the user data associated with a window.
bool ro_gui_wimp_event_transfer(wimp_w from, wimp_w to)
Transfer event data from one window to another.
bool ro_gui_wimp_event_register_cancel(wimp_w w, wimp_i i)
Register a function to be called for the Cancel action on a window.
bool ro_gui_wimp_event_memorise(wimp_w w)
Memorises the current state of any registered components in a window.
bool ro_gui_wimp_event_register_menu_selection(wimp_w w, bool(*callback)(wimp_w w, wimp_i i, wimp_menu *m, wimp_selection *s, menu_action a))
Register a function to be called following a menu selection.
bool ro_gui_wimp_event_redraw_window(wimp_draw *redraw)
Handle any redraw window requests.
const char * ro_gui_wimp_event_get_help_suffix(wimp_w w, wimp_i i, os_coord *pos, wimp_mouse_state buttons)
Get the associated help suffix.
bool ro_gui_wimp_event_scroll_window(wimp_scroll *scroll)
Handle any scroll window requests.
bool ro_gui_wimp_event_prepare_menu(wimp_w w, wimp_i i, wimp_menu *menu)
Trigger a window's Prepare Menu event.
bool ro_gui_wimp_event_open_window(wimp_open *open)
Handle any open window requests.
void ro_gui_wimp_event_deregister(wimp_w w, wimp_i i)
Free any resources associated with a specific icon in a window.
void ro_gui_wimp_event_register_submenu(wimp_w w)
Register a submenu as being opened.
bool ro_gui_wimp_event_close_window(wimp_w w)
Service any close window handlers.
bool ro_gui_wimp_event_register_mouse_click(wimp_w w, bool(*callback)(wimp_pointer *pointer))
Register a function to be called for all mouse-clicks to icons in a window that don't have registered...
void ro_gui_wimp_event_menus_closed(wimp_w w, wimp_i i, wimp_menu *menu)
Handle menus being closed.
bool ro_gui_wimp_event_register_checkbox(wimp_w w, wimp_i i)
Register a checkbox to be automatically handled.
bool ro_gui_wimp_event_pointer_entering_window(wimp_entering *entering)
Handle any pointer entering window requests.
bool ro_gui_wimp_event_submenu_warning(wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
bool ro_gui_wimp_event_register_menu_prepare(wimp_w w, bool(*callback)(wimp_w w, wimp_i i, wimp_menu *m, wimp_pointer *p))
Register a function to be called before a menu is (re-)opened.
bool ro_gui_wimp_event_restore(wimp_w w)
Restore the state of any registered components in a window to their memorised state.
bool ro_gui_wimp_event_validate(wimp_w w)
Ensures all values are within pre-determined boundaries.
bool ro_gui_wimp_event_set_user_data(wimp_w w, void *user)
Sets the user data associated with a window.
bool ro_gui_wimp_event_register_menu_close(wimp_w w, void(*callback)(wimp_w w, wimp_i i, wimp_menu *m))
Register a function to be called before a menu is finally closed.
bool ro_gui_wimp_event_register_ok(wimp_w w, wimp_i i, bool(*callback)(wimp_w w))
Register a function to be called for the OK action on a window.
bool ro_gui_wimp_event_register_pointer_entering_window(wimp_w w, void(*callback)(wimp_entering *entering))
Register a function to be called for all pointer entering window requests.
bool ro_gui_wimp_event_register_close_window(wimp_w w, void(*callback)(wimp_w w))
Register a function to be called after the window has been closed.
bool ro_gui_wimp_event_register_radio(wimp_w w, wimp_i *i)
Register a group of radio icons to be automatically handled.
bool ro_gui_wimp_event_register_help_suffix(wimp_w w, const char *(*get_help_suffix)(wimp_w w, wimp_i i, os_coord *pos, wimp_mouse_state buttons))
Register a handler to decode help suffixes for a given window.
bool ro_gui_wimp_event_menu_selection(wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
Handles a menu selection event.
bool ro_gui_wimp_event_register_scroll_window(wimp_w w, void(*callback)(wimp_scroll *scroll))
Register a function to be called for all window scroll requests.
bool ro_gui_wimp_event_keypress(wimp_key *key)
Handle any registered keypresses, and the standard RISC OS ones.
bool ro_gui_wimp_event_register_button(wimp_w w, wimp_i i, void(*callback)(wimp_pointer *pointer))
Register a function to be called when a particular button is pressed.
bool ro_gui_wimp_event_register_open_window(wimp_w w, void(*callback)(wimp_open *open))
Register a function to be called for all window opening requests.
bool ro_gui_wimp_event_register_menu_warning(wimp_w w, void(*callback)(wimp_w w, wimp_i i, wimp_menu *m, wimp_selection *s, menu_action a))
Register a function to be called when a sub-menu warning is received.
bool ro_gui_wimp_event_register_menu(wimp_w w, wimp_menu *m, bool menu_auto, bool position_ibar)
Register a window menu to be (semi-)automatically handled.
bool ro_gui_wimp_event_process_window_menu_click(wimp_pointer *pointer)
Process a Menu click in a window, by checking for a registered window menu and opening it if one is f...