A curses platform for Scintilla that supports curses platforms like ncurses.
Deletes the given Scintilla window.
Parameters:
- sci: The Scintilla window returned by
scintilla_new().
Returns: void
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:
- sci: The Scintilla window returned by
scintilla_new(). - len: (
int *) The length of the returned text.
Returns: char * clipboard text (caller is responsible for freeing it)
Returns the curses WINDOW associated with the given Scintilla window.
Parameters:
- sci: The Scintilla window returned by
scintilla_new().
Returns: curses WINDOW.
Creates a new Scintilla curses window.
Parameters:
- callback: SCNotification callback function of the form:
void callback(Scintilla *, int, void *, void *). - userdata: (
void *) Userdata to pass to callback.
Returns: Scintilla *
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:
- sci: The Scintilla window returned by
scintilla_new().
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:
- sci: The Scintilla window returned by
scintilla_new().
Returns: void
Sends the specified key to the given Scintilla window for processing.
If it is not consumed, an SCNotification will be emitted.
Parameters:
- sci: The Scintilla window returned by
scintilla_new(). - key: (
int) The keycode of the key, or, if Scintilla's code page is UTF-8, the UTF-8 code point of the key. - modifiers: (
int) Bit-mask ofSCMOD_*modifier keys.
Returns: void
Sends the given message with parameters to the given Scintilla window.
Parameters:
- sci: The Scintilla window returned by
scintilla_new(). - iMessage: (
int) The Scintilla message ID. - wParam: (
uptr_t) The first parameter. - lParam: (
sptr_t) The second parameter.
Returns: sptr_t
Sends the specified mouse event to the given Scintilla window for processing.
Parameters:
- sci: The Scintilla window returned by
scintilla_new(). - event: (
int) The mouse event (SCM_CLICK,SCM_DRAG, orSCM_RELEASE). - button: (
int) The button number pressed, or0if none. - modifiers: (
int) Bit-mask ofSCMOD_*modifier keys. - y: (
int) The absolute y coordinate of the mouse event. - x: (
int) The absolute x coordinate of the mouse event.
Returns: bool whether or not Scintilla handled the mouse event.
Sets the offsets for colors and color pairs generated on-demand.
Applications that define their own colors and color pairs can tell Scinterm where to start from.
Parameters:
- color_offset: The offset for Scinterm's calls to
init_color(). - pair_offset: The offset for Scinterm's calls to
init_pair().
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:
- sci: The Scintilla window returned by
scintilla_new().
Returns: void