[java-atk-wrapper] jaweditabletext: fix formatting
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] jaweditabletext: fix formatting
- Date: Thu, 20 Nov 2014 15:36:04 +0000 (UTC)
commit 3ef5c4753f8c0824ba89726e2ee4a478bb2ec494
Author: Magdalen Berns <m berns thismagpie com>
Date: Thu Nov 20 15:35:12 2014 +0000
jaweditabletext: fix formatting
spaces for tabs etc
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=740437
jni/src/jaweditabletext.c | 115 +++++++++++++++++++++++++++++++++------------
1 files changed, 84 insertions(+), 31 deletions(-)
---
diff --git a/jni/src/jaweditabletext.c b/jni/src/jaweditabletext.c
index 5e3490a..cd88e53 100644
--- a/jni/src/jaweditabletext.c
+++ b/jni/src/jaweditabletext.c
@@ -22,23 +22,23 @@
#include "jawimpl.h"
#include "jawutil.h"
-extern void jaw_editable_text_interface_init (AtkEditableTextIface*);
-extern gpointer jaw_editable_text_data_init (jobject);
-extern void jaw_editable_text_data_finalize (gpointer);
+extern void jaw_editable_text_interface_init(AtkEditableTextIface*);
+extern gpointer jaw_editable_text_data_init(jobject);
+extern void jaw_editable_text_data_finalize(gpointer);
static void jaw_editable_text_set_text_contents(AtkEditableText *text,
- const gchar *string);
-static void jaw_editable_text_insert_text(AtkEditableText *text,
+ const gchar *string);
+static void jaw_editable_text_insert_text(AtkEditableText *text,
const gchar *string,
gint length,
gint *position);
static void jaw_editable_text_copy_text(AtkEditableText *text,
gint start_pos,
gint end_pos);
-static void jaw_editable_text_cut_text(AtkEditableText *text,
+static void jaw_editable_text_cut_text(AtkEditableText *text,
gint start_pos,
gint end_pos);
-static void jaw_editable_text_delete_text(AtkEditableText *text,
+static void jaw_editable_text_delete_text(AtkEditableText *text,
gint start_pos,
gint end_pos);
static void jaw_editable_text_paste_text(AtkEditableText *text,
@@ -65,10 +65,18 @@ jaw_editable_text_data_init (jobject ac)
EditableTextData *data = g_new0(EditableTextData, 1);
JNIEnv *jniEnv = jaw_util_get_jni_env();
- jclass classEditableText = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkEditableText");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classEditableText, "<init>",
"(Ljavax/accessibility/AccessibleContext;)V");
- jobject jatk_editable_text = (*jniEnv)->NewObject(jniEnv, classEditableText, jmid, ac);
- data->atk_editable_text = (*jniEnv)->NewGlobalRef(jniEnv, jatk_editable_text);
+ jclass classEditableText = (*jniEnv)->FindClass(jniEnv,
+ "org/GNOME/Accessibility/AtkEditableText");
+ jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv,
+ classEditableText,
+ "<init>",
+ "(Ljavax/accessibility/AccessibleContext;)V");
+ jobject jatk_editable_text = (*jniEnv)->NewObject(jniEnv,
+ classEditableText,
+ jmid,
+ ac);
+ data->atk_editable_text = (*jniEnv)->NewGlobalRef(jniEnv,
+ jatk_editable_text);
return data;
}
@@ -95,8 +103,12 @@ jaw_editable_text_set_text_contents (AtkEditableText *text,
jobject atk_editable_text = data->atk_editable_text;
JNIEnv *jniEnv = jaw_util_get_jni_env();
- jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkEditableText");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkEditableText, "set_text_contents",
"(Ljava/lang/String;)V");
+ jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv,
+ "org/GNOME/Accessibility/AtkEditableText");
+ jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv,
+ classAtkEditableText,
+ "set_text_contents",
+ "(Ljava/lang/String;)V");
jstring jstr = (*jniEnv)->NewStringUTF(jniEnv, string);
(*jniEnv)->CallVoidMethod(jniEnv, atk_editable_text, jmid, jstr);
@@ -113,11 +125,18 @@ jaw_editable_text_insert_text (AtkEditableText *text,
jobject atk_editable_text = data->atk_editable_text;
JNIEnv *jniEnv = jaw_util_get_jni_env();
- jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkEditableText");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkEditableText, "insert_text",
"(Ljava/lang/String;I)V");
+ jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv,
+ "org/GNOME/Accessibility/AtkEditableText");
+ jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv,
+ classAtkEditableText,
+ "insert_text",
+ "(Ljava/lang/String;I)V");
jstring jstr = (*jniEnv)->NewStringUTF(jniEnv, string);
- (*jniEnv)->CallVoidMethod(jniEnv, atk_editable_text, jmid, jstr, (jint)*position);
+ (*jniEnv)->CallVoidMethod(jniEnv,
+ atk_editable_text,
+ jmid, jstr,
+ (jint)*position);
*position = *position + length;
atk_text_set_caret_offset(ATK_TEXT(jaw_obj), *position);
}
@@ -128,13 +147,22 @@ jaw_editable_text_copy_text (AtkEditableText *text,
gint end_pos)
{
JawObject *jaw_obj = JAW_OBJECT(text);
- EditableTextData *data = jaw_object_get_interface_data(jaw_obj, INTERFACE_EDITABLE_TEXT);
+ EditableTextData *data = jaw_object_get_interface_data(jaw_obj,
+ INTERFACE_EDITABLE_TEXT);
jobject atk_editable_text = data->atk_editable_text;
JNIEnv *jniEnv = jaw_util_get_jni_env();
- jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkEditableText");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkEditableText, "copy_text", "(II)V");
- (*jniEnv)->CallVoidMethod(jniEnv, atk_editable_text, jmid, (jint)start_pos, (jint)end_pos);
+ jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv,
+ "org/GNOME/Accessibility/AtkEditableText");
+ jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv,
+ classAtkEditableText,
+ "copy_text",
+ "(II)V");
+ (*jniEnv)->CallVoidMethod(jniEnv,
+ atk_editable_text,
+ jmid,
+ (jint)start_pos,
+ (jint)end_pos);
}
void
@@ -146,9 +174,17 @@ jaw_editable_text_cut_text (AtkEditableText *text,
jobject atk_editable_text = data->atk_editable_text;
JNIEnv *jniEnv = jaw_util_get_jni_env();
- jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkEditableText");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkEditableText, "cut_text", "(II)V");
- (*jniEnv)->CallVoidMethod(jniEnv, atk_editable_text, jmid, (jint)start_pos, (jint)end_pos);
+ jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv,
+ "org/GNOME/Accessibility/AtkEditableText");
+ jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv,
+ classAtkEditableText,
+ "cut_text",
+ "(II)V");
+ (*jniEnv)->CallVoidMethod(jniEnv,
+ atk_editable_text,
+ jmid,
+ (jint)start_pos,
+ (jint)end_pos);
}
void
@@ -157,13 +193,22 @@ jaw_editable_text_delete_text (AtkEditableText *text,
gint end_pos)
{
JawObject *jaw_obj = JAW_OBJECT(text);
- EditableTextData *data = jaw_object_get_interface_data(jaw_obj, INTERFACE_EDITABLE_TEXT);
+ EditableTextData *data = jaw_object_get_interface_data(jaw_obj,
+ INTERFACE_EDITABLE_TEXT);
jobject atk_editable_text = data->atk_editable_text;
JNIEnv *jniEnv = jaw_util_get_jni_env();
- jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkEditableText");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkEditableText, "delete_text", "(II)V");
- (*jniEnv)->CallVoidMethod(jniEnv, atk_editable_text, jmid, (jint)start_pos, (jint)end_pos);
+ jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv,
+ "org/GNOME/Accessibility/AtkEditableText");
+ jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv,
+ classAtkEditableText,
+ "delete_text",
+ "(II)V");
+ (*jniEnv)->CallVoidMethod(jniEnv,
+ atk_editable_text,
+ jmid,
+ (jint)start_pos,
+ (jint)end_pos);
}
void
@@ -171,12 +216,20 @@ jaw_editable_text_paste_text (AtkEditableText *text,
gint position)
{
JawObject *jaw_obj = JAW_OBJECT(text);
- EditableTextData *data = jaw_object_get_interface_data(jaw_obj, INTERFACE_EDITABLE_TEXT);
+ EditableTextData *data = jaw_object_get_interface_data(jaw_obj,
+ INTERFACE_EDITABLE_TEXT);
jobject atk_editable_text = data->atk_editable_text;
JNIEnv *jniEnv = jaw_util_get_jni_env();
- jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkEditableText");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkEditableText, "paste_text", "(I)V");
- (*jniEnv)->CallVoidMethod(jniEnv, atk_editable_text, jmid, (jint)position);
+ jclass classAtkEditableText = (*jniEnv)->FindClass(jniEnv,
+ "org/GNOME/Accessibility/AtkEditableText");
+ jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv,
+ classAtkEditableText,
+ "paste_text",
+ "(I)V");
+ (*jniEnv)->CallVoidMethod(jniEnv,
+ atk_editable_text,
+ jmid,
+ (jint)position);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]