diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2013-07-11 16:21:18 +0300 |
---|---|---|
committer | Alexander Kurtakov <akurtako@redhat.com> | 2013-07-11 16:21:18 +0300 |
commit | 3bd130c31bf829e2454963f915aed0e3e9db5b5b (patch) | |
tree | d5b0a5796326f9bf04e6205af41ff8e72764b3f0 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org | |
parent | b2aec83df14dd2f80829ffc496ee04062a7a05e2 (diff) | |
download | eclipse.platform.swt-3bd130c31bf829e2454963f915aed0e3e9db5b5b.tar.gz eclipse.platform.swt-3bd130c31bf829e2454963f915aed0e3e9db5b5b.tar.xz eclipse.platform.swt-3bd130c31bf829e2454963f915aed0e3e9db5b5b.zip |
Use gtk_text_buffer_select_range instead of gtk_text_buffer_move_mark.
gtk_text_buffer_select_range exists since GTK 2.4 and is an optimized
way to do selection as reduces GTK recalculations. It has additional
benefit for SWT as it reduces the JNI overhead too - 3-4 function call
become a single one.
Bug 412758 .
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java index 5b6aa53829..3b64195768 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java @@ -11474,14 +11474,14 @@ public static final void gtk_text_buffer_insert(long /*int*/ buffer, long /*int* } /** * @param buffer cast=(GtkTextBuffer *) - * @param mark cast=(GtkTextMark *) - * @param where cast=(const GtkTextIter *) + * @param ins cast=(const GtkTextIter *) + * @param bound cast=(const GtkTextIter *) */ -public static final native void _gtk_text_buffer_move_mark(long /*int*/ buffer, long /*int*/ mark, byte[] where); -public static final void gtk_text_buffer_move_mark(long /*int*/ buffer, long /*int*/ mark, byte[] where) { +public static final native void _gtk_text_buffer_select_range (long /*int*/ buffer, byte[] ins, byte[] bound); +public static final void gtk_text_buffer_select_range (long /*int*/ buffer, byte[] ins, byte[] bound) { lock.lock(); try { - _gtk_text_buffer_move_mark(buffer, mark, where); + _gtk_text_buffer_select_range(buffer, ins, bound); } finally { lock.unlock(); } |