71#define HAVE_WIDGET_SET_UNSET (GTK_CHECK_VERSION(3, 3, 6))
73#define HAVE_GTK_FACTORY (! GTK_CHECK_VERSION(3, 1, 9))
75#define HAVE_GTK_A11Y_H (GTK_CHECK_VERSION(3, 7, 6))
78# include <gtk/gtk-a11y.h>
137#define SCINTILLA_OBJECT_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SCINTILLA_TYPE_OBJECT_ACCESSIBLE, ScintillaObjectAccessible))
138#define SCINTILLA_TYPE_OBJECT_ACCESSIBLE (scintilla_object_accessible_get_type(0))
141#define SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(inst) (G_TYPE_INSTANCE_GET_PRIVATE((inst), SCINTILLA_TYPE_OBJECT_ACCESSIBLE, ScintillaObjectAccessiblePrivate))
147 GtkWidget *widget = gtk_accessible_get_widget(
accessible);
156 accessible(accessible_),
160 g_signal_connect(widget_,
"sci-notify", G_CALLBACK(
SciNotify),
this);
165 g_signal_handlers_disconnect_matched(
sci->
sci, G_SIGNAL_MATCH_DATA, 0, 0,
nullptr,
nullptr,
this);
170 g_return_val_if_fail(startByte >= 0,
nullptr);
172 g_return_val_if_fail(endByte >= startByte,
nullptr);
174 gchar *utf8Text =
nullptr;
175 const char *charSetBuffer;
179 int len = endByte - startByte;
180 utf8Text = (
char *) g_malloc(len + 1);
182 utf8Text[len] =
'\0';
186 std::string tmputf =
ConvertText(&s[0], s.length(),
"UTF-8", charSetBuffer,
false);
187 size_t len = tmputf.length();
188 utf8Text = (
char *) g_malloc(len + 1);
189 memcpy(utf8Text, tmputf.c_str(), len);
190 utf8Text[len] =
'\0';
208 AtkTextBoundary boundaryType,
int *startChar,
int *endChar) {
209 g_return_val_if_fail(charOffset >= 0,
nullptr);
214 switch (boundaryType) {
215 case ATK_TEXT_BOUNDARY_CHAR:
221 case ATK_TEXT_BOUNDARY_WORD_START:
228 case ATK_TEXT_BOUNDARY_WORD_END:
235 case ATK_TEXT_BOUNDARY_LINE_START: {
242 case ATK_TEXT_BOUNDARY_LINE_END: {
250 *startChar = *endChar = -1;
259 AtkTextBoundary boundaryType,
int *startChar,
int *endChar) {
260 g_return_val_if_fail(charOffset >= 0,
nullptr);
265 switch (boundaryType) {
266 case ATK_TEXT_BOUNDARY_CHAR:
271 case ATK_TEXT_BOUNDARY_WORD_START:
278 case ATK_TEXT_BOUNDARY_WORD_END:
285 case ATK_TEXT_BOUNDARY_LINE_START: {
296 case ATK_TEXT_BOUNDARY_LINE_END: {
312 *startChar = *endChar = -1;
321 AtkTextBoundary boundaryType,
int *startChar,
int *endChar) {
322 g_return_val_if_fail(charOffset >= 0,
nullptr);
327 switch (boundaryType) {
328 case ATK_TEXT_BOUNDARY_CHAR:
329 startByte = byteOffset;
333 case ATK_TEXT_BOUNDARY_WORD_START:
344 case ATK_TEXT_BOUNDARY_WORD_END:
355 case ATK_TEXT_BOUNDARY_LINE_START: {
362 case ATK_TEXT_BOUNDARY_LINE_END: {
374 *startChar = *endChar = -1;
382#if ATK_CHECK_VERSION(2, 10, 0)
383gchar *ScintillaGTKAccessible::GetStringAtOffset(
int charOffset,
384 AtkTextGranularity granularity,
int *startChar,
int *endChar) {
385 g_return_val_if_fail(charOffset >= 0,
nullptr);
390 switch (granularity) {
391 case ATK_TEXT_GRANULARITY_CHAR:
392 startByte = byteOffset;
395 case ATK_TEXT_GRANULARITY_WORD:
399 case ATK_TEXT_GRANULARITY_LINE: {
406 *startChar = *endChar = -1;
416 g_return_val_if_fail(charOffset >= 0, 0);
421 gunichar unichar = g_utf8_get_char_validated(ch, -1);
441 gint x_widget, y_widget, x_window, y_window;
442 GtkWidget *widget = gtk_accessible_get_widget(
accessible);
444 GdkWindow *window = gtk_widget_get_window(widget);
445 gdk_window_get_origin(window, &x_widget, &y_widget);
446 if (coords == ATK_XY_SCREEN) {
449 }
else if (coords == ATK_XY_WINDOW) {
450 window = gdk_window_get_toplevel(window);
451 gdk_window_get_origin(window, &x_window, &y_window);
453 x = x - x_widget + x_window;
454 y = y - y_widget + y_window;
464 gint *x, gint *y, gint *width, gint *height, AtkCoordType coords) {
465 *x = *y = *height = *width = 0;
479 *width = next_x - *x;
480 }
else if (nextByteOffset > byteOffset) {
483 int style =
StyleAt(byteOffset,
true);
484 int len = nextByteOffset - byteOffset;
485 char *ch =
new char[len + 1];
492 GtkWidget *widget = gtk_accessible_get_widget(
accessible);
493 GdkWindow *window = gtk_widget_get_window(widget);
494 int x_widget, y_widget;
495 gdk_window_get_origin(window, &x_widget, &y_widget);
496 if (coords == ATK_XY_SCREEN) {
499 }
else if (coords == ATK_XY_WINDOW) {
500 window = gdk_window_get_toplevel(window);
501 int x_window, y_window;
502 gdk_window_get_origin(window, &x_window, &y_window);
504 *x += x_widget - x_window;
505 *y += y_widget - y_window;
507 *x = *y = *height = *width = 0;
511static AtkAttributeSet *
AddTextAttribute(AtkAttributeSet *attributes, AtkTextAttribute attr, gchar *value) {
512 AtkAttribute *at = g_new(AtkAttribute, 1);
513 at->name = g_strdup(atk_text_attribute_get_name(attr));
516 return g_slist_prepend(attributes, at);
520 return AddTextAttribute(attributes, attr, g_strdup(atk_text_attribute_get_value(attr, i)));
525 g_strdup_printf(
"%u,%u,%u", colour.
GetRed() * 257, colour.
GetGreen() * 257, colour.
GetBlue() * 257));
529 AtkAttributeSet *attr_set =
nullptr;
549 g_return_val_if_fail(charOffset >= -1,
nullptr);
552 if (charOffset == -1) {
559 g_return_val_if_fail(byteOffset <= length,
nullptr);
561 const char style =
StyleAt(byteOffset,
true);
565 while (startByte > 0 &&
sci->
pdoc->
StyleAt((startByte) - 1) == style)
568 while (endByte < length &&
StyleAt(endByte,
true) == style)
584 if (selection_num < 0 || (
unsigned int) selection_num >=
sci->
sel.
Count())
610 if (selection_num < 0 || (
unsigned int) selection_num >= n_selections)
613 if (n_selections > 1) {
625 if (selection_num < 0 || (
unsigned int) selection_num >=
sci->
sel.
Count())
642#if ATK_CHECK_VERSION(2, 10, 0)
643 iface->get_string_at_offset = GetStringAtOffset;
676 const char *charSetBuffer;
681 std::string encoded =
ConvertText(utf8, lengthBytes, charSetBuffer,
"UTF-8",
true);
704 g_return_if_fail(endChar >= startChar);
714 g_return_if_fail(endChar >= startChar);
738 void Destroyed()
override {
745 bytePosition(bytePos_) {
748 void TextReceived(GtkClipboard *,
const gchar *
text) {
750 size_t len = strlen(
text);
751 std::string convertedText;
755 len = convertedText.length();
756 text = convertedText.c_str();
762 static void TextReceivedCallback(GtkClipboard *clipboard,
const gchar *
text, gpointer data) {
763 Helper *helper =
static_cast<Helper*
>(data);
765 if (helper->scia !=
nullptr) {
766 helper->TextReceived(clipboard,
text);
774 GtkWidget *widget = gtk_accessible_get_widget(
accessible);
775 GtkClipboard *clipboard = gtk_widget_get_clipboard(widget, GDK_SELECTION_CLIPBOARD);
776 gtk_clipboard_request_text(clipboard, helper->TextReceivedCallback, helper);
799 g_signal_emit_by_name(
accessible,
"text-caret-moved", charPosition);
804 size_t prev_n_selections =
old_sels.size();
805 bool selection_changed = n_selections != prev_n_selections;
808 for (
size_t i = 0; i < n_selections; i++) {
811 if (i < prev_n_selections && ! selection_changed) {
814 selection_changed = ((! old_sel.
Empty() || ! sel.
Empty()) && ! (old_sel == sel));
820 if (selection_changed)
821 g_signal_emit_by_name(
accessible,
"text-selection-changed");
829 if (oldDoc == newDoc) {
835 g_signal_emit_by_name(
accessible,
"text-changed::delete", 0, charLength);
842 g_signal_emit_by_name(
accessible,
"text-changed::insert", 0, charLength);
857 atk_object_notify_state_change(ATK_OBJECT(
accessible), ATK_STATE_EDITABLE, ! readonly);
858#if ATK_CHECK_VERSION(2, 16, 0)
859 atk_object_notify_state_change(ATK_OBJECT(
accessible), ATK_STATE_READ_ONLY, readonly);
879 g_signal_emit_by_name(
accessible,
"text-changed::insert", startChar, lengthChar);
885 g_signal_emit_by_name(
accessible,
"text-changed::delete", startChar, lengthChar);
891 g_signal_emit_by_name(
accessible,
"text-attributes-changed");
905#define WRAPPER_METHOD_BODY(accessible, call, defret) \
907 ScintillaGTKAccessible *thisAccessible = FromAccessible(reinterpret_cast<GtkAccessible*>(accessible)); \
908 if (thisAccessible) { \
909 return thisAccessible->call; \
930#if ATK_CHECK_VERSION(2, 10, 0)
931gchar *ScintillaGTKAccessible::AtkTextIface::GetStringAtOffset(AtkText *
text, gint offset, AtkTextGranularity granularity, gint *start_offset, gint *end_offset) {
1007 static volatile gsize type_id_result = 0;
1009 if (g_once_init_enter(&type_id_result)) {
1012 (GBaseInitFunc)
nullptr,
1013 (GBaseFinalizeFunc)
nullptr,
1015 (GClassFinalizeFunc)
nullptr,
1023 const GInterfaceInfo atk_text_info = {
1025 (GInterfaceFinalizeFunc)
nullptr,
1029 const GInterfaceInfo atk_editable_text_info = {
1031 (GInterfaceFinalizeFunc)
nullptr,
1037 GType derived_atk_type = GTK_TYPE_CONTAINER_ACCESSIBLE;
1038 tinfo.class_size =
sizeof (GtkContainerAccessibleClass);
1039 tinfo.instance_size =
sizeof (GtkContainerAccessible);
1041# if HAVE_GTK_FACTORY
1043 GType derived_type = g_type_parent(SCINTILLA_TYPE_OBJECT);
1044 AtkObjectFactory *factory = atk_registry_get_factory(atk_get_default_registry(), derived_type);
1045 GType derived_atk_type = atk_object_factory_get_accessible_type(factory);
1051 g_assert(parent_type != 0);
1053 GType derived_atk_type = parent_type;
1057 g_type_query(derived_atk_type, &query);
1058 tinfo.class_size = query.class_size;
1059 tinfo.instance_size = query.instance_size;
1062 GType type_id = g_type_register_static(derived_atk_type,
"ScintillaObjectAccessible", &tinfo, (GTypeFlags) 0);
1063 g_type_add_interface_static(type_id, ATK_TYPE_TEXT, &atk_text_info);
1064 g_type_add_interface_static(type_id, ATK_TYPE_EDITABLE_TEXT, &atk_editable_text_info);
1066 g_once_init_leave(&type_id_result, type_id);
1069 return type_id_result;
1073 g_return_val_if_fail(SCINTILLA_IS_OBJECT(obj),
nullptr);
1076#if HAVE_WIDGET_SET_UNSET
1091 if (*cache !=
nullptr) {
1097#elif HAVE_GTK_FACTORY
1098 static volatile gsize registered = 0;
1100 if (g_once_init_enter(®istered)) {
1103 GType derived_type = g_type_parent(SCINTILLA_TYPE_OBJECT);
1105 AtkRegistry *registry = atk_get_default_registry();
1106 AtkObjectFactory *factory = atk_registry_get_factory(registry, derived_type);
1107 GType derived_atk_type = atk_object_factory_get_accessible_type(factory);
1108 if (g_type_is_a(derived_atk_type, GTK_TYPE_ACCESSIBLE)) {
1109 atk_registry_set_factory_type(registry, SCINTILLA_TYPE_OBJECT,
1112 g_once_init_leave(®istered, 1);
1114 AtkObject *obj = GTK_WIDGET_CLASS(widget_parent_class)->get_accessible(widget);
1115 *cache =
static_cast<AtkObject*
>(g_object_ref(obj));
1117 static GType parent_atk_type = 0;
1119 if (parent_atk_type == 0) {
1120 AtkObject *parent_obj = GTK_WIDGET_CLASS(widget_parent_class)->get_accessible(widget);
1122 parent_atk_type = G_OBJECT_TYPE(parent_obj);
1126 if (g_type_is_a(parent_atk_type, GTK_TYPE_ACCESSIBLE)) {
1129 *cache =
static_cast<AtkObject*
>(g_object_ref(parent_obj));
1140 GtkWidget *widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(
accessible));
1141 if (widget ==
nullptr) {
1142 atk_state_set_add_state(state_set, ATK_STATE_DEFUNCT);
1145 atk_state_set_add_state(state_set, ATK_STATE_EDITABLE);
1146#if ATK_CHECK_VERSION(2, 16, 0)
1148 atk_state_set_add_state(state_set, ATK_STATE_READ_ONLY);
1150 atk_state_set_add_state(state_set, ATK_STATE_MULTI_LINE);
1151 atk_state_set_add_state(state_set, ATK_STATE_MULTISELECTABLE);
1152 atk_state_set_add_state(state_set, ATK_STATE_SELECTABLE_TEXT);
1160 GtkWidget *widget = gtk_accessible_get_widget(
accessible);
1161 if (widget ==
nullptr)
1170#if HAVE_WIDGET_SET_UNSET
1171static void scintilla_object_accessible_widget_unset(GtkAccessible *
accessible) {
1172 GtkWidget *widget = gtk_accessible_get_widget(
accessible);
1173 if (widget ==
nullptr)
1185#if ! HAVE_WIDGET_SET_UNSET
1189 obj->role = ATK_ROLE_TEXT;
1197 priv->pscin =
nullptr;
1204 GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
1205 AtkObjectClass *object_class = ATK_OBJECT_CLASS(klass);
1207#if HAVE_WIDGET_SET_UNSET
1208 GtkAccessibleClass *accessible_class = GTK_ACCESSIBLE_CLASS(klass);
1210 accessible_class->widget_unset = scintilla_object_accessible_widget_unset;
1226 priv->pscin =
nullptr;
Defines the auto completion list box.
Interface to the call tip control.
Performs Unicode case conversions.
Classes for case folding.
Manages the text of the document.
Character classifications used by Document and RESearch.
Returns the Unicode general category of a character.
Manages visibility of lines for folding and wrapping.
Visual elements added over text.
Text document that handles notifications, DBCS, styling, words and end of line.
Defines the editor state that must be visible to EditorView.
Defines the appearance of the main text area of the editor window.
Defines the main editor class.
Interface between Scintilla and lexers.
Interface for loading into a Scintilla document from a background thread.
Defines the style of indicators which are text decorations such as underlining.
Defines a mapping between keystrokes and commands.
Defines the look of a line marker in the margin .
Defines the appearance of the editor margin.
Data structure used to partition an interval.
Classes for caching layout information.
Defines global type name Position in the Sci internal namespace.
Data structure used to store sparse styles.
Defines an enhanced subclass of Editor with calltips, autocomplete and context menu.
#define SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(inst)
GtkAccessibleClass ScintillaObjectAccessibleClass
static AtkAttributeSet * AddTextIntAttribute(AtkAttributeSet *attributes, AtkTextAttribute attr, gint i)
static void scintilla_object_accessible_class_init(ScintillaObjectAccessibleClass *klass)
static GType scintilla_object_accessible_get_type(GType parent_type)
static AtkStateSet * scintilla_object_accessible_ref_state_set(AtkObject *accessible)
AtkObjectFactoryClass ScintillaObjectAccessibleFactoryClass
#define SCINTILLA_TYPE_OBJECT_ACCESSIBLE
static void scintilla_object_accessible_initialize(AtkObject *obj, gpointer data)
static AtkObject * scintilla_object_accessible_new(GType parent_type, GObject *obj)
static void scintilla_object_accessible_widget_set(GtkAccessible *accessible)
static void scintilla_object_accessible_init(ScintillaObjectAccessible *accessible)
static GType scintilla_object_accessible_factory_get_type(void)
static AtkAttributeSet * AddTextColorAttribute(AtkAttributeSet *attributes, AtkTextAttribute attr, const ColourDesired &colour)
static AtkObject * scintilla_object_accessible_factory_create_accessible(GObject *obj)
GtkAccessible ScintillaObjectAccessible
static GType scintilla_object_accessible_factory_get_accessible_type(void)
static void scintilla_object_accessible_factory_class_init(AtkObjectFactoryClass *klass)
static void scintilla_object_accessible_finalize(GObject *object)
#define WRAPPER_METHOD_BODY(accessible, call, defret)
static AtkAttributeSet * AddTextAttribute(AtkAttributeSet *attributes, AtkTextAttribute attr, gchar *value)
static gpointer scintilla_object_accessible_parent_class
AtkObjectFactory ScintillaObjectAccessibleFactory
static void scintilla_object_accessible_factory_init(ScintillaObjectAccessibleFactory *)
sptr_t scintilla_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam)
Interface to the edit control.
#define SCI_POSITIONFROMLINE
#define SC_LINECHARACTERINDEX_UTF32
#define SC_MOD_INSERTTEXT
#define SCI_DROPSELECTIONN
#define SC_FONT_SIZE_MULTIPLIER
#define SCI_WORDENDPOSITION
#define SCI_CLEARSELECTIONS
#define SCI_POINTXFROMPOSITION
#define SC_ACCESSIBILITY_ENABLED
#define SCI_GETCURRENTPOS
#define SCI_LINEFROMPOSITION
#define SC_MOD_CHANGESTYLE
#define SC_UPDATE_SELECTION
#define SCI_POSITIONAFTER
#define SCI_POINTYFROMPOSITION
#define SCI_WORDSTARTPOSITION
#define SC_MOD_DELETETEXT
#define SCI_SETSELECTIONNEND
#define SCI_SETSELECTIONNSTART
#define SCI_CHARPOSITIONFROMPOINTCLOSE
#define SCI_GETLINEENDPOSITION
#define SC_MOD_BEFOREDELETE
Classes maintaining the selection.
Main data structure for holding arrays that handle insertions and deletions efficiently.
Safe string copy function which always NUL terminates.
Defines the font and colour style for a class of text.
Functions to handle UTF-8 and UTF-16 strings.
Define UniqueString, a unique_ptr based string type for storage in containers and an allocator for Un...
Store information on how the document is to be viewed.
constexpr unsigned char GetRed() const noexcept
constexpr unsigned char GetBlue() const noexcept
constexpr unsigned char GetGreen() const noexcept
bool DeleteChars(Sci::Position pos, Sci::Position len)
char SCI_METHOD StyleAt(Sci_Position position) const override
Sci_Position SCI_METHOD Length() const override
void ReleaseLineCharacterIndex(int lineCharacterIndex)
Sci::Position InsertString(Sci::Position position, const char *s, Sci::Position insertLength)
Insert a string with a length.
static std::string TransformLineEnds(const char *s, size_t len, int eolModeWanted)
bool IsReadOnly() const noexcept
void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const override
void AllocateLineCharacterIndex(int lineCharacterIndex)
Sci::Position CountCharacters(Sci::Position startPos, Sci::Position endPos) const noexcept
bool IsUnicodeMode() const noexcept
long TextWidth(uptr_t style, const char *text)
void CopyRangeToClipboard(Sci::Position start, Sci::Position end)
std::string RangeText(Sci::Position start, Sci::Position end) const
bool RangeContainsProtected(Sci::Position start, Sci::Position end) const noexcept
static void CopyText(AtkEditableText *text, gint start, gint end)
static void DeleteText(AtkEditableText *text, gint start, gint end)
static void init(::AtkEditableTextIface *iface)
static void SetTextContents(AtkEditableText *text, const gchar *contents)
static void PasteText(AtkEditableText *text, gint position)
static void CutText(AtkEditableText *text, gint start, gint end)
static void InsertText(AtkEditableText *text, const gchar *contents, gint length, gint *position)
static void init(::AtkTextIface *iface)
static gint GetCharacterCount(AtkText *text)
static AtkAttributeSet * GetRunAttributes(AtkText *text, gint offset, gint *start_offset, gint *end_offset)
static gint GetCaretOffset(AtkText *text)
static gboolean AddSelection(AtkText *text, gint start, gint end)
static gchar * GetTextAtOffset(AtkText *text, gint offset, AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset)
static void GetCharacterExtents(AtkText *text, gint offset, gint *x, gint *y, gint *width, gint *height, AtkCoordType coords)
static gunichar GetCharacterAtOffset(AtkText *text, gint offset)
static gint GetOffsetAtPoint(AtkText *text, gint x, gint y, AtkCoordType coords)
static gboolean SetSelection(AtkText *text, gint selection_num, gint start, gint end)
static gboolean SetCaretOffset(AtkText *text, gint offset)
static AtkAttributeSet * GetDefaultAttributes(AtkText *text)
static gchar * GetTextBeforeOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset)
static gint GetNSelections(AtkText *text)
static gboolean RemoveSelection(AtkText *text, gint selection_num)
static gchar * GetSelection(AtkText *text, gint selection_num, gint *start_pos, gint *end_pos)
static gchar * GetTextAfterOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset)
static gchar * GetText(AtkText *text, int start_offset, int end_offset)
gchar * GetSelection(gint selection_num, int *startChar, int *endChar)
void PasteText(int charPosition)
gboolean SetCaretOffset(int charOffset)
gchar * GetTextAfterOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar)
void ChangeDocument(Document *oldDoc, Document *newDoc)
bool InsertStringUTF8(Sci::Position bytePos, const gchar *utf8, Sci::Position lengthBytes)
gchar * GetTextBeforeOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar)
void InsertText(const gchar *text, int lengthBytes, int *charPosition)
~ScintillaGTKAccessible()
gchar * GetTextRangeUTF8(Sci::Position startByte, Sci::Position endByte)
Sci::Position ByteOffsetFromCharacterOffset(Sci::Position startByte, int characterOffset)
AtkAttributeSet * GetRunAttributes(int charOffset, int *startChar, int *endChar)
void Notify(GtkWidget *widget, gint code, SCNotification *nt)
void SetTextContents(const gchar *contents)
void SetAccessibility(bool enabled)
void CutText(int startChar, int endChar)
void CharacterRangeFromByteRange(Sci::Position startByte, Sci::Position endByte, int *startChar, int *endChar)
AtkAttributeSet * GetDefaultAttributes()
gboolean AddSelection(int startChar, int endChar)
static AtkObject * WidgetGetAccessibleImpl(GtkWidget *widget, AtkObject **cache, gpointer widget_parent_class)
static void SciNotify(GtkWidget *widget, gint code, SCNotification *nt, gpointer data)
std::vector< SelectionRange > old_sels
GtkAccessible * accessible
ScintillaGTKAccessible(GtkAccessible *accessible_, GtkWidget *widget_)
gchar * GetTextAtOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar)
gint GetOffsetAtPoint(gint x, gint y, AtkCoordType coords)
AtkAttributeSet * GetAttributesForStyle(unsigned int styleNum)
void DeleteText(int startChar, int endChar)
gboolean SetSelection(gint selection_num, int startChar, int endChar)
void CopyText(int startChar, int endChar)
Sci::Position PositionBefore(Sci::Position pos)
int StyleAt(Sci::Position position, bool ensureStyle=false)
void GetCharacterExtents(int charOffset, gint *x, gint *y, gint *width, gint *height, AtkCoordType coords)
void ByteRangeFromCharacterRange(int startChar, int endChar, Sci::Position &startByte, Sci::Position &endByte)
gboolean RemoveSelection(int selection_num)
Sci::Position CharacterOffsetFromByteOffset(Sci::Position byteOffset)
gunichar GetCharacterAtOffset(int charOffset)
Sci::Position PositionAfter(Sci::Position pos)
gchar * GetText(int startChar, int endChar)
sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) override
const char * CharacterSetID() const
Sci::Position Position() const noexcept
size_t Count() const noexcept
SelectionRange & Range(size_t r) noexcept
bool Empty() const noexcept
std::vector< Style > styles
Styling buffer using one element for each run rather than using a filled buffer.
std::string ConvertText(const char *s, size_t len, const char *charSetDest, const char *charSetSource, bool transliterations, bool silent)
static GeanyProjectPrivate priv
ScintillaGTKAccessible * pscin
bool Empty() const noexcept
SelectionPosition Start() const noexcept
SelectionPosition End() const noexcept