NetSurf
Functions
mouse.h File Reference

Mouse dragging and tracking support interface for RISC OS. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ro_mouse_poll (void)
 Process Null polls for any drags and mouse trackers that are currently active. More...
 
void ro_mouse_drag_start (void(*drag_end)(wimp_dragged *dragged, void *data), void(*drag_track)(wimp_pointer *pointer, void *data), void(*drag_cancel)(void *data), void *data)
 Start a drag, providing a function to be called when the Wimp_DragEnd event is received and optionally a tracking function to be called on null polls in between times. More...
 
void ro_mouse_drag_end (wimp_dragged *dragged)
 Process Wimp_DragEnd events by passing the details on to any registered event handler. More...
 
void ro_mouse_track_start (void(*poll_end)(wimp_leaving *leaving, void *data), void(*poll_track)(wimp_pointer *pointer, void *data), void *data)
 Start tracking the mouse in a window, providing a function to be called on null polls and optionally one to be called when it leaves the window. More...
 
void ro_mouse_pointer_leaving_window (wimp_leaving *leaving)
 Process Wimp_PointerLeaving events by terminating an active mouse track and passing the details on to any registered event handler. More...
 
void ro_mouse_kill (void *data)
 Kill any tracking events if the data pointers match the supplied pointer. More...
 
os_t ro_mouse_poll_interval (void)
 Return the desired polling interval to allow the mouse tracking to be carried out. More...
 

Detailed Description

Mouse dragging and tracking support interface for RISC OS.

Definition in file mouse.h.

Function Documentation

◆ ro_mouse_drag_end()

void ro_mouse_drag_end ( wimp_dragged *  dragged)

Process Wimp_DragEnd events by passing the details on to any registered event handler.

Parameters
*draggedThe Wimp_DragEnd data block.

Process Wimp_DragEnd events by passing the details on to any registered event handler.

Parameters
*draggedThe Wimp_DragEnd data block.

Definition at line 146 of file mouse.c.

References ro_mouse_drag_cancel_callback, ro_mouse_drag_data, ro_mouse_drag_end_callback, ro_mouse_drag_track_callback, and ro_warn_user().

Referenced by ro_gui_handle_event().

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

◆ ro_mouse_drag_start()

void ro_mouse_drag_start ( void(*)(wimp_dragged *dragged, void *data)  drag_end,
void(*)(wimp_pointer *pointer, void *data)  drag_track,
void(*)(void *data)  drag_cancel,
void *  data 
)

Start a drag, providing a function to be called when the Wimp_DragEnd event is received and optionally a tracking function to be called on null polls in between times.

Parameters
*drag_endCallback for when the drag terminates, or NULL for none.
*drag_trackCallback for mouse tracking during the drag, or NULL for none.
*drag_cancelCallback for cancelling the drag, or NULL if the drag can't be cancelled.
*dataData to be passed to the callback functions, or NULL.

Definition at line 115 of file mouse.c.

References ro_mouse_drag_cancel_callback, ro_mouse_drag_data, ro_mouse_drag_end_callback, ro_mouse_drag_track_callback, and ro_mouse_ignore_leaving_event.

Referenced by gui_drag_save_object(), gui_drag_save_selection(), gui_start_selection(), gui_window_drag_start(), gui_window_scroll_start(), ro_cw_drag_start(), ro_gui_button_bar_click(), ro_gui_download_click(), ro_gui_drag_save_link(), and ro_gui_save_start_drag().

Here is the caller graph for this function:

◆ ro_mouse_kill()

void ro_mouse_kill ( void *  data)

Kill any tracking events if the data pointers match the supplied pointer.

Parameters
*dataThe data of the client to be killed.

Definition at line 248 of file mouse.c.

References ro_mouse_drag_cancel_callback, ro_mouse_drag_data, ro_mouse_drag_end_callback, ro_mouse_drag_track_callback, ro_mouse_poll_data, ro_mouse_poll_end_callback, and ro_mouse_poll_track_callback.

Referenced by gui_window_destroy().

Here is the caller graph for this function:

◆ ro_mouse_pointer_leaving_window()

void ro_mouse_pointer_leaving_window ( wimp_leaving *  leaving)

Process Wimp_PointerLeaving events by terminating an active mouse track and passing the details on to any registered event handler.

Parameters
*leavingThe Wimp_PointerLeaving data block.

If the ignore mask is set, we don't pass the event on to the client as it is assumed that it's a result of starting a Wimp_DragBox operation.

Parameters
*leavingThe Wimp_PointerLeaving data block.

Definition at line 224 of file mouse.c.

References ro_mouse_ignore_leaving_event, ro_mouse_poll_data, ro_mouse_poll_end_callback, and ro_mouse_poll_track_callback.

Referenced by ro_gui_handle_event().

Here is the caller graph for this function:

◆ ro_mouse_poll()

void ro_mouse_poll ( void  )

Process Null polls for any drags and mouse trackers that are currently active.

Definition at line 71 of file mouse.c.

References NSLOG, ro_mouse_drag_data, ro_mouse_drag_track_callback, ro_mouse_poll_data, ro_mouse_poll_track_callback, and ro_warn_user().

Referenced by ro_gui_handle_event().

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

◆ ro_mouse_poll_interval()

os_t ro_mouse_poll_interval ( void  )

Return the desired polling interval to allow the mouse tracking to be carried out.

Returns
Desired poll interval (0 for none required).

Definition at line 272 of file mouse.c.

References ro_mouse_drag_track_callback, and ro_mouse_poll_track_callback.

Referenced by riscos_poll().

Here is the caller graph for this function:

◆ ro_mouse_track_start()

void ro_mouse_track_start ( void(*)(wimp_leaving *leaving, void *data)  poll_end,
void(*)(wimp_pointer *pointer, void *data)  poll_track,
void *  data 
)

Start tracking the mouse in a window, providing a function to be called on null polls and optionally one to be called when it leaves the window.

Parameters
*poll_endCallback for when the pointer leaves the window, or NULL for none. Claimants can receive *leaving==NULL if a new tracker is started before a PointerLeaving event is received.
*poll_trackCallback for mouse tracking while the pointer remains in the window, or NULL for none.
*dataData to be passed to the callback functions, or NULL.

Definition at line 177 of file mouse.c.

References NSLOG, ro_mouse_ignore_leaving_event, ro_mouse_poll_data, ro_mouse_poll_end_callback, and ro_mouse_poll_track_callback.

Referenced by ro_cw_pointer_entering(), ro_gui_url_complete_entering(), and ro_gui_window_pointer_entering().

Here is the caller graph for this function: