⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kaffe-1.1.6-xynth.diff

📁 CS架构的多平台的GUI系统
💻 DIFF
字号:
diff -U 3 -H -d -r -N kaffe-1.1.6/Makefile.am kaffe-1.1.6-xynth/Makefile.am--- kaffe-1.1.6/Makefile.am	2005-09-20 02:45:54.000000000 +0300+++ kaffe-1.1.6-xynth/Makefile.am	2005-12-28 14:32:04.000000000 +0200@@ -247,6 +247,9 @@ if COND_KAFFE_X_AWT DIRECTORIES_AFTER_RTJAR += libraries/clib/awt/X endif+if COND_KAFFE_XYNTH_AWT+DIRECTORIES_AFTER_RTJAR += libraries/clib/awt/xynth+endif if COND_KAFFE_QT_AWT DIRECTORIES_AFTER_RTJAR += libraries/clib/awt/qt endifdiff -U 3 -H -d -r -N kaffe-1.1.6/configure.ac kaffe-1.1.6-xynth/configure.ac--- kaffe-1.1.6/configure.ac	2005-09-20 03:04:17.000000000 +0300+++ kaffe-1.1.6-xynth/configure.ac	2005-12-28 15:16:54.000000000 +0200@@ -1807,6 +1807,30 @@    fi fi +AC_ARG_WITH([kaffe-xynth-awt],+	AS_HELP_STRING([--with-kaffe-xynth-awt],+			[enable build of Kaffe's Xynth AWT engine (not built by default)]),+	[],+	[with_kaffe_xynth_awt=no]+)++AM_CONDITIONAL(COND_KAFFE_XYNTH_AWT, test x"$with_kaffe_xynth_awt" != x"no")++if test x"$enable_native_awt" = x"yes"; then+   if test x"$with_kaffe_xynth_awt" = x"yes"; then++   	dnl -----------------------------------------------------------------------+	dnl 	Xynth AWT support+	dnl -----------------------------------------------------------------------++        AWT_LIBS="-lxynth"+	AWT_LIBS="$CTLIBS $AWT_LIBS"+	AC_SUBST(AWT_LIBS)+			+	AWT_LIB="$AWT_LIB \$(top_builddir)/libraries/clib/awt/xynth/libxynthawt.la"+   fi+fi+ AC_ARG_WITH([classpath-gtk-awt],             AS_HELP_STRING([--without-classpath-gtk-awt],                            [disable build of GNU Classpath's Gtk+-based AWT engine (built by default)]),@@ -2366,6 +2390,7 @@ AC_CONFIG_FILES([libraries/clib/awt/X/Makefile]) AC_CONFIG_FILES([libraries/clib/awt/qt/Makefile]) AC_CONFIG_FILES([libraries/clib/awt/nano-X/Makefile])+AC_CONFIG_FILES([libraries/clib/awt/xynth/Makefile]) AC_CONFIG_FILES([libraries/clib/sound/Makefile]) AC_CONFIG_FILES([libraries/clib/sound/alsa/Makefile]) AC_CONFIG_FILES([libraries/clib/sound/common/Makefile])diff -U 3 -H -d -r -N kaffe-1.1.6/README.xynth kaffe-1.1.6-xynth/README.xynth--- kaffe-1.1.6/README.xynth	1970-01-01 02:00:00.000000000 +0200+++ kaffe-1.1.6-xynth/README.xynth 2005-12-28 16:37:20.000000000 +0200@@ -0,0 +1,8 @@++# developers/autogen.sh+# ./configure --with-kaffe-xynth-awt --without-classpath-gtk-awt+# make+# make install++ Alper Akcan <distchx@yahoo.com>+diff -U 3 -H -d -r -N kaffe-1.1.6/kaffe/kaffe/Makefile.am kaffe-1.1.6-xynth/kaffe/kaffe/Makefile.am--- kaffe-1.1.6/kaffe/kaffe/Makefile.am	2005-05-20 23:10:16.000000000 +0300+++ kaffe-1.1.6-xynth/kaffe/kaffe/Makefile.am	2005-12-28 15:50:26.000000000 +0200@@ -20,6 +20,10 @@ INCLUDE_KAFFE_X_AWT = -DKAFFE_X_AWT_INCLUDED endif +if COND_KAFFE_XYNTH_AWT+INCLUDE_KAFFE_XYNTH_AWT = -DKAFFE_XYNTH_AWT_INCLUDED+endif+ if COND_KAFFE_QT_AWT INCLUDE_KAFFE_QT_AWT = -DKAFFE_QT_AWT_INCLUDED endif@@ -38,7 +42,8 @@ 	-I$(top_builddir)/include \ 	$(INCLUDE_KAFFE_X_AWT) \ 	$(INCLUDE_KAFFE_QT_AWT) \-	$(INCLUDE_KAFFE_NANOX_AWT)+	$(INCLUDE_KAFFE_NANOX_AWT) \+	$(INCLUDE_KAFFE_XYNTH_AWT)  kaffe_bin_SOURCES = \ 	main.c \diff -U 3 -H -d -r -N kaffe-1.1.6/kaffe/kaffe/main.c kaffe-1.1.6-xynth/kaffe/kaffe/main.c--- kaffe-1.1.6/kaffe/kaffe/main.c	2005-09-16 03:59:05.000000000 +0300+++ kaffe-1.1.6-xynth/kaffe/kaffe/main.c	2005-12-28 15:48:14.000000000 +0200@@ -365,7 +365,7 @@  */  #if defined (KAFFE_X_AWT_INCLUDED) || defined (KAFFE_QT_AWT_INCLUDED)	\-  || defined (KAFFE_NANOX_AWT_INCLUDED)+  || defined (KAFFE_NANOX_AWT_INCLUDED) || defined(KAFFE_XYNTH_AWT_INCLUDED) static  userProperty* setKaffeAWT(const char * propStr)@@ -520,6 +520,13 @@ 			prop = setKaffeAWT("kaffe.awt.nativelib=nanoxawt"); 		} #endif+#ifdef KAFFE_XYNTH_AWT_INCLUDED+		/* Extra option to use kaffe's Xynth AWT backend.+		 */+		else if (strncmp(argv[i], "-Xkaffe-xynth-awt", (j=17)) == 0) {+			prop = setKaffeAWT("kaffe.awt.nativelib=xynthawt");+		}+#endif #if defined(USE_GMP) 		/* Extra option to use gmp for native, fast bignums. 		 * Only available with binreloc, since binreloc is used to@@ -990,6 +997,9 @@ #ifdef KAFFE_NANOX_AWT_INCLUDED 	fprintf(stderr, _("	-Xkaffe-nanox-awt	 Use Kaffe's Nano-X AWT backend\n")); #endif+#ifdef KAFFE_XYNTH_AWT_INCLUDED+	fprintf(stderr, _("	-Xkaffe-xynth-awt	 Use Kaffe's Xynth AWT backend\n"));+#endif  	fprintf(stderr, _("  * Option currently ignored.\n" 			  "\n"diff -U 3 -H -d -r -N kaffe-1.1.6/libraries/clib/awt/Makefile.am kaffe-1.1.6-xynth/libraries/clib/awt/Makefile.am--- kaffe-1.1.6/libraries/clib/awt/Makefile.am	2005-08-13 23:10:08.000000000 +0300+++ kaffe-1.1.6-xynth/libraries/clib/awt/Makefile.am	2005-12-28 14:25:12.000000000 +0200@@ -28,6 +28,10 @@ MAYBE_KAFFE_NANOX_AWT = nano-X endif +if COND_KAFFE_XYNTH_AWT+MAYBE_KAFFE_XYNTH_AWT = xynth+endif+ if COND_CLASSPATH_GTK_AWT MAYBE_CLASSPATH_GTK_AWT = classpath-gtk endif@@ -40,6 +44,7 @@ 	$(MAYBE_KAFFE_X_AWT) \ 	$(MAYBE_KAFFE_QT_AWT) \ 	$(MAYBE_KAFFE_NANOX_AWT) \+	$(MAYBE_KAFFE_XYNTH_AWT) \ 	$(MAYBE_CLASSPATH_GTK_AWT) \ 	$(MAYBE_CLASSPATH_QT_AWT) diff -U 3 -H -d -r -N kaffe-1.1.6/libraries/clib/awt/xynth/Makefile.am kaffe-1.1.6-xynth/libraries/clib/awt/xynth/Makefile.am--- kaffe-1.1.6/libraries/clib/awt/xynth/Makefile.am	1970-01-01 02:00:00.000000000 +0200+++ kaffe-1.1.6-xynth/libraries/clib/awt/xynth/Makefile.am	2005-12-28 15:24:08.000000000 +0200@@ -0,0 +1,35 @@+# Xynth-based AWT support for standard Java libraries+#+# Copyright (c) 2005+#       Alper Akcan <distchx@yahoo.com>+#++native_LTLIBRARIES = libxynthawt.la++AM_CPPFLAGS = \+	-I$(top_builddir)/include \+	-I$(top_srcdir)/kaffe/kaffevm/jni \+	-I$(top_srcdir)/libraries/clib/classpath++libxynthawt_la_CFLAGS = \+	$(CFLAGS_PG) \+	$(XYNTH_CFLAGS)++libxynthawt_la_LDFLAGS = \+	$(KLIBFLAGS) \+	-no-undefined \+	-module \+	-release $(PACKAGE_VERSION) \+	-export-symbols-regex "^([Jj]ava|kaffe)_"++libxynthawt_la_LIBADD = \+	$(top_builddir)/kaffe/kaffevm/libkaffevm.la $(AWT_LIBS) \+	$(top_builddir)/libraries/clib/classpath/libclasspath.la++libxynthawt_la_SOURCES = \+	toolkit.c++noinst_HEADERS = \+	toolkit.h++CLEANFILES = so_locationsdiff -U 3 -H -d -r -N kaffe-1.1.6/libraries/clib/awt/xynth/toolkit.c kaffe-1.1.6-xynth/libraries/clib/awt/xynth/toolkit.c--- kaffe-1.1.6/libraries/clib/awt/xynth/toolkit.c	1970-01-01 02:00:00.000000000 +0200+++ kaffe-1.1.6-xynth/libraries/clib/awt/xynth/toolkit.c	2005-12-28 16:37:20.000000000 +0200@@ -0,0 +1,35 @@++#include "toolkit.h"++jint Java_java_awt_Toolkit_tlkProperties (JNIEnv *env UNUSED, jclass clazz UNUSED)+{+	jint props;+	DEBUGF("Enter");+	props = TLK_EXTERNAL_DECO;+	DEBUGF("Leave");+	return props;+}++jboolean Java_java_awt_Toolkit_tlkInit (JNIEnv *env UNUSED, jclass clazz UNUSED, jstring name)+{+	DEBUGF("Enter");+	xynth = AWT_MALLOC(sizeof(xynth_toolkit_t));+	s_client_init(&(xynth->root));+	DEBUGF("Leave");+	return JNI_TRUE;+}++jint Java_java_awt_Toolkit_tlkGetScreenWidth (JNIEnv *env UNUSED, jclass clazz UNUSED)+{+	DEBUGF("Enter");+	DEBUGF("Leave");+	return 600;+}+++jstring Java_java_awt_Toolkit_tlkVersion (JNIEnv *env UNUSED, jclass clazz UNUSED)+{+	DEBUGF("Enter");+	DEBUGF("Leave");+	return (*env)->NewStringUTF(env, "Xynth Windowing System");+}diff -U 3 -H -d -r -N kaffe-1.1.6/libraries/clib/awt/xynth/toolkit.h kaffe-1.1.6-xynth/libraries/clib/awt/xynth/toolkit.h--- kaffe-1.1.6/libraries/clib/awt/xynth/toolkit.h	1970-01-01 02:00:00.000000000 +0200+++ kaffe-1.1.6-xynth/libraries/clib/awt/xynth/toolkit.h	2005-12-28 16:35:27.000000000 +0200@@ -0,0 +1,53 @@++#include "config.h"+#include "config-std.h"+#include "config-mem.h"+#include "config-setjmp.h"++#include "jcl.h"++#include <xynth.h>++typedef struct xynth_toolkit_s {+	s_window_t *root;+} xynth_toolkit_t;++xynth_toolkit_t *xynth;++#define DEBUGF(a)	printf("%s [%s:%d] :: %s\n", __FUNCTION__, __FILE__, __LINE__, a);++#define TLK_IS_BLOCKING			1+#define TLK_IS_DISPATCH_EXCLUSIVE	2+#define TLK_NEEDS_FLUSH			4+#define TLK_NATIVE_DISPATCHER_LOOP	8+#define TLK_EXTERNAL_DECO		16++static inline void * _awt_malloc_wrapper (size_t size)+{+	void *adr;+	enterUnsafeRegion();+	adr = malloc(size);+	leaveUnsafeRegion();+	return adr;+}++static inline void * _awt_calloc_wrapper (size_t n, size_t size)+{+	void *adr;+	enterUnsafeRegion();+	adr = calloc(n, size);+	leaveUnsafeRegion();+	return adr;+}++static inline void _awt_free_wrapper (void *adr)+{+	enterUnsafeRegion();+	free(adr);+	leaveUnsafeRegion();+}++#define AWT_MALLOC(_n)		_awt_malloc_wrapper(_n)+#define AWT_CALLOC(_n,_sz)	_awt_calloc_wrapper(_n, _sz)+#define AWT_FREE(_adr)		_awt_free_wrapper(_adr);+diff -U 3 -H -d -r -N kaffe-1.1.6/libraries/javalib/Makefile.am kaffe-1.1.6-xynth/libraries/javalib/Makefile.am--- kaffe-1.1.6/libraries/javalib/Makefile.am	2005-09-20 03:29:45.000000000 +0300+++ kaffe-1.1.6-xynth/libraries/javalib/Makefile.am	2005-12-28 15:50:42.000000000 +0200@@ -29,6 +29,9 @@ if COND_KAFFE_X_AWT MAYBE_PEERLESS_KAFFE_AWT=awt-implementations endif+if COND_KAFFE_XYNTH_AWT+MAYBE_PEERLESS_KAFFE_AWT=awt-implementations+endif endif  # Only build gmp java.math libraries if kaffe is configuredBinary files kaffe-1.1.6/test/awt/WidgetsDemo/WidgetsDemo$Person.class and kaffe-1.1.6-xynth/test/awt/WidgetsDemo/WidgetsDemo$Person.class differBinary files kaffe-1.1.6/test/awt/WidgetsDemo/WidgetsDemo.class and kaffe-1.1.6-xynth/test/awt/WidgetsDemo/WidgetsDemo.class differdiff -U 3 -H -d -r -N kaffe-1.1.6/test/awt/WidgetsDemo/WidgetsDemo.sh kaffe-1.1.6-xynth/test/awt/WidgetsDemo/WidgetsDemo.sh--- kaffe-1.1.6/test/awt/WidgetsDemo/WidgetsDemo.sh	2005-07-04 01:03:21.000000000 +0300+++ kaffe-1.1.6-xynth/test/awt/WidgetsDemo/WidgetsDemo.sh	2005-12-28 15:57:08.000000000 +0200@@ -1,2 +1,3 @@ #! /bin/sh-kaffe WidgetsDemo+jikes +Pno-switchcheck +Pno-shadow +E -g -classpath .:../../../libraries/javalib/rt.jar -d . ./WidgetsDemo.java +kaffe -Xkaffe-xynth-awt WidgetsDemo

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -