Scinterm API Documentation

A curses platform for Scintilla that supports curses platforms like ncurses.

scintilla_delete(sci)

Deletes the given Scintilla window.

Parameters:

Returns: void

scintilla_get_clipboard(sci, len)

Returns a null-terminated copy of the text on Scintilla’s internal clipboard (not the primary and/or secondary X selections) and stores its length in len.

The caller is responsible for freeing the returned text. Keep in mind clipboard text may contain null bytes.

Parameters:

Returns: char * clipboard text (caller is responsible for freeing it)

scintilla_get_window(sci)

Returns the curses WINDOW associated with the given Scintilla window.

Parameters:

Returns: curses WINDOW.

scintilla_new(callback, userdata)

Creates a new Scintilla curses window.

Parameters:

Returns: Scintilla *

scintilla_noutrefresh(sci)

Refreshes the Scintilla window on the virtual screen.

This should be done along with the normal curses noutrefresh(). Note: the terminal cursor may be hidden if Scintilla thinks this window has focus (e.g. SCI_SETFOCUS) and Scintilla’s caret is out of view. If another non-Scintilla window has the real focus, call curs_set(1) in order to show the terminal cursor for that window.

Parameters:

scintilla_refresh(sci)

Refreshes the Scintilla window on the physical screen.

This should be done along with the normal curses refresh(). Note: the terminal cursor may be hidden if Scintilla thinks this window has focus (e.g. SCI_SETFOCUS) and Scintilla’s caret is out of view. If another non-Scintilla window has the real focus, call curs_set(1) in order to show the terminal cursor for that window.

Parameters:

Returns: void

scintilla_send_key(sci, key, modifiers)

Sends the specified key to the given Scintilla window for processing.

If it is not consumed, an SCNotification will be emitted.

Parameters:

Returns: void

scintilla_send_message(sci, iMessage, wParam, lParam)

Sends the given message with parameters to the given Scintilla window.

Parameters:

Returns: sptr_t

scintilla_send_mouse(sci, event, button, modifiers, y, x)

Sends the specified mouse event to the given Scintilla window for processing.

Parameters:

Returns: bool whether or not Scintilla handled the mouse event.

scintilla_update_cursor(sci)

Updates the curses window cursor for the Scintilla window so the terminal draws the cursor in the correct position.

This only needs to be called when scintilla_refresh() or scintilla_noutrefresh() is not the last curses draw command issued (for any window, not just the Scintilla window). Note: the terminal cursor may be hidden if Scintilla thinks this window has focus (e.g. SCI_SETFOCUS) and Scintilla’s caret is out of view. If another non-Scintilla window has the real focus, call curs_set(1) in order to show the terminal cursor for that window.

Parameters:

Returns: void