NetSurf
Typedefs | Functions | Variables
textselection.h File Reference

Text selection import/export (interface). More...

#include "oslib/wimp.h"
Include dependency graph for textselection.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* ro_gui_selection_prepare_paste_cb) (void *pw)
 

Functions

void gui_start_selection (struct gui_window *g)
 Start drag-selecting text within a browser window (RO-dependent part) More...
 
void ro_gui_selection_prepare_paste (wimp_w w, ro_gui_selection_prepare_paste_cb cb, void *pw)
 Prepare to paste data from another application. More...
 
bool ro_gui_selection_prepare_paste_datasave (wimp_full_message_data_xfer *dataxfer)
 Prepare to paste data from another application (step 2) More...
 
bool ro_gui_selection_prepare_paste_dataload (wimp_full_message_data_xfer *dataxfer)
 Prepare to paste data from another application (step 3) More...
 
void ro_gui_selection_claim_entity (wimp_full_message_claim_entity *claim)
 Responds to CLAIM_ENTITY message notifying us that the caret and selection or clipboard have been claimed by another application. More...
 
void ro_gui_selection_data_request (wimp_full_message_data_request *req)
 Responds to DATA_REQUEST message, returning information about the clipboard contents if we own the clipboard. More...
 
bool ro_gui_save_clipboard (const char *path)
 Save the clipboard contents to a file. More...
 
void ro_gui_selection_dragging (wimp_message *message)
 Handler for Message_Dragging, used to implement auto-scrolling and ghost caret when a drag is in progress. More...
 
void ro_gui_selection_drag_reset (void)
 Reset drag-and-drop state when drag completes (DataSave received) More...
 
void ro_gui_selection_send_dragging (wimp_pointer *pointer)
 
void ro_gui_selection_drag_claim (wimp_message *message)
 

Variables

struct gui_clipboard_tableriscos_clipboard_table
 

Detailed Description

Text selection import/export (interface).

Definition in file textselection.h.

Typedef Documentation

◆ ro_gui_selection_prepare_paste_cb

typedef void(* ro_gui_selection_prepare_paste_cb) (void *pw)

Definition at line 32 of file textselection.h.

Function Documentation

◆ gui_start_selection()

void gui_start_selection ( struct gui_window g)

Start drag-selecting text within a browser window (RO-dependent part)

Parameters
ggui window

Definition at line 87 of file clipboard.c.

References ami_gui_get_browser_window(), ami_gui_get_menu(), ami_gui_get_window(), ami_gui_menu_set_disabled(), browser_window_get_editor_flags(), BW_EDITOR_CAN_CUT, last_start_window, M_CLEAR, M_COPY, M_CUT, NSLOG, nsoption_bool, owns_caret_and_selection, ro_gui_selection_drag_end(), ro_gui_window_mouse_at(), ro_mouse_drag_start(), ro_warn_user(), gui_window::state, and gui_window::window.

Referenced by gui_window_event(), HOOKF(), and ro_gui_window_event().

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

◆ ro_gui_save_clipboard()

bool ro_gui_save_clipboard ( const char *  path)

Save the clipboard contents to a file.

Parameters
paththe pathname of the file
Returns
true iff success, otherwise reporting the error before returning false

Definition at line 515 of file textselection.c.

References clip_length, clipboard, NSERROR_OK, NSLOG, path(), ro_warn_user(), and utf8_to_local_encoding().

Referenced by ro_gui_save_content().

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

◆ ro_gui_selection_claim_entity()

void ro_gui_selection_claim_entity ( wimp_full_message_claim_entity *  claim)

Responds to CLAIM_ENTITY message notifying us that the caret and selection or clipboard have been claimed by another application.

Parameters
claimCLAIM_ENTITY message

Definition at line 448 of file textselection.c.

References NSLOG, owns_caret_and_selection, owns_clipboard, ro_gui_discard_clipboard_contents(), and task_handle.

Referenced by ro_gui_user_message().

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

◆ ro_gui_selection_data_request()

void ro_gui_selection_data_request ( wimp_full_message_data_request *  req)

Responds to DATA_REQUEST message, returning information about the clipboard contents if we own the clipboard.

Parameters
reqDATA_REQUEST message

Definition at line 474 of file textselection.c.

References clip_length, GUI_SAVE_CLIPBOARD_CONTENTS, owns_clipboard, and ro_gui_send_datasave().

Referenced by ro_gui_user_message().

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

◆ ro_gui_selection_drag_claim()

void ro_gui_selection_drag_claim ( wimp_message *  message)

Definition at line 590 of file textselection.c.

References dragging_claimant, dragging_claimed, GUI_POINTER_DEFAULT, gui_window_set_pointer(), last_claim_flags, last_start_window, ro_gui_drag_box_cancel(), and wimp_DRAG_CLAIM_SUPPRESS_DRAGBOX.

Referenced by gui_init().

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

◆ ro_gui_selection_drag_reset()

void ro_gui_selection_drag_reset ( void  )

Reset drag-and-drop state when drag completes (DataSave received)

Definition at line 580 of file textselection.c.

References drag_claimed.

◆ ro_gui_selection_dragging()

void ro_gui_selection_dragging ( wimp_message *  message)

Handler for Message_Dragging, used to implement auto-scrolling and ghost caret when a drag is in progress.

Definition at line 551 of file textselection.c.

References drag_claimed, ro_gui_window_lookup(), and ro_gui_window_to_window_pos().

Referenced by gui_init().

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

◆ ro_gui_selection_prepare_paste()

void ro_gui_selection_prepare_paste ( wimp_w  w,
ro_gui_selection_prepare_paste_cb  cb,
void *  pw 
)

Prepare to paste data from another application.

Parameters
wWindow being pasted into
cbCallback to call once preparation is complete
pwPrivate data for callback

Definition at line 309 of file textselection.c.

References owns_clipboard, paste_cb, paste_cb_pw, paste_prev_message, ro_gui_discard_clipboard_contents(), ro_gui_selection_prepare_paste_bounced(), and ro_message_send_message().

Referenced by ro_gui_keypress(), and ro_gui_window_menu_select().

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

◆ ro_gui_selection_prepare_paste_dataload()

bool ro_gui_selection_prepare_paste_dataload ( wimp_full_message_data_xfer *  dataxfer)

Prepare to paste data from another application (step 3)

Parameters
dataxferDataLoad message
Returns
True if message was handled, false otherwise

Definition at line 395 of file textselection.c.

References clip_length, clipboard, NSERROR_OK, paste_prev_message, ro_gui_selection_prepare_paste_complete(), ro_message_send_message(), and utf8_from_local_encoding().

Referenced by ro_gui_user_message().

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

◆ ro_gui_selection_prepare_paste_datasave()

bool ro_gui_selection_prepare_paste_datasave ( wimp_full_message_data_xfer *  dataxfer)

Prepare to paste data from another application (step 2)

Parameters
dataxferDataSave message
Returns
True if message was handled, false otherwise

Definition at line 354 of file textselection.c.

References paste_prev_message, ro_gui_selection_prepare_paste_bounced(), ro_gui_selection_prepare_paste_complete(), ro_message_send_message(), and SLEN.

Referenced by ro_msg_datasave().

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

◆ ro_gui_selection_send_dragging()

void ro_gui_selection_send_dragging ( wimp_pointer *  pointer)

Definition at line 615 of file textselection.c.

References dragging_box, dragging_claimant, dragging_claimed, NSLOG, ro_gui_dragging_bounced(), ro_message_send_message(), and ro_message_send_message_to_window().

Here is the call graph for this function:

Variable Documentation

◆ riscos_clipboard_table

struct gui_clipboard_table* riscos_clipboard_table
extern

Definition at line 668 of file textselection.c.

Referenced by main().