diff options
-rw-r--r-- | gtk/ScintillaGTKAccessible.cxx | 8 | ||||
-rw-r--r-- | gtk/ScintillaGTKAccessible.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gtk/ScintillaGTKAccessible.cxx b/gtk/ScintillaGTKAccessible.cxx index 13511d5f5..e1f450467 100644 --- a/gtk/ScintillaGTKAccessible.cxx +++ b/gtk/ScintillaGTKAccessible.cxx @@ -53,6 +53,10 @@ # include <gtk/gtk-a11y.h> #endif +#if defined(__WIN32__) || defined(_MSC_VER) +#include <windows.h> +#endif + // ScintillaGTK.h and stuff it needs #include "Platform.h" @@ -350,6 +354,7 @@ gchar *ScintillaGTKAccessible::GetTextAtOffset(int charOffset, return GetTextRangeUTF8(startByte, endByte); } +#if ATK_CHECK_VERSION(2, 10, 0) gchar *ScintillaGTKAccessible::GetStringAtOffset(int charOffset, AtkTextGranularity granularity, int *startChar, int *endChar) { g_return_val_if_fail(charOffset >= 0, NULL); @@ -380,6 +385,7 @@ gchar *ScintillaGTKAccessible::GetStringAtOffset(int charOffset, CharacterRangeFromByteRange(startByte, endByte, startChar, endChar); return GetTextRangeUTF8(startByte, endByte); } +#endif gunichar ScintillaGTKAccessible::GetCharacterAtOffset(int charOffset) { g_return_val_if_fail(charOffset >= 0, 0); @@ -875,9 +881,11 @@ gchar *ScintillaGTKAccessible::AtkTextIface::GetTextBeforeOffset(AtkText *text, gchar *ScintillaGTKAccessible::AtkTextIface::GetTextAtOffset(AtkText *text, gint offset, AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset) { WRAPPER_METHOD_BODY(text, GetTextAtOffset(offset, boundary_type, start_offset, end_offset), NULL) } +#if ATK_CHECK_VERSION(2, 10, 0) gchar *ScintillaGTKAccessible::AtkTextIface::GetStringAtOffset(AtkText *text, gint offset, AtkTextGranularity granularity, gint *start_offset, gint *end_offset) { WRAPPER_METHOD_BODY(text, GetStringAtOffset(offset, granularity, start_offset, end_offset), NULL) } +#endif gunichar ScintillaGTKAccessible::AtkTextIface::GetCharacterAtOffset(AtkText *text, gint offset) { WRAPPER_METHOD_BODY(text, GetCharacterAtOffset(offset), 0) } diff --git a/gtk/ScintillaGTKAccessible.h b/gtk/ScintillaGTKAccessible.h index de1584ded..5614c88e2 100644 --- a/gtk/ScintillaGTKAccessible.h +++ b/gtk/ScintillaGTKAccessible.h @@ -10,6 +10,10 @@ namespace Scintilla { #endif +#ifndef ATK_CHECK_VERSION +# define ATK_CHECK_VERSION(x, y, z) 0 +#endif + class ScintillaGTKAccessible { private: GtkAccessible *accessible; @@ -72,7 +76,9 @@ private: gchar *GetTextAfterOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar); gchar *GetTextBeforeOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar); gchar *GetTextAtOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar); +#if ATK_CHECK_VERSION(2, 10, 0) gchar *GetStringAtOffset(int charOffset, AtkTextGranularity granularity, int *startChar, int *endChar); +#endif gunichar GetCharacterAtOffset(int charOffset); gint GetCharacterCount(); gint GetCaretOffset(); @@ -124,7 +130,9 @@ public: static gchar *GetTextAfterOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset); static gchar *GetTextBeforeOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset); static gchar *GetTextAtOffset(AtkText *text, gint offset, AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset); +#if ATK_CHECK_VERSION(2, 10, 0) static gchar *GetStringAtOffset(AtkText *text, gint offset, AtkTextGranularity granularity, gint *start_offset, gint *end_offset); +#endif static gunichar GetCharacterAtOffset(AtkText *text, gint offset); static gint GetCharacterCount(AtkText *text); static gint GetCaretOffset(AtkText *text); |