diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-12-13 15:33:24 -0500 |
---|---|---|
committer | Arun Thondapu <arunkumar.thondapu@in.ibm.com> | 2013-05-01 18:15:46 +0530 |
commit | bcac6ad70ee319247deb043444a858ffd48b487d (patch) | |
tree | ac6bb8dcb8494c3628e0980cdfb05e33f10ab4b8 /bundles/org.eclipse.swt/Eclipse SWT PI | |
parent | de1ef9e5dd8e2f657b19ac5e5eaa6cbf2017d8bb (diff) | |
download | eclipse.platform.swt-bcac6ad70ee319247deb043444a858ffd48b487d.tar.gz eclipse.platform.swt-bcac6ad70ee319247deb043444a858ffd48b487d.tar.xz eclipse.platform.swt-bcac6ad70ee319247deb043444a858ffd48b487d.zip |
DateTime on top of GtkSpinButton (work in progress)
Conflicts:
bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI')
5 files changed, 81 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c index 9a7d196c02..7dab5cae2f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c @@ -9976,6 +9976,26 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1entry_1get_1visibility) } #endif +#ifndef NO__1gtk_1entry_1get_1width_1chars +JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1entry_1get_1width_1chars) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + OS_NATIVE_ENTER(env, that, _1gtk_1entry_1get_1width_1chars_FUNC); +/* + rc = (jint)gtk_entry_get_width_chars(arg0); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_entry_get_width_chars) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + OS_NATIVE_EXIT(env, that, _1gtk_1entry_1get_1width_1chars_FUNC); + return rc; +} +#endif + #ifndef NO__1gtk_1entry_1new JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1entry_1new) (JNIEnv *env, jclass that) @@ -10127,7 +10147,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1width_1chars) (JNIEnv *env, jclass that, jintLong arg0, jint arg1) { OS_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1width_1chars_FUNC); - gtk_entry_set_width_chars((GtkEntry *)arg0, (gint)arg1); +/* + gtk_entry_set_width_chars(arg0, arg1); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_entry_set_width_chars) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1); + } + } OS_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1width_1chars_FUNC); } #endif @@ -14797,6 +14825,24 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1spin_1button_1set_1increments) } #endif +#ifndef NO__1gtk_1spin_1button_1set_1numeric +JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1spin_1button_1set_1numeric) + (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) +{ + OS_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1set_1numeric_FUNC); +/* + gtk_spin_button_set_numeric((GtkSpinButton*)arg0, arg1); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_spin_button_set_numeric) + if (fp) { + ((void (CALLING_CONVENTION*)(GtkSpinButton*, jboolean))fp)((GtkSpinButton*)arg0, arg1); + } + } + OS_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1set_1numeric_FUNC); +} +#endif + #ifndef NO__1gtk_1spin_1button_1set_1range JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1spin_1button_1set_1range) (JNIEnv *env, jclass that, jintLong arg0, jdouble arg1, jdouble arg2) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h index e31fe11b51..59978fde8b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h @@ -183,6 +183,9 @@ #define gtk_window_set_keep_below_LIB LIB_GTK #define gtk_set_locale_LIB LIB_GTK #define gtk_scrollbar_new_LIB LIB_GTK +#define gtk_spin_button_set_numeric_LIB LIB_GTK +#define gtk_entry_get_width_chars_LIB LIB_GTK +#define gtk_entry_set_width_chars_LIB LIB_GTK #define gtk_hscrollbar_new_LIB LIB_GTK #define gtk_vscrollbar_new_LIB LIB_GTK #define gtk_separator_new_LIB LIB_GTK diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c index 736669da93..bcfe4aaa8a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c @@ -737,6 +737,7 @@ char * OS_nativeFunctionNames[] = { "_1gtk_1entry_1get_1max_1length", "_1gtk_1entry_1get_1text", "_1gtk_1entry_1get_1visibility", + "_1gtk_1entry_1get_1width_1chars", "_1gtk_1entry_1new", "_1gtk_1entry_1set_1alignment", "_1gtk_1entry_1set_1has_1frame", @@ -1054,6 +1055,7 @@ char * OS_nativeFunctionNames[] = { "_1gtk_1spin_1button_1new", "_1gtk_1spin_1button_1set_1digits", "_1gtk_1spin_1button_1set_1increments", + "_1gtk_1spin_1button_1set_1numeric", "_1gtk_1spin_1button_1set_1range", "_1gtk_1spin_1button_1set_1value", "_1gtk_1spin_1button_1set_1wrap", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h index 5ceb219a25..b702d8c3c6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h @@ -747,6 +747,7 @@ typedef enum { _1gtk_1entry_1get_1max_1length_FUNC, _1gtk_1entry_1get_1text_FUNC, _1gtk_1entry_1get_1visibility_FUNC, + _1gtk_1entry_1get_1width_1chars_FUNC, _1gtk_1entry_1new_FUNC, _1gtk_1entry_1set_1alignment_FUNC, _1gtk_1entry_1set_1has_1frame_FUNC, @@ -1064,6 +1065,7 @@ typedef enum { _1gtk_1spin_1button_1new_FUNC, _1gtk_1spin_1button_1set_1digits_FUNC, _1gtk_1spin_1button_1set_1increments_FUNC, + _1gtk_1spin_1button_1set_1numeric_FUNC, _1gtk_1spin_1button_1set_1range_FUNC, _1gtk_1spin_1button_1set_1value_FUNC, _1gtk_1spin_1button_1set_1wrap_FUNC, 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 1e04c972d7..2185af4d77 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 @@ -7158,15 +7158,22 @@ public static final long /*int*/ gtk_entry_get_inner_border (long /*int*/ entry) lock.unlock(); } } -/** - * @param self cast=(GtkEntry *) - * @param n_chars cast=(gint) - */ -public static final native void _gtk_entry_set_width_chars (long /*int*/ self, int n_chars); -public static final void gtk_entry_set_width_chars (long /*int*/ self, int n_chars) { +/** @method flags=dynamic */ +public static final native int _gtk_entry_get_width_chars(long /*int*/ entry); +public static final int gtk_entry_get_width_chars(long /*int*/ entry) { + lock.lock(); + try { + return _gtk_entry_get_width_chars(entry); + } finally { + lock.unlock(); + } +} +/** @method flags=dynamic */ +public static final native void _gtk_entry_set_width_chars(long /*int*/ entry, int n_chars); +public static final void gtk_entry_set_width_chars(long /*int*/ entry, int n_chars) { lock.lock(); try { - _gtk_entry_set_width_chars(self, n_chars); + _gtk_entry_set_width_chars(entry, n_chars); } finally { lock.unlock(); } @@ -10716,6 +10723,19 @@ public static final void gtk_spin_button_configure(long /*int*/ spin_button, lon lock.unlock(); } } +/** + * @method flags=dynamic + * @param spin_button cast=(GtkSpinButton*) + **/ +public static final native void _gtk_spin_button_set_numeric(long /*int*/ spin_button, boolean numeric); +public static final void gtk_spin_button_set_numeric(long /*int*/ spin_button, boolean numeric) { + lock.lock(); + try { + _gtk_spin_button_set_numeric(spin_button, numeric); + } finally { + lock.unlock(); + } +} /** @param spin_button cast=(GtkSpinButton*) */ public static final native long /*int*/ _gtk_spin_button_get_adjustment(long /*int*/ spin_button); public static final long /*int*/ gtk_spin_button_get_adjustment(long /*int*/ spin_button) { |