summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c214
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h17
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRGBA.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java114
9 files changed, 446 insertions, 5 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 b3c423a855..f26899b651 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
@@ -657,6 +657,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(GdkGeometry_1sizeof)
}
#endif
+#ifndef NO_GdkRGBA_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(GdkRGBA_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, GdkRGBA_1sizeof_FUNC);
+ rc = (jint)GdkRGBA_sizeof();
+ OS_NATIVE_EXIT(env, that, GdkRGBA_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_GdkRectangle_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(GdkRectangle_1sizeof)
(JNIEnv *env, jclass that)
@@ -14465,6 +14477,136 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1status_1icon_1set_1visible)
}
#endif
+#ifndef NO__1gtk_1style_1context_1add_1class
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1add_1class)
+ (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1add_1class_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+ gtk_style_context_add_class(arg0, lparg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_style_context_add_class)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1);
+ }
+ }
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1add_1class_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1background_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1background_1color)
+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+ GdkRGBA _arg2, *lparg2=NULL;
+ OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1background_1color_FUNC);
+ if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+ gtk_style_context_get_background_color(arg0, arg1, lparg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_style_context_get_background_color)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+ }
+ }
+fail:
+ if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+ OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1background_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1border_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1border_1color)
+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+ GdkRGBA _arg2, *lparg2=NULL;
+ OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1border_1color_FUNC);
+ if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+ gtk_style_context_get_border_color(arg0, arg1, lparg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_style_context_get_border_color)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+ }
+ }
+fail:
+ if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+ OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1border_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1color)
+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+ GdkRGBA _arg2, *lparg2=NULL;
+ OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1color_FUNC);
+ if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+ gtk_style_context_get_color(arg0, arg1, lparg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_style_context_get_color)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+ }
+ }
+fail:
+ if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+ OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1font
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1font)
+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1font_FUNC);
+/*
+ rc = (jintLong)gtk_style_context_get_font(arg0, arg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_style_context_get_font)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1font_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1padding
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1padding)
+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+ GtkBorder _arg2, *lparg2=NULL;
+ OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1padding_FUNC);
+ if (arg2) if ((lparg2 = getGtkBorderFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+ gtk_style_context_get_padding(arg0, arg1, lparg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_style_context_get_padding)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jint, GtkBorder *))fp)(arg0, arg1, lparg2);
+ }
+ }
+fail:
+ if (arg2 && lparg2) setGtkBorderFields(env, arg2, lparg2);
+ OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1padding_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1style_1context_1restore
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1restore)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -14787,7 +14929,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1style_1render_1icon)
jintLong rc = 0;
OS_NATIVE_ENTER(env, that, _1gtk_1style_1render_1icon_FUNC);
if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jintLong)gtk_style_render_icon((GtkStyle *)arg0, (GtkIconSource *)arg1, arg2, arg3, arg4, (GtkWidget *)arg5, (const gchar *)lparg6);
+/*
+ rc = (jintLong)gtk_style_render_icon(arg0, arg1, arg2, arg3, arg4, arg5, lparg6);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_style_render_icon)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint, jint, jintLong, jbyte *))fp)(arg0, arg1, arg2, arg3, arg4, arg5, lparg6);
+ }
+ }
fail:
if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
OS_NATIVE_EXIT(env, that, _1gtk_1style_1render_1icon_FUNC);
@@ -17804,6 +17954,68 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1modify_1style)
}
#endif
+#ifndef NO__1gtk_1widget_1override_1background_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1override_1background_1color)
+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+ GdkRGBA _arg2, *lparg2=NULL;
+ OS_NATIVE_ENTER(env, that, _1gtk_1widget_1override_1background_1color_FUNC);
+ if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+ gtk_widget_override_background_color(arg0, arg1, lparg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_widget_override_background_color)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+ }
+ }
+fail:
+ if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+ OS_NATIVE_EXIT(env, that, _1gtk_1widget_1override_1background_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1override_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1override_1color)
+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+ GdkRGBA _arg2, *lparg2=NULL;
+ OS_NATIVE_ENTER(env, that, _1gtk_1widget_1override_1color_FUNC);
+ if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+ gtk_widget_override_color(arg0, arg1, lparg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_widget_override_color)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+ }
+ }
+fail:
+ if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+ OS_NATIVE_EXIT(env, that, _1gtk_1widget_1override_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1override_1font
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1override_1font)
+ (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+ OS_NATIVE_ENTER(env, that, _1gtk_1widget_1override_1font_FUNC);
+/*
+ gtk_widget_override_font(arg0, arg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_widget_override_font)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gtk_1widget_1override_1font_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1widget_1queue_1resize
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1queue_1resize)
(JNIEnv *env, jclass that, jintLong arg0)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
index 29c1f7da82..2df56e9d3c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
@@ -156,6 +156,23 @@
#define NO_GTK_1WIDGET_1REQUISITION_1WIDTH
#define NO_GtkFixed
+#else
+
+#define NO_GdkRGBA
+#define NO__1gtk_1widget_1draw
+#define NO__1gtk_1widget_1override_1color
+#define NO__1gtk_1widget_1override_1background_1color
+#define NO__1gtk_1widget_1override_1font
+#define NO__1gtk_1style_1context_1get_1font
+#define NO__1gtk_1style_1context_1get_1color
+#define NO__1gtk_1style_1context_1get_1background_1color
+#define NO__1gtk_1style_1context_1add_1class
+#define NO__1gtk_1style_1context_1get_1border_1color
+#define NO__1gtk_1style_1context_1get_1padding
+#define NO__1gtk_1style_1context_1restore
+#define NO__1gtk_1style_1context_1save
+#define NO__1gtk_1style_1context_1set_1state
+
#endif
#include "os_custom.h"
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 3adcde311a..3e982f8ca8 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
@@ -269,6 +269,7 @@
#define gtk_style_context_restore_LIB LIB_GTK
#define gtk_style_context_save_LIB LIB_GTK
#define gtk_style_context_set_state_LIB LIB_GTK
+#define gtk_style_render_icon_LIB LIB_GTK
#define gtk_hscale_new_LIB LIB_GTK
#define gtk_vscale_new_LIB LIB_GTK
#define gtk_selection_data_get_data_LIB LIB_GTK
@@ -508,6 +509,15 @@
// GTK3 only
#define gtk_widget_draw_LIB LIB_GTK
+#define gtk_widget_override_color_LIB LIB_GTK
+#define gtk_widget_override_background_color_LIB LIB_GTK
+#define gtk_widget_override_font_LIB LIB_GTK
+#define gtk_style_context_get_font_LIB LIB_GTK
+#define gtk_style_context_get_color_LIB LIB_GTK
+#define gtk_style_context_get_background_color_LIB LIB_GTK
+#define gtk_style_context_add_class_LIB LIB_GTK
+#define gtk_style_context_get_border_color_LIB LIB_GTK
+#define gtk_style_context_get_padding_LIB LIB_GTK
/* Field accessors */
#if GTK_CHECK_VERSION(3,0,0)
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 a61701050f..7e2f0d693a 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
@@ -80,6 +80,7 @@ char * OS_nativeFunctionNames[] = {
"GdkEventWindowState_1sizeof",
"GdkEvent_1sizeof",
"GdkGeometry_1sizeof",
+ "GdkRGBA_1sizeof",
"GdkRectangle_1sizeof",
"GdkWindowAttr_1sizeof",
"GtkAdjustment_1sizeof",
@@ -1032,6 +1033,12 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1status_1icon_1set_1from_1pixbuf",
"_1gtk_1status_1icon_1set_1tooltip",
"_1gtk_1status_1icon_1set_1visible",
+ "_1gtk_1style_1context_1add_1class",
+ "_1gtk_1style_1context_1get_1background_1color",
+ "_1gtk_1style_1context_1get_1border_1color",
+ "_1gtk_1style_1context_1get_1color",
+ "_1gtk_1style_1context_1get_1font",
+ "_1gtk_1style_1context_1get_1padding",
"_1gtk_1style_1context_1restore",
"_1gtk_1style_1context_1save",
"_1gtk_1style_1context_1set_1state",
@@ -1317,6 +1324,9 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1widget_1modify_1bg",
"_1gtk_1widget_1modify_1font",
"_1gtk_1widget_1modify_1style",
+ "_1gtk_1widget_1override_1background_1color",
+ "_1gtk_1widget_1override_1color",
+ "_1gtk_1widget_1override_1font",
"_1gtk_1widget_1queue_1resize",
"_1gtk_1widget_1realize",
"_1gtk_1widget_1remove_1accelerator",
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 58c65bc762..7ad8b58467 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
@@ -90,6 +90,7 @@ typedef enum {
GdkEventWindowState_1sizeof_FUNC,
GdkEvent_1sizeof_FUNC,
GdkGeometry_1sizeof_FUNC,
+ GdkRGBA_1sizeof_FUNC,
GdkRectangle_1sizeof_FUNC,
GdkWindowAttr_1sizeof_FUNC,
GtkAdjustment_1sizeof_FUNC,
@@ -1042,6 +1043,12 @@ typedef enum {
_1gtk_1status_1icon_1set_1from_1pixbuf_FUNC,
_1gtk_1status_1icon_1set_1tooltip_FUNC,
_1gtk_1status_1icon_1set_1visible_FUNC,
+ _1gtk_1style_1context_1add_1class_FUNC,
+ _1gtk_1style_1context_1get_1background_1color_FUNC,
+ _1gtk_1style_1context_1get_1border_1color_FUNC,
+ _1gtk_1style_1context_1get_1color_FUNC,
+ _1gtk_1style_1context_1get_1font_FUNC,
+ _1gtk_1style_1context_1get_1padding_FUNC,
_1gtk_1style_1context_1restore_FUNC,
_1gtk_1style_1context_1save_FUNC,
_1gtk_1style_1context_1set_1state_FUNC,
@@ -1327,6 +1334,9 @@ typedef enum {
_1gtk_1widget_1modify_1bg_FUNC,
_1gtk_1widget_1modify_1font_FUNC,
_1gtk_1widget_1modify_1style_FUNC,
+ _1gtk_1widget_1override_1background_1color_FUNC,
+ _1gtk_1widget_1override_1color_FUNC,
+ _1gtk_1widget_1override_1font_FUNC,
_1gtk_1widget_1queue_1resize_FUNC,
_1gtk_1widget_1realize_FUNC,
_1gtk_1widget_1remove_1accelerator_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
index 1686d21ce4..a8813e21e9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
@@ -1126,6 +1126,46 @@ void setGdkImageFields(JNIEnv *env, jobject lpObject, GdkImage *lpStruct)
}
#endif
+#ifndef NO_GdkRGBA
+typedef struct GdkRGBA_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID red, green, blue, alpha;
+} GdkRGBA_FID_CACHE;
+
+GdkRGBA_FID_CACHE GdkRGBAFc;
+
+void cacheGdkRGBAFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkRGBAFc.cached) return;
+ GdkRGBAFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkRGBAFc.red = (*env)->GetFieldID(env, GdkRGBAFc.clazz, "red", "D");
+ GdkRGBAFc.green = (*env)->GetFieldID(env, GdkRGBAFc.clazz, "green", "D");
+ GdkRGBAFc.blue = (*env)->GetFieldID(env, GdkRGBAFc.clazz, "blue", "D");
+ GdkRGBAFc.alpha = (*env)->GetFieldID(env, GdkRGBAFc.clazz, "alpha", "D");
+ GdkRGBAFc.cached = 1;
+}
+
+GdkRGBA *getGdkRGBAFields(JNIEnv *env, jobject lpObject, GdkRGBA *lpStruct)
+{
+ if (!GdkRGBAFc.cached) cacheGdkRGBAFields(env, lpObject);
+ lpStruct->red = (*env)->GetDoubleField(env, lpObject, GdkRGBAFc.red);
+ lpStruct->green = (*env)->GetDoubleField(env, lpObject, GdkRGBAFc.green);
+ lpStruct->blue = (*env)->GetDoubleField(env, lpObject, GdkRGBAFc.blue);
+ lpStruct->alpha = (*env)->GetDoubleField(env, lpObject, GdkRGBAFc.alpha);
+ return lpStruct;
+}
+
+void setGdkRGBAFields(JNIEnv *env, jobject lpObject, GdkRGBA *lpStruct)
+{
+ if (!GdkRGBAFc.cached) cacheGdkRGBAFields(env, lpObject);
+ (*env)->SetDoubleField(env, lpObject, GdkRGBAFc.red, (jdouble)lpStruct->red);
+ (*env)->SetDoubleField(env, lpObject, GdkRGBAFc.green, (jdouble)lpStruct->green);
+ (*env)->SetDoubleField(env, lpObject, GdkRGBAFc.blue, (jdouble)lpStruct->blue);
+ (*env)->SetDoubleField(env, lpObject, GdkRGBAFc.alpha, (jdouble)lpStruct->alpha);
+}
+#endif
+
#ifndef NO_GdkRectangle
typedef struct GdkRectangle_FID_CACHE {
int cached;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
index 2b22c726f8..cbea7c290f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
@@ -267,6 +267,18 @@ void setGdkImageFields(JNIEnv *env, jobject lpObject, GdkImage *lpStruct);
#define GdkImage_sizeof() 0
#endif
+#ifndef NO_GdkRGBA
+void cacheGdkRGBAFields(JNIEnv *env, jobject lpObject);
+GdkRGBA *getGdkRGBAFields(JNIEnv *env, jobject lpObject, GdkRGBA *lpStruct);
+void setGdkRGBAFields(JNIEnv *env, jobject lpObject, GdkRGBA *lpStruct);
+#define GdkRGBA_sizeof() sizeof(GdkRGBA)
+#else
+#define cacheGdkRGBAFields(a,b)
+#define getGdkRGBAFields(a,b,c) NULL
+#define setGdkRGBAFields(a,b,c)
+#define GdkRGBA_sizeof() 0
+#endif
+
#ifndef NO_GdkRectangle
void cacheGdkRectangleFields(JNIEnv *env, jobject lpObject);
GdkRectangle *getGdkRectangleFields(JNIEnv *env, jobject lpObject, GdkRectangle *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRGBA.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRGBA.java
new file mode 100644
index 0000000000..035de4eaf3
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRGBA.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt). The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html. If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.gtk;
+
+
+public class GdkRGBA {
+ public double red;
+ public double green;
+ public double blue;
+ public double alpha;
+ public static final int sizeof = OS.GdkRGBA_sizeof();
+}
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 f1ff4f90b2..a80aecf297 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
@@ -378,6 +378,14 @@ public class OS extends C {
public static final int GTK_STATE_NORMAL = 0x0;
public static final int GTK_STATE_PRELIGHT = 0x2;
public static final int GTK_STATE_SELECTED = 0x3;
+ public static final int GTK_STATE_FLAG_NORMAL = 0;
+ public static final int GTK_STATE_FLAG_ACTIVE = 1 << 0;
+ public static final int GTK_STATE_FLAG_PRELIGHT = 1 << 1;
+ public static final int GTK_STATE_FLAG_SELECTED = 1 << 2;
+ public static final int GTK_STATE_FLAG_INSENSITIVE = 1 << 3;
+ public static final int GTK_STATE_FLAG_INCONSISTENT = 1 << 4;
+ public static final int GTK_STATE_FLAG_FOCUSED = 1 << 5;
+ public static final int GTK_STATE_FLAG_BACKDROP = 1 << 6;
public static final int GTK_TEXT_DIR_LTR = 1;
public static final int GTK_TEXT_DIR_NONE = 0 ;
public static final int GTK_TEXT_DIR_RTL = 2;
@@ -551,6 +559,10 @@ public class OS extends C {
public static final byte[] visibility_notify_event = ascii("visibility-notify-event");
public static final byte[] window_state_event = ascii("window-state-event");
+ public static final byte[] GTK_STYLE_CLASS_TOOLTIP = ascii("tooltip");
+ public static final byte[] GTK_STYLE_CLASS_VIEW = ascii("view");
+ public static final byte[] GTK_STYLE_CLASS_CELL = ascii("cell");
+
/** Properties */
public static final byte[] active = ascii("active");
public static final byte[] background_gdk = ascii("background-gdk");
@@ -632,6 +644,7 @@ public static final native int GPollFD_sizeof ();
public static final native int GTypeInfo_sizeof ();
public static final native int GTypeQuery_sizeof ();
public static final native int GdkColor_sizeof();
+public static final native int GdkRGBA_sizeof();
public static final native int GdkDragContext_sizeof();
public static final native int GdkEvent_sizeof();
public static final native int GdkEventAny_sizeof();
@@ -10582,6 +10595,66 @@ public static final void gtk_style_get_base(long /*int*/ style, int index, GdkCo
}
}
/** @method flags=dynamic */
+public static final native void _gtk_style_context_add_class(long /*int*/ context, byte[] class_name);
+public static final void gtk_style_context_add_class(long /*int*/ context, byte[] class_name) {
+ lock.lock();
+ try {
+ _gtk_style_context_add_class(context, class_name);
+ } finally {
+ lock.unlock();
+ }
+}
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_get_background_color(long /*int*/ context, int state, GdkRGBA color);
+public static final void gtk_style_context_get_background_color(long /*int*/ context, int state, GdkRGBA color) {
+ lock.lock();
+ try {
+ _gtk_style_context_get_background_color(context, state, color);
+ } finally {
+ lock.unlock();
+ }
+}
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_get_border_color(long /*int*/ context, int state, GdkRGBA color);
+public static final void gtk_style_context_get_border_color(long /*int*/ context, int state, GdkRGBA color) {
+ lock.lock();
+ try {
+ _gtk_style_context_get_border_color(context, state, color);
+ } finally {
+ lock.unlock();
+ }
+}
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_get_color(long /*int*/ context, int state, GdkRGBA color);
+public static final void gtk_style_context_get_color(long /*int*/ context, int state, GdkRGBA color) {
+ lock.lock();
+ try {
+ _gtk_style_context_get_color(context, state, color);
+ } finally {
+ lock.unlock();
+ }
+}
+/** @method flags=dynamic */
+public static final native long /*int*/ _gtk_style_context_get_font(long /*int*/ context, int state);
+public static final long /*int*/ gtk_style_context_get_font(long /*int*/ context, int state) {
+ lock.lock();
+ try {
+ return _gtk_style_context_get_font(context, state);
+ } finally {
+ lock.unlock();
+ }
+}
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_get_padding(long /*int*/ context, int state, GtkBorder padding);
+public static final void gtk_style_context_get_padding(long /*int*/ context, int state, GtkBorder padding) {
+ lock.lock();
+ try {
+ _gtk_style_context_get_padding(context, state, padding);
+ } finally {
+ lock.unlock();
+ }
+}
+/** @method flags=dynamic */
public static final native void _gtk_style_context_save(long /*int*/ self);
public static final void gtk_style_context_save(long /*int*/ self) {
lock.lock();
@@ -10849,10 +10922,7 @@ public static final int gtk_style_get_ythickness(long /*int*/ style) {
}
}
/**
- * @param style cast=(GtkStyle *)
- * @param source cast=(GtkIconSource *)
- * @param widget cast=(GtkWidget *)
- * @param detail cast=(const gchar *)
+ * @method flags=dynamic
*/
public static final native long /*int*/ _gtk_style_render_icon(long /*int*/ style, long /*int*/ source, int direction, int state, int size, long /*int*/ widget, byte[] detail);
public static final long /*int*/ gtk_style_render_icon(long /*int*/ style, long /*int*/ source, int direction, int state, int size, long /*int*/ widget, byte[] detail) {
@@ -13444,6 +13514,42 @@ public static final void gtk_widget_modify_style(long /*int*/ widget, long /*int
lock.unlock();
}
}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_widget_override_color(long /*int*/ widget, int state, GdkRGBA color);
+public static final void gtk_widget_override_color(long /*int*/ widget, int state, GdkRGBA color) {
+ lock.lock();
+ try {
+ _gtk_widget_override_color(widget, state, color);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_widget_override_background_color(long /*int*/ widget, int state, GdkRGBA color);
+public static final void gtk_widget_override_background_color(long /*int*/ widget, int state, GdkRGBA color) {
+ lock.lock();
+ try {
+ _gtk_widget_override_background_color(widget, state, color);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_widget_override_font(long /*int*/ widget, long /*int*/ font);
+public static final void gtk_widget_override_font(long /*int*/ widget, long /*int*/ font) {
+ lock.lock();
+ try {
+ _gtk_widget_override_font(widget, font);
+ } finally {
+ lock.unlock();
+ }
+}
/** @param widget cast=(GtkWidget *) */
public static final native void _gtk_widget_queue_resize(long /*int*/ widget);
public static final void gtk_widget_queue_resize(long /*int*/ widget) {