NetSurf
|
Text selection import/export (interface). More...
#include "oslib/wimp.h"
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_table * | riscos_clipboard_table |
Text selection import/export (interface).
Definition in file textselection.h.
typedef void(* ro_gui_selection_prepare_paste_cb) (void *pw) |
Definition at line 32 of file textselection.h.
void gui_start_selection | ( | struct gui_window * | g | ) |
Start drag-selecting text within a browser window (RO-dependent part)
g | gui 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().
bool ro_gui_save_clipboard | ( | const char * | path | ) |
Save the clipboard contents to a file.
path | the pathname of the file |
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().
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.
claim | CLAIM_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().
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.
req | DATA_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().
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().
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.
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().
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.
w | Window being pasted into |
cb | Callback to call once preparation is complete |
pw | Private 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().
bool ro_gui_selection_prepare_paste_dataload | ( | wimp_full_message_data_xfer * | dataxfer | ) |
Prepare to paste data from another application (step 3)
dataxfer | DataLoad message |
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().
bool ro_gui_selection_prepare_paste_datasave | ( | wimp_full_message_data_xfer * | dataxfer | ) |
Prepare to paste data from another application (step 2)
dataxfer | DataSave message |
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().
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().
|
extern |
Definition at line 668 of file textselection.c.
Referenced by main().