diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/debian/changelog /tmp/GWJuRwoDpG/kdebase-3.5.2/debian/changelog --- /tmp/onSlcgKOuX/kdebase-3.5.2/debian/changelog 2008-01-29 23:56:33.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/debian/changelog 2008-01-29 23:57:00.000000000 +0000 @@ -1,3 +1,12 @@ +kdebase (4:3.5.2-0ubuntu27.4) dapper-proposed; urgency=low + + * Stable release update, support new Flash in Konqueror + * Add kubuntu_9917_flash_xembed.diff, adds xembed support to + Konqueror with backport from 3.5.8 + * Add build-dep on libglib2.0-dev + + -- Jonathan Riddell Tue, 29 Jan 2008 23:11:55 +0000 + kdebase (4:3.5.2-0ubuntu27.3) dapper-proposed; urgency=low * Add kubuntu_9914_kdm_user_image_check.diff from upstreamt fixes diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/debian/control /tmp/GWJuRwoDpG/kdebase-3.5.2/debian/control --- /tmp/onSlcgKOuX/kdebase-3.5.2/debian/control 2008-01-29 23:56:33.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/debian/control 2008-01-29 23:57:00.000000000 +0000 @@ -4,7 +4,7 @@ Maintainer: Ubuntu Core Developers XSBC-Original-Maintainer: Debian Qt/KDE Maintainers Uploaders: Isaac Clerencia , Pierre Habouzit , Christopher Martin , Adeodato Simó , Riku Voipio , Luk Claes -Build-Depends: cdbs (>= 0.4.27), debhelper (>= 4.2.30), autotools-dev, gawk, gettext, kdelibs4-dev (>= 4:3.5.2-0ubuntu5), libdbus-qt-1-dev (>= 0.36), libldap2-dev, libhal-dev, libhal-storage-dev, libncurses5-dev, libpam0g-dev, libpopt-dev, libraw1394-dev, libsensors-dev, libsmbclient-dev, libusb-dev, libxtst-dev, libxss-dev, libxxf86misc-dev, libxau-dev, libxdmcp-dev, libxcomposite-dev, libxdamage-dev, sharutils, texinfo, x11proto-kb-dev, libxkbfile-dev, imake, bdftopcf +Build-Depends: cdbs (>= 0.4.27), debhelper (>= 4.2.30), autotools-dev, gawk, gettext, kdelibs4-dev (>= 4:3.5.2-0ubuntu5), libdbus-qt-1-dev (>= 0.36), libldap2-dev, libhal-dev, libhal-storage-dev, libncurses5-dev, libpam0g-dev, libpopt-dev, libraw1394-dev, libsensors-dev, libsmbclient-dev, libusb-dev, libxtst-dev, libxss-dev, libxxf86misc-dev, libxau-dev, libxdmcp-dev, libxcomposite-dev, libxdamage-dev, sharutils, texinfo, x11proto-kb-dev, libxkbfile-dev, imake, bdftopcf, libglib2.0-dev Build-Depends-Indep: doxygen, qt3-doc, graphviz, gsfonts-x11 Build-Conflicts: nvidia-glx Standards-Version: 3.6.2 diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/debian/patches/kubuntu_9917_flash_xembed.diff /tmp/GWJuRwoDpG/kdebase-3.5.2/debian/patches/kubuntu_9917_flash_xembed.diff --- /tmp/onSlcgKOuX/kdebase-3.5.2/debian/patches/kubuntu_9917_flash_xembed.diff 1970-01-01 00:00:00.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/debian/patches/kubuntu_9917_flash_xembed.diff 2008-01-29 23:56:59.000000000 +0000 @@ -0,0 +1,11370 @@ +diff -urN kdebase-3.5.2/nsplugins/Makefile.am new/nsplugins/Makefile.am +--- kdebase-3.5.2/nsplugins/Makefile.am 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/Makefile.am 2008-01-29 22:53:08.000000000 +0000 +@@ -14,13 +14,16 @@ + libnsplugin_la_LIBADD = -lkparts + + bin_PROGRAMS = nspluginscan +-nspluginscan_SOURCES = pluginscan.cpp ++nspluginscan_SOURCES = pluginscan.cpp + nspluginscan_LDFLAGS = $(KDE_RPATH) $(all_libraries) -export-dynamic +-nspluginscan_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt ++nspluginscan_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt libpluginpaths.la + +-kcm_nsplugins_la_SOURCES = kcm_nsplugins.cpp ++kcm_nsplugins_la_SOURCES = kcm_nsplugins.cpp + kcm_nsplugins_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined +-kcm_nsplugins_la_LIBADD = $(LIB_KDECORE) ++kcm_nsplugins_la_LIBADD = $(LIB_KDECORE) libpluginpaths.la ++ ++noinst_LTLIBRARIES = libpluginpaths.la ++libpluginpaths_la_SOURCES = plugin_paths.cpp + + xdg_apps_DATA = khtml_plugins.desktop + +diff -urN kdebase-3.5.2/nsplugins/Makefile.in new/nsplugins/Makefile.in +--- kdebase-3.5.2/nsplugins/Makefile.in 2008-01-29 22:26:50.000000000 +0000 ++++ new/nsplugins/Makefile.in 2008-01-29 22:53:08.000000000 +0000 +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.9.6 from Makefile.am. ++# Makefile.in generated by automake 1.10 from Makefile.am. + # KDE tags expanded automatically by am_edit - $Revision: 483858 $ + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005 Free Software Foundation, Inc. ++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -18,15 +18,11 @@ + + + +-srcdir = @srcdir@ +-top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +-top_builddir = .. + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +-INSTALL = @INSTALL@ + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c +@@ -62,13 +58,21 @@ + am__installdirs = "$(DESTDIR)$(kde_moduledir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(partrcdir)" "$(DESTDIR)$(xdg_appsdir)" + kde_moduleLTLIBRARIES_INSTALL = $(INSTALL) +-LTLIBRARIES = $(kde_module_LTLIBRARIES) ++LTLIBRARIES = $(kde_module_LTLIBRARIES) $(noinst_LTLIBRARIES) + am__DEPENDENCIES_1 = +-kcm_nsplugins_la_DEPENDENCIES = $(am__DEPENDENCIES_1) ++kcm_nsplugins_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ++ libpluginpaths.la + am_kcm_nsplugins_la_OBJECTS = kcm_nsplugins.lo + #>- kcm_nsplugins_la_OBJECTS = $(am_kcm_nsplugins_la_OBJECTS) + #>+ 1 + kcm_nsplugins_la_OBJECTS = kcm_nsplugins.lo ++#>- kcm_nsplugins_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++#>- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++#>- $(CXXFLAGS) $(kcm_nsplugins_la_LDFLAGS) $(LDFLAGS) -o $@ ++#>+ 3 ++kcm_nsplugins_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++ $(CXXFLAGS) $(KDE_CXXFLAGS) $(kcm_nsplugins_la_LDFLAGS) $(LDFLAGS) -o $@ + libnsplugin_la_DEPENDENCIES = + am_libnsplugin_la_OBJECTS = plugin_part.lo nspluginloader.lo + #>- libnsplugin_la_OBJECTS = $(am_libnsplugin_la_OBJECTS) +@@ -77,6 +81,18 @@ + libnsplugin_la_nofinal_OBJECTS = plugin_part.lo nspluginloader.lo NSPluginClassIface_stub.lo NSPluginCallbackIface_skel.lo + @KDE_USE_FINAL_FALSE@libnsplugin_la_OBJECTS = $(libnsplugin_la_nofinal_OBJECTS) + @KDE_USE_FINAL_TRUE@libnsplugin_la_OBJECTS = $(libnsplugin_la_final_OBJECTS) ++#>- libnsplugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++#>- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++#>- $(CXXFLAGS) $(libnsplugin_la_LDFLAGS) $(LDFLAGS) -o $@ ++#>+ 3 ++libnsplugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++ $(CXXFLAGS) $(KDE_CXXFLAGS) $(libnsplugin_la_LDFLAGS) $(LDFLAGS) -o $@ ++libpluginpaths_la_LIBADD = ++am_libpluginpaths_la_OBJECTS = plugin_paths.lo ++#>- libpluginpaths_la_OBJECTS = $(am_libpluginpaths_la_OBJECTS) ++#>+ 1 ++libpluginpaths_la_OBJECTS = plugin_paths.lo + binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(bin_PROGRAMS) + am_nspluginscan_OBJECTS = pluginscan.$(OBJEXT) +@@ -84,8 +100,15 @@ + #>+ 1 + nspluginscan_OBJECTS = pluginscan.$(OBJEXT) + nspluginscan_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +- $(am__DEPENDENCIES_1) +-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) ++ $(am__DEPENDENCIES_1) libpluginpaths.la ++#>- nspluginscan_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++#>- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++#>- $(CXXFLAGS) $(nspluginscan_LDFLAGS) $(LDFLAGS) -o $@ ++#>+ 3 ++nspluginscan_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++ $(CXXFLAGS) $(KDE_CXXFLAGS) $(nspluginscan_LDFLAGS) $(LDFLAGS) -o $@ ++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ + depcomp = $(SHELL) $(top_srcdir)/admin/depcomp + am__depfiles_maybe = depfiles + #>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +@@ -93,40 +116,46 @@ + #>+ 2 + CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) +-#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ +-#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ +-#>- $(AM_CXXFLAGS) $(CXXFLAGS) ++#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++#>- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + #>+ 3 +-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ +- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ +- $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) ++LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) + CXXLD = $(CXX) +-#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ +-#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-#>+ 2 +-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ +- $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++#>- CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++#>- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ ++#>- $(LDFLAGS) -o $@ ++#>+ 3 ++CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) \ ++ $(LDFLAGS) -o $@ + SOURCES = $(kcm_nsplugins_la_SOURCES) $(libnsplugin_la_SOURCES) \ +- $(nspluginscan_SOURCES) ++ $(libpluginpaths_la_SOURCES) $(nspluginscan_SOURCES) + DIST_SOURCES = $(kcm_nsplugins_la_SOURCES) $(libnsplugin_la_SOURCES) \ +- $(nspluginscan_SOURCES) ++ $(libpluginpaths_la_SOURCES) $(nspluginscan_SOURCES) + #>- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + #>- html-recursive info-recursive install-data-recursive \ +-#>- install-exec-recursive install-info-recursive \ +-#>- install-recursive installcheck-recursive installdirs-recursive \ +-#>- pdf-recursive ps-recursive uninstall-info-recursive \ +-#>- uninstall-recursive +-#>+ 6 ++#>- install-dvi-recursive install-exec-recursive \ ++#>- install-html-recursive install-info-recursive \ ++#>- install-pdf-recursive install-ps-recursive install-recursive \ ++#>- installcheck-recursive installdirs-recursive pdf-recursive \ ++#>- ps-recursive uninstall-recursive ++#>+ 7 + RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ +- install-exec-recursive install-info-recursive \ +- install-recursive installcheck-recursive installdirs-recursive \ +- pdf-recursive ps-recursive uninstall-info-recursive \ +- uninstall-recursive nmcheck-recursive bcheck-recursive ++ install-dvi-recursive install-exec-recursive \ ++ install-html-recursive install-info-recursive \ ++ install-pdf-recursive install-ps-recursive install-recursive \ ++ installcheck-recursive installdirs-recursive pdf-recursive \ ++ ps-recursive uninstall-recursive nmcheck-recursive bcheck-recursive + partrcDATA_INSTALL = $(INSTALL_DATA) + xdg_appsDATA_INSTALL = $(INSTALL_DATA) + DATA = $(partrc_DATA) $(xdg_apps_DATA) + HEADERS = $(noinst_HEADERS) ++RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ ++ distclean-recursive maintainer-clean-recursive + ETAGS = etags + CTAGS = ctags + DIST_SUBDIRS = $(SUBDIRS) +@@ -134,8 +163,6 @@ + #>+ 1 + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST) + ACLOCAL = @ACLOCAL@ +-AMDEP_FALSE = @AMDEP_FALSE@ +-AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + AR = @AR@ + ARTSCCONFIG = @ARTSCCONFIG@ +@@ -148,8 +175,6 @@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ + CFLAGS = @CFLAGS@ +-COMPILE_GL_INFO_FALSE = @COMPILE_GL_INFO_FALSE@ +-COMPILE_GL_INFO_TRUE = @COMPILE_GL_INFO_TRUE@ + CONF_FILES = @CONF_FILES@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ +@@ -185,16 +210,18 @@ + F77 = @F77@ + FFLAGS = @FFLAGS@ + FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@ ++FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ ++FREETYPE2_LDFLAGS = @FREETYPE2_LDFLAGS@ + GLINC = @GLINC@ + GLLIB = @GLLIB@ + GMSGFMT = @GMSGFMT@ ++GREP = @GREP@ + HALBACKEND = @HALBACKEND@ + HAL_CFLAGS = @HAL_CFLAGS@ + HAL_INCS = @HAL_INCS@ + HAL_LIBS = @HAL_LIBS@ +-HAVE_DNSSD_FALSE = @HAVE_DNSSD_FALSE@ +-HAVE_DNSSD_TRUE = @HAVE_DNSSD_TRUE@ + HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@ ++INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -282,7 +309,6 @@ + LIBTOOL = @LIBTOOL@ + LIBUCB = @LIBUCB@ + LIBUSBCONFIG = @LIBUSBCONFIG@ +-LIBUTEMPTER = @LIBUTEMPTER@ + LIBUTIL = @LIBUTIL@ + LIBXDMCP = @LIBXDMCP@ + LIBXFT_LIB = @LIBXFT_LIB@ +@@ -303,6 +329,7 @@ + LIB_KFM = @LIB_KFM@ + LIB_KHTML = @LIB_KHTML@ + LIB_KIMPROXY = @LIB_KIMPROXY@ ++LIB_KINFO = @LIB_KINFO@ + LIB_KIO = @LIB_KIO@ + LIB_KJS = @LIB_KJS@ + LIB_KNEWSTUFF = @LIB_KNEWSTUFF@ +@@ -333,14 +360,13 @@ + LN_S = @LN_S@ + LTLIBOBJS = @LTLIBOBJS@ + MAINT = @MAINT@ +-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ + MAKEKDEWIDGETS = @MAKEKDEWIDGETS@ + MCOPIDL = @MCOPIDL@ + MD5SUM = @MD5SUM@ + MD5SUM_CUT = @MD5SUM_CUT@ + MEINPROC = @MEINPROC@ ++MKDIR_P = @MKDIR_P@ + MOC = @MOC@ + MSGFMT = @MSGFMT@ + NOOPT_CFLAGS = @NOOPT_CFLAGS@ +@@ -385,6 +411,7 @@ + VERSION = @VERSION@ + WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@ + XGETTEXT = @XGETTEXT@ ++XMKMF = @XMKMF@ + XMLLINT = @XMLLINT@ + XTESTLIB = @XTESTLIB@ + X_EXTRA_LIBS = @X_EXTRA_LIBS@ +@@ -392,114 +419,42 @@ + X_LDFLAGS = @X_LDFLAGS@ + X_PRE_LIBS = @X_PRE_LIBS@ + X_RPATH = @X_RPATH@ +-ac_ct_AR = @ac_ct_AR@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_CXX = @ac_ct_CXX@ + ac_ct_F77 = @ac_ct_F77@ +-ac_ct_RANLIB = @ac_ct_RANLIB@ +-ac_ct_STRIP = @ac_ct_STRIP@ + all_includes = @all_includes@ + all_libraries = @all_libraries@ +-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ + am__tar = @am__tar@ + am__untar = @am__untar@ +-applnk_SUBDIR_included_FALSE = @applnk_SUBDIR_included_FALSE@ +-applnk_SUBDIR_included_TRUE = @applnk_SUBDIR_included_TRUE@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ ++builddir = @builddir@ + datadir = @datadir@ +-doc_SUBDIR_included_FALSE = @doc_SUBDIR_included_FALSE@ +-doc_SUBDIR_included_TRUE = @doc_SUBDIR_included_TRUE@ +-drkonqi_SUBDIR_included_FALSE = @drkonqi_SUBDIR_included_FALSE@ +-drkonqi_SUBDIR_included_TRUE = @drkonqi_SUBDIR_included_TRUE@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ + exec_prefix = @exec_prefix@ +-have_xcursor_FALSE = @have_xcursor_FALSE@ +-have_xcursor_TRUE = @have_xcursor_TRUE@ + host = @host@ + host_alias = @host_alias@ + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ +-include_ARTS_FALSE = @include_ARTS_FALSE@ +-include_ARTS_TRUE = @include_ARTS_TRUE@ +-include_BZIP2_FALSE = @include_BZIP2_FALSE@ +-include_BZIP2_TRUE = @include_BZIP2_TRUE@ +-include_EXR_MODULES_FALSE = @include_EXR_MODULES_FALSE@ +-include_EXR_MODULES_TRUE = @include_EXR_MODULES_TRUE@ +-include_fontinst_tn_FALSE = @include_fontinst_tn_FALSE@ +-include_fontinst_tn_TRUE = @include_fontinst_tn_TRUE@ +-include_kcontrol_access_FALSE = @include_kcontrol_access_FALSE@ +-include_kcontrol_access_TRUE = @include_kcontrol_access_TRUE@ +-include_kcontrol_accessibility_FALSE = @include_kcontrol_accessibility_FALSE@ +-include_kcontrol_accessibility_TRUE = @include_kcontrol_accessibility_TRUE@ +-include_kcontrol_joystick_FALSE = @include_kcontrol_joystick_FALSE@ +-include_kcontrol_joystick_TRUE = @include_kcontrol_joystick_TRUE@ +-include_kcontrol_kfontinst_FALSE = @include_kcontrol_kfontinst_FALSE@ +-include_kcontrol_kfontinst_TRUE = @include_kcontrol_kfontinst_TRUE@ +-include_kcontrol_randr_FALSE = @include_kcontrol_randr_FALSE@ +-include_kcontrol_randr_TRUE = @include_kcontrol_randr_TRUE@ +-include_kcontrol_smartcard_FALSE = @include_kcontrol_smartcard_FALSE@ +-include_kcontrol_smartcard_TRUE = @include_kcontrol_smartcard_TRUE@ +-include_kcontrol_usbview_FALSE = @include_kcontrol_usbview_FALSE@ +-include_kcontrol_usbview_TRUE = @include_kcontrol_usbview_TRUE@ +-include_kcontrol_view1394_FALSE = @include_kcontrol_view1394_FALSE@ +-include_kcontrol_view1394_TRUE = @include_kcontrol_view1394_TRUE@ +-include_kioslave_ldap_FALSE = @include_kioslave_ldap_FALSE@ +-include_kioslave_ldap_TRUE = @include_kioslave_ldap_TRUE@ +-include_kioslave_smb_FALSE = @include_kioslave_smb_FALSE@ +-include_kioslave_smb_TRUE = @include_kioslave_smb_TRUE@ +-include_kompmgr_FALSE = @include_kompmgr_FALSE@ +-include_kompmgr_TRUE = @include_kompmgr_TRUE@ +-include_ksysguardd_FALSE = @include_ksysguardd_FALSE@ +-include_ksysguardd_TRUE = @include_ksysguardd_TRUE@ +-include_ksysguardd_freebsd_FALSE = @include_ksysguardd_freebsd_FALSE@ +-include_ksysguardd_freebsd_TRUE = @include_ksysguardd_freebsd_TRUE@ +-include_ksysguardd_irix_FALSE = @include_ksysguardd_irix_FALSE@ +-include_ksysguardd_irix_TRUE = @include_ksysguardd_irix_TRUE@ +-include_ksysguardd_linux_FALSE = @include_ksysguardd_linux_FALSE@ +-include_ksysguardd_linux_TRUE = @include_ksysguardd_linux_TRUE@ +-include_ksysguardd_netbsd_FALSE = @include_ksysguardd_netbsd_FALSE@ +-include_ksysguardd_netbsd_TRUE = @include_ksysguardd_netbsd_TRUE@ +-include_ksysguardd_openbsd_FALSE = @include_ksysguardd_openbsd_FALSE@ +-include_ksysguardd_openbsd_TRUE = @include_ksysguardd_openbsd_TRUE@ +-include_ksysguardd_solaris_FALSE = @include_ksysguardd_solaris_FALSE@ +-include_ksysguardd_solaris_TRUE = @include_ksysguardd_solaris_TRUE@ +-include_ksysguardd_tru64_FALSE = @include_ksysguardd_tru64_FALSE@ +-include_ksysguardd_tru64_TRUE = @include_ksysguardd_tru64_TRUE@ +-include_media_halbackend_FALSE = @include_media_halbackend_FALSE@ +-include_media_halbackend_TRUE = @include_media_halbackend_TRUE@ +-include_media_linuxcdpolling_FALSE = @include_media_linuxcdpolling_FALSE@ +-include_media_linuxcdpolling_TRUE = @include_media_linuxcdpolling_TRUE@ +-include_x11_FALSE = @include_x11_FALSE@ +-include_x11_TRUE = @include_x11_TRUE@ ++htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ +-install_usbids_FALSE = @install_usbids_FALSE@ +-install_usbids_TRUE = @install_usbids_TRUE@ + jni_includes = @jni_includes@ +-kappfinder_SUBDIR_included_FALSE = @kappfinder_SUBDIR_included_FALSE@ +-kappfinder_SUBDIR_included_TRUE = @kappfinder_SUBDIR_included_TRUE@ +-kate_SUBDIR_included_FALSE = @kate_SUBDIR_included_FALSE@ +-kate_SUBDIR_included_TRUE = @kate_SUBDIR_included_TRUE@ +-kcheckpass_SUBDIR_included_FALSE = @kcheckpass_SUBDIR_included_FALSE@ +-kcheckpass_SUBDIR_included_TRUE = @kcheckpass_SUBDIR_included_TRUE@ +-kcminit_SUBDIR_included_FALSE = @kcminit_SUBDIR_included_FALSE@ +-kcminit_SUBDIR_included_TRUE = @kcminit_SUBDIR_included_TRUE@ +-kcontrol_SUBDIR_included_FALSE = @kcontrol_SUBDIR_included_FALSE@ +-kcontrol_SUBDIR_included_TRUE = @kcontrol_SUBDIR_included_TRUE@ +-kdcop_SUBDIR_included_FALSE = @kdcop_SUBDIR_included_FALSE@ +-kdcop_SUBDIR_included_TRUE = @kdcop_SUBDIR_included_TRUE@ + kde_appsdir = @kde_appsdir@ + kde_bindir = @kde_bindir@ + kde_confdir = @kde_confdir@ +@@ -522,100 +477,32 @@ + kde_templatesdir = @kde_templatesdir@ + kde_wallpaperdir = @kde_wallpaperdir@ + kde_widgetdir = @kde_widgetdir@ +-kdebugdialog_SUBDIR_included_FALSE = @kdebugdialog_SUBDIR_included_FALSE@ +-kdebugdialog_SUBDIR_included_TRUE = @kdebugdialog_SUBDIR_included_TRUE@ +-kdeeject_SUBDIR_included_FALSE = @kdeeject_SUBDIR_included_FALSE@ +-kdeeject_SUBDIR_included_TRUE = @kdeeject_SUBDIR_included_TRUE@ + kdeinitdir = @kdeinitdir@ +-kdepasswd_SUBDIR_included_FALSE = @kdepasswd_SUBDIR_included_FALSE@ +-kdepasswd_SUBDIR_included_TRUE = @kdepasswd_SUBDIR_included_TRUE@ +-kdeprint_SUBDIR_included_FALSE = @kdeprint_SUBDIR_included_FALSE@ +-kdeprint_SUBDIR_included_TRUE = @kdeprint_SUBDIR_included_TRUE@ +-kdesktop_SUBDIR_included_FALSE = @kdesktop_SUBDIR_included_FALSE@ +-kdesktop_SUBDIR_included_TRUE = @kdesktop_SUBDIR_included_TRUE@ +-kdesu_SUBDIR_included_FALSE = @kdesu_SUBDIR_included_FALSE@ +-kdesu_SUBDIR_included_TRUE = @kdesu_SUBDIR_included_TRUE@ +-kdialog_SUBDIR_included_FALSE = @kdialog_SUBDIR_included_FALSE@ +-kdialog_SUBDIR_included_TRUE = @kdialog_SUBDIR_included_TRUE@ +-kdm_SUBDIR_included_FALSE = @kdm_SUBDIR_included_FALSE@ +-kdm_SUBDIR_included_TRUE = @kdm_SUBDIR_included_TRUE@ +-kdmlib_SUBDIR_included_FALSE = @kdmlib_SUBDIR_included_FALSE@ +-kdmlib_SUBDIR_included_TRUE = @kdmlib_SUBDIR_included_TRUE@ +-kfind_SUBDIR_included_FALSE = @kfind_SUBDIR_included_FALSE@ +-kfind_SUBDIR_included_TRUE = @kfind_SUBDIR_included_TRUE@ +-khelpcenter_SUBDIR_included_FALSE = @khelpcenter_SUBDIR_included_FALSE@ +-khelpcenter_SUBDIR_included_TRUE = @khelpcenter_SUBDIR_included_TRUE@ +-khotkeys_SUBDIR_included_FALSE = @khotkeys_SUBDIR_included_FALSE@ +-khotkeys_SUBDIR_included_TRUE = @khotkeys_SUBDIR_included_TRUE@ +-kicker_SUBDIR_included_FALSE = @kicker_SUBDIR_included_FALSE@ +-kicker_SUBDIR_included_TRUE = @kicker_SUBDIR_included_TRUE@ +-kioslave_SUBDIR_included_FALSE = @kioslave_SUBDIR_included_FALSE@ +-kioslave_SUBDIR_included_TRUE = @kioslave_SUBDIR_included_TRUE@ +-klipper_SUBDIR_included_FALSE = @klipper_SUBDIR_included_FALSE@ +-klipper_SUBDIR_included_TRUE = @klipper_SUBDIR_included_TRUE@ +-kmenuedit_SUBDIR_included_FALSE = @kmenuedit_SUBDIR_included_FALSE@ +-kmenuedit_SUBDIR_included_TRUE = @kmenuedit_SUBDIR_included_TRUE@ +-knetattach_SUBDIR_included_FALSE = @knetattach_SUBDIR_included_FALSE@ +-knetattach_SUBDIR_included_TRUE = @knetattach_SUBDIR_included_TRUE@ +-konqueror_SUBDIR_included_FALSE = @konqueror_SUBDIR_included_FALSE@ +-konqueror_SUBDIR_included_TRUE = @konqueror_SUBDIR_included_TRUE@ +-konsole_SUBDIR_included_FALSE = @konsole_SUBDIR_included_FALSE@ +-konsole_SUBDIR_included_TRUE = @konsole_SUBDIR_included_TRUE@ +-kpager_SUBDIR_included_FALSE = @kpager_SUBDIR_included_FALSE@ +-kpager_SUBDIR_included_TRUE = @kpager_SUBDIR_included_TRUE@ +-kpersonalizer_SUBDIR_included_FALSE = @kpersonalizer_SUBDIR_included_FALSE@ +-kpersonalizer_SUBDIR_included_TRUE = @kpersonalizer_SUBDIR_included_TRUE@ +-kreadconfig_SUBDIR_included_FALSE = @kreadconfig_SUBDIR_included_FALSE@ +-kreadconfig_SUBDIR_included_TRUE = @kreadconfig_SUBDIR_included_TRUE@ +-kscreensaver_SUBDIR_included_FALSE = @kscreensaver_SUBDIR_included_FALSE@ +-kscreensaver_SUBDIR_included_TRUE = @kscreensaver_SUBDIR_included_TRUE@ +-ksmserver_SUBDIR_included_FALSE = @ksmserver_SUBDIR_included_FALSE@ +-ksmserver_SUBDIR_included_TRUE = @ksmserver_SUBDIR_included_TRUE@ +-ksplashml_SUBDIR_included_FALSE = @ksplashml_SUBDIR_included_FALSE@ +-ksplashml_SUBDIR_included_TRUE = @ksplashml_SUBDIR_included_TRUE@ +-kstart_SUBDIR_included_FALSE = @kstart_SUBDIR_included_FALSE@ +-kstart_SUBDIR_included_TRUE = @kstart_SUBDIR_included_TRUE@ +-ksysguard_SUBDIR_included_FALSE = @ksysguard_SUBDIR_included_FALSE@ +-ksysguard_SUBDIR_included_TRUE = @ksysguard_SUBDIR_included_TRUE@ +-ksystraycmd_SUBDIR_included_FALSE = @ksystraycmd_SUBDIR_included_FALSE@ +-ksystraycmd_SUBDIR_included_TRUE = @ksystraycmd_SUBDIR_included_TRUE@ +-ktip_SUBDIR_included_FALSE = @ktip_SUBDIR_included_FALSE@ +-ktip_SUBDIR_included_TRUE = @ktip_SUBDIR_included_TRUE@ +-kwin_SUBDIR_included_FALSE = @kwin_SUBDIR_included_FALSE@ +-kwin_SUBDIR_included_TRUE = @kwin_SUBDIR_included_TRUE@ +-kxkb_SUBDIR_included_FALSE = @kxkb_SUBDIR_included_FALSE@ +-kxkb_SUBDIR_included_TRUE = @kxkb_SUBDIR_included_TRUE@ +-l10n_SUBDIR_included_FALSE = @l10n_SUBDIR_included_FALSE@ +-l10n_SUBDIR_included_TRUE = @l10n_SUBDIR_included_TRUE@ + libdir = @libdir@ + libexecdir = @libexecdir@ +-libkonq_SUBDIR_included_FALSE = @libkonq_SUBDIR_included_FALSE@ +-libkonq_SUBDIR_included_TRUE = @libkonq_SUBDIR_included_TRUE@ ++localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + nogroup = @nogroup@ +-nsplugins_SUBDIR_included_FALSE = @nsplugins_SUBDIR_included_FALSE@ +-nsplugins_SUBDIR_included_TRUE = @nsplugins_SUBDIR_included_TRUE@ + oldincludedir = @oldincludedir@ +-pics_SUBDIR_included_FALSE = @pics_SUBDIR_included_FALSE@ +-pics_SUBDIR_included_TRUE = @pics_SUBDIR_included_TRUE@ ++pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ ++psdir = @psdir@ + qt_includes = @qt_includes@ + qt_libraries = @qt_libraries@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ +-supports_i8k_FALSE = @supports_i8k_FALSE@ +-supports_i8k_TRUE = @supports_i8k_TRUE@ ++srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target = @target@ + target_alias = @target_alias@ + target_cpu = @target_cpu@ + target_os = @target_os@ + target_vendor = @target_vendor@ +-unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@ +-unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@ ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ + x_includes = @x_includes@ + x_libraries = @x_libraries@ + xdg_appsdir = @xdg_appsdir@ +@@ -635,18 +522,16 @@ + \ + NSPluginClassIface_stub.cpp NSPluginCallbackIface_skel.cpp + +-#>- libnsplugin_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_PLUGIN) -no-undefined +-#>+ 1 +-libnsplugin_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_PLUGIN) -no-undefined $(KDE_NO_UNDEFINED) ++libnsplugin_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_PLUGIN) -no-undefined + libnsplugin_la_LIBADD = -lkparts +-nspluginscan_SOURCES = pluginscan.cpp ++nspluginscan_SOURCES = pluginscan.cpp + nspluginscan_LDFLAGS = $(KDE_RPATH) $(all_libraries) -export-dynamic +-nspluginscan_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt +-kcm_nsplugins_la_SOURCES = kcm_nsplugins.cpp +-#>- kcm_nsplugins_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined +-#>+ 1 +-kcm_nsplugins_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED) +-kcm_nsplugins_la_LIBADD = $(LIB_KDECORE) ++nspluginscan_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt libpluginpaths.la ++kcm_nsplugins_la_SOURCES = kcm_nsplugins.cpp ++kcm_nsplugins_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined ++kcm_nsplugins_la_LIBADD = $(LIB_KDECORE) libpluginpaths.la ++noinst_LTLIBRARIES = libpluginpaths.la ++libpluginpaths_la_SOURCES = plugin_paths.cpp + xdg_apps_DATA = khtml_plugins.desktop + partrcdir = $(kde_datadir)/plugin + partrc_DATA = nspluginpart.rc +@@ -700,7 +585,7 @@ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + install-kde_moduleLTLIBRARIES: $(kde_module_LTLIBRARIES) + @$(NORMAL_INSTALL) +- test -z "$(kde_moduledir)" || $(mkdir_p) "$(DESTDIR)$(kde_moduledir)" ++ test -z "$(kde_moduledir)" || $(MKDIR_P) "$(DESTDIR)$(kde_moduledir)" + @list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ +@@ -711,7 +596,7 @@ + + uninstall-kde_moduleLTLIBRARIES: + @$(NORMAL_UNINSTALL) +- @set -x; list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \ ++ @list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(kde_moduledir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(kde_moduledir)/$$p"; \ +@@ -725,19 +610,24 @@ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +-#>- kcm_nsplugins.la: $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_DEPENDENCIES) +-#>+ 2 +-@KDE_USE_CLOSURE_TRUE@kcm_nsplugins.la: kcm_nsplugins.la.closure $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_DEPENDENCIES) +-@KDE_USE_CLOSURE_FALSE@kcm_nsplugins.la: $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_DEPENDENCIES) +- $(CXXLINK) -rpath $(kde_moduledir) $(kcm_nsplugins_la_LDFLAGS) $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_LIBADD) $(LIBS) +-#>- libnsplugin.la: $(libnsplugin_la_OBJECTS) $(libnsplugin_la_DEPENDENCIES) +-#>+ 2 +-@KDE_USE_CLOSURE_TRUE@libnsplugin.la: libnsplugin.la.closure $(libnsplugin_la_OBJECTS) $(libnsplugin_la_DEPENDENCIES) +-@KDE_USE_CLOSURE_FALSE@libnsplugin.la: $(libnsplugin_la_OBJECTS) $(libnsplugin_la_DEPENDENCIES) +- $(CXXLINK) -rpath $(kde_moduledir) $(libnsplugin_la_LDFLAGS) $(libnsplugin_la_OBJECTS) $(libnsplugin_la_LIBADD) $(LIBS) ++ ++clean-noinstLTLIBRARIES: ++ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) ++ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ ++ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ ++ test "$$dir" != "$$p" || dir=.; \ ++ echo "rm -f \"$${dir}/so_locations\""; \ ++ rm -f "$${dir}/so_locations"; \ ++ done ++kcm_nsplugins.la: $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_DEPENDENCIES) ++ $(kcm_nsplugins_la_LINK) -rpath $(kde_moduledir) $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_LIBADD) $(LIBS) ++libnsplugin.la: $(libnsplugin_la_OBJECTS) $(libnsplugin_la_DEPENDENCIES) ++ $(libnsplugin_la_LINK) -rpath $(kde_moduledir) $(libnsplugin_la_OBJECTS) $(libnsplugin_la_LIBADD) $(LIBS) ++libpluginpaths.la: $(libpluginpaths_la_OBJECTS) $(libpluginpaths_la_DEPENDENCIES) ++ $(CXXLINK) $(libpluginpaths_la_OBJECTS) $(libpluginpaths_la_LIBADD) $(LIBS) + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" ++ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ +@@ -765,7 +655,7 @@ + done + nspluginscan$(EXEEXT): $(nspluginscan_OBJECTS) $(nspluginscan_DEPENDENCIES) + @rm -f nspluginscan$(EXEEXT) +- $(CXXLINK) $(nspluginscan_LDFLAGS) $(nspluginscan_OBJECTS) $(nspluginscan_LDADD) $(LIBS) ++ $(nspluginscan_LINK) $(nspluginscan_OBJECTS) $(nspluginscan_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -776,25 +666,26 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcm_nsplugins.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nspluginloader.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_part.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_paths.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pluginscan.Po@am__quote@ + + .cpp.o: +-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + + .cpp.obj: +-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + + .cpp.lo: +-@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@@ -804,13 +695,9 @@ + + clean-libtool: + -rm -rf .libs _libs +- +-distclean-libtool: +- -rm -f libtool +-uninstall-info-am: + install-partrcDATA: $(partrc_DATA) + @$(NORMAL_INSTALL) +- test -z "$(partrcdir)" || $(mkdir_p) "$(DESTDIR)$(partrcdir)" ++ test -z "$(partrcdir)" || $(MKDIR_P) "$(DESTDIR)$(partrcdir)" + @list='$(partrc_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ +@@ -827,7 +714,7 @@ + done + install-xdg_appsDATA: $(xdg_apps_DATA) + @$(NORMAL_INSTALL) +- test -z "$(xdg_appsdir)" || $(mkdir_p) "$(DESTDIR)$(xdg_appsdir)" ++ test -z "$(xdg_appsdir)" || $(MKDIR_P) "$(DESTDIR)$(xdg_appsdir)" + @list='$(xdg_apps_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ +@@ -874,8 +761,7 @@ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +-mostlyclean-recursive clean-recursive distclean-recursive \ +-maintainer-clean-recursive: ++$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ +@@ -976,22 +862,21 @@ + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + + distdir: $(DISTFILES) +- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ +- list='$(DISTFILES)'; for file in $$list; do \ +- case $$file in \ +- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ +- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ +- esac; \ ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ +- if test "$$dir" != "$$file" && test "$$dir" != "."; then \ +- dir="/$$dir"; \ +- $(mkdir_p) "$(distdir)$$dir"; \ +- else \ +- dir=''; \ +- fi; \ + if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ +@@ -1005,7 +890,7 @@ + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ +- || $(mkdir_p) "$(distdir)/$$subdir" \ ++ || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ +@@ -1013,6 +898,8 @@ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ ++ am__remove_distdir=: \ ++ am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ +@@ -1023,7 +910,7 @@ + installdirs: installdirs-recursive + installdirs-am: + for dir in "$(DESTDIR)$(kde_moduledir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(partrcdir)" "$(DESTDIR)$(xdg_appsdir)"; do \ +- test -z "$$dir" || $(mkdir_p) "$$dir"; \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done + install: install-recursive + install-exec: install-exec-recursive +@@ -1054,16 +941,16 @@ + clean: kde-rpo-clean clean-recursive + + #>- clean-am: clean-binPROGRAMS clean-generic clean-kde_moduleLTLIBRARIES \ +-#>- clean-libtool mostlyclean-am ++#>- clean-libtool clean-noinstLTLIBRARIES mostlyclean-am + #>+ 2 +-clean-am: clean-metasources clean-idl clean-closures clean-bcheck clean-final clean-binPROGRAMS clean-generic clean-kde_moduleLTLIBRARIES \ +- clean-libtool mostlyclean-am ++clean-am: clean-metasources clean-idl clean-bcheck clean-final clean-binPROGRAMS clean-generic clean-kde_moduleLTLIBRARIES \ ++ clean-libtool clean-noinstLTLIBRARIES mostlyclean-am + + distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile + distclean-am: clean-am distclean-compile distclean-generic \ +- distclean-libtool distclean-tags ++ distclean-tags + + dvi: dvi-recursive + +@@ -1081,14 +968,22 @@ + install-data-am: install-partrcDATA \ + install-xdg_appsDATA + ++install-dvi: install-dvi-recursive ++ + #>- install-exec-am: install-binPROGRAMS + #>+ 1 + install-exec-am: install-binPROGRAMS install-kde_moduleLTLIBRARIES + ++install-html: install-html-recursive ++ + install-info: install-info-recursive + + install-man: + ++install-pdf: install-pdf-recursive ++ ++install-ps: install-ps-recursive ++ + installcheck-am: + + maintainer-clean: maintainer-clean-recursive +@@ -1109,30 +1004,30 @@ + + ps-am: + +-uninstall-am: uninstall-binPROGRAMS uninstall-info-am \ +- uninstall-kde_moduleLTLIBRARIES uninstall-partrcDATA \ +- uninstall-xdg_appsDATA +- +-uninstall-info: uninstall-info-recursive +- +-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ +- clean clean-binPROGRAMS clean-generic \ +- clean-kde_moduleLTLIBRARIES clean-libtool clean-recursive \ +- ctags ctags-recursive distclean distclean-compile \ +- distclean-generic distclean-libtool distclean-recursive \ ++uninstall-am: uninstall-binPROGRAMS uninstall-kde_moduleLTLIBRARIES \ ++ uninstall-partrcDATA uninstall-xdg_appsDATA ++ ++.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ ++ install-strip ++ ++.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ ++ all all-am check check-am clean clean-binPROGRAMS \ ++ clean-generic clean-kde_moduleLTLIBRARIES clean-libtool \ ++ clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ ++ distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ +- install-data-am install-exec install-exec-am install-info \ ++ install-data-am install-dvi install-dvi-am install-exec \ ++ install-exec-am install-html install-html-am install-info \ + install-info-am install-kde_moduleLTLIBRARIES install-man \ +- install-partrcDATA install-strip install-xdg_appsDATA \ +- installcheck installcheck-am installdirs installdirs-am \ +- maintainer-clean maintainer-clean-generic \ +- maintainer-clean-recursive mostlyclean mostlyclean-compile \ +- mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ +- pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ +- uninstall-binPROGRAMS uninstall-info-am \ +- uninstall-kde_moduleLTLIBRARIES uninstall-partrcDATA \ +- uninstall-xdg_appsDATA ++ install-partrcDATA install-pdf install-pdf-am install-ps \ ++ install-ps-am install-strip install-xdg_appsDATA installcheck \ ++ installcheck-am installdirs installdirs-am maintainer-clean \ ++ maintainer-clean-generic mostlyclean mostlyclean-compile \ ++ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ ++ tags tags-recursive uninstall uninstall-am \ ++ uninstall-binPROGRAMS uninstall-kde_moduleLTLIBRARIES \ ++ uninstall-partrcDATA uninstall-xdg_appsDATA + + + messages: rc.cpp +@@ -1143,15 +1038,6 @@ + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: + +-#>+ 8 +-kcm_nsplugins.la.closure: $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_DEPENDENCIES) +- @echo "int main() {return 0;}" > kcm_nsplugins_la_closure.cpp +- @$(LTCXXCOMPILE) -c kcm_nsplugins_la_closure.cpp +- $(CXXLINK) kcm_nsplugins_la_closure.lo $(kcm_nsplugins_la_LDFLAGS) $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_LIBADD) $(LIBS) +- @rm -f kcm_nsplugins_la_closure.* kcm_nsplugins.la.closure +- @echo "timestamp" > kcm_nsplugins.la.closure +- +- + #>+ 3 + nspluginloader.moc: $(srcdir)/nspluginloader.h + $(MOC) $(srcdir)/nspluginloader.h -o nspluginloader.moc +@@ -1176,21 +1062,12 @@ + NSPluginCallbackIface_skel.cpp: NSPluginCallbackIface.kidl + $(DCOPIDL2CPP) --c++-suffix cpp --no-signals --no-stub NSPluginCallbackIface.kidl + +-#>+ 8 +-libnsplugin.la.closure: $(libnsplugin_la_OBJECTS) $(libnsplugin_la_DEPENDENCIES) +- @echo "int main() {return 0;}" > libnsplugin_la_closure.cpp +- @$(LTCXXCOMPILE) -c libnsplugin_la_closure.cpp +- $(CXXLINK) libnsplugin_la_closure.lo $(libnsplugin_la_LDFLAGS) $(libnsplugin_la_OBJECTS) $(libnsplugin_la_LIBADD) $(LIBS) +- @rm -f libnsplugin_la_closure.* libnsplugin.la.closure +- @echo "timestamp" > libnsplugin.la.closure +- +- + #>+ 3 + clean-metasources: + -rm -f nspluginloader.moc plugin_part.moc + + #>+ 2 +-KDE_DIST=khtml_plugins.desktop TESTCASES Makefile.in plugin_part.h NSPluginCallbackIface.h nspluginpart.rc HOWTO.DEBUG Makefile.am ++KDE_DIST=khtml_plugins.desktop TESTCASES Makefile.in plugin_part.h NSPluginCallbackIface.h nspluginpart.rc HOWTO.DEBUG plugin_paths.h Makefile.am + + #>+ 5 + clean-idl: +@@ -1198,10 +1075,6 @@ + NSPluginClassIface_stub.cpp NSPluginClassIface_stub.h NSPluginClassIface.kidl \ + NSPluginCallbackIface_skel.cpp NSPluginCallbackIface_skel.h NSPluginCallbackIface.kidl + +-#>+ 3 +-clean-closures: +- -rm -f kcm_nsplugins.la.closure libnsplugin.la.closure +- + #>+ 2 + docs-am: + +diff -urN kdebase-3.5.2/nsplugins/NSPluginCallbackIface.h new/nsplugins/NSPluginCallbackIface.h +--- kdebase-3.5.2/nsplugins/NSPluginCallbackIface.h 2005-10-10 15:04:05.000000000 +0000 ++++ new/nsplugins/NSPluginCallbackIface.h 2008-01-29 22:53:08.000000000 +0000 +@@ -37,7 +37,7 @@ + virtual ASYNC requestURL(QString url, QString target) = 0; + virtual ASYNC postURL(QString url, QString target, QByteArray data, QString mime) = 0; + virtual ASYNC statusMessage( QString msg ) = 0; +- virtual ASYNC evalJavaScript( int id, QString script ) = 0; ++ virtual ASYNC evalJavaScript( Q_INT32 id, QString script ) = 0; + + }; + +diff -urN kdebase-3.5.2/nsplugins/kcm_nsplugins.cpp new/nsplugins/kcm_nsplugins.cpp +--- kdebase-3.5.2/nsplugins/kcm_nsplugins.cpp 2005-10-10 15:04:05.000000000 +0000 ++++ new/nsplugins/kcm_nsplugins.cpp 2008-01-29 22:53:08.000000000 +0000 +@@ -36,6 +36,54 @@ + #include + #include + ++#include "plugin_paths.h" ++ ++static QDateTime lastChanged( QString dir ) ++{ ++ QDateTime t = QFileInfo( dir ).lastModified(); ++ if( t.isNull()) ++ return t; ++ QStringList subdirs = QDir( dir ).entryList(); ++ for( QStringList::ConstIterator it = subdirs.begin(); ++ it != subdirs.end(); ++ ++it ) ++ { ++ if( *it == "." || *it == ".." ) ++ continue; ++ QDateTime t2 = lastChanged( *it ); ++ if( !t2.isNull() && t2 > t ) ++ t = t2; ++ } ++ return t; ++} ++ ++static bool checkSearchPathTimestamps( QStringList paths, QStringList timestamps ) ++{ ++ QStringList currentTimestamps; ++ bool changed = false; ++ QStringList::ConstIterator t = timestamps.begin(); ++ for( QStringList::ConstIterator it = paths.begin(); ++ it != paths.end(); ++ ++it, ++t ) ++ { ++ QDateTime current = lastChanged( *it ); ++ // store non-existent directory as "N" string rather than empty string, KConfig ++ // has a bug with storing a list of empty items ++ if( *t == "N" ? !current.isNull() : current != QDateTime::fromString( *t, Qt::ISODate )) ++ changed = true; ++ currentTimestamps.append( current.isNull() ? "N" : current.toString( Qt::ISODate )); ++ } ++ if( changed ) ++ { ++ KConfig config("kcmnspluginrc"); ++ config.setGroup("Misc"); ++ config.writeEntry( "lastSearchPaths", paths ); ++ config.writeEntry( "lastSearchTimestamps", currentTimestamps ); ++ return true; ++ } ++ return false; ++} ++ + extern "C" + { + KDE_EXPORT void init_nsplugin() +@@ -44,6 +92,26 @@ + config->setGroup("Misc"); + bool scan = config->readBoolEntry( "startkdeScan", false ); + bool firstTime = config->readBoolEntry( "firstTime", true ); ++ ++ if( !scan ) ++ { ++ // check if plugins have changed, as just ignoring everything and requiring the user ++ // to trigger the check manually is not reasonable - that probably actually obsoletes ++ // both options ++ QStringList searchPaths = getSearchPaths(); ++ QStringList lastSearchPaths = config->readListEntry( "lastSearchPaths" ); ++ QStringList lastTimestamps = config->readListEntry ( "lastSearchTimestamps" ); ++ if( searchPaths != lastSearchPaths || lastTimestamps.count() != lastSearchPaths.count()) ++ { // count changed, set empty timestamps, still call checkSearchPathTimestamps() ++ // in order to save the current timestamps for the next time ++ lastSearchPaths = searchPaths; ++ lastTimestamps.clear(); ++ lastTimestamps.insert( lastTimestamps.end(), searchPaths.count(), "N" ); ++ scan = true; ++ } ++ if( checkSearchPathTimestamps( lastSearchPaths, lastTimestamps )) ++ scan = true; ++ } + delete config; + + if ( scan || firstTime ) +diff -urN kdebase-3.5.2/nsplugins/khtml_plugins.desktop new/nsplugins/khtml_plugins.desktop +--- kdebase-3.5.2/nsplugins/khtml_plugins.desktop 2006-03-17 10:17:36.000000000 +0000 ++++ new/nsplugins/khtml_plugins.desktop 2008-01-29 22:53:08.000000000 +0000 +@@ -14,32 +14,34 @@ + + Name=Plugins + Name[af]=Inprop modules +-Name[ar]=الملحقات + Name[az]=Əlavələr +-Name[be]=Дапаўненьні ++Name[be]=Утулкі + Name[bg]=Приставки + Name[bn]=প্লাগ-ইন + Name[br]=Lugantoù + Name[bs]=Dodaci + Name[ca]=Connectors + Name[cs]=Moduly ++Name[csb]=Pluginsë + Name[cy]=Ategion + Name[da]=Plugin + Name[el]=Πρόσθετα + Name[eo]=Kromaĵoj ++Name[es]=Complementos + Name[et]=Pluginad + Name[eu]=Pluginak +-Name[fa]=متصل‌کننده ++Name[fa]=وصله‌ها + Name[fi]=Liitännäiset + Name[fr]=Modules externes + Name[ga]=Breiseáin + Name[he]=תוספים + Name[hi]=प्लगइन्स +-Name[hr]=Umetci ++Name[hr]=Dodaci + Name[hu]=Bővítőmodulok + Name[is]=Íforrit + Name[it]=Plugin + Name[ja]=プラグイン ++Name[kk]=Модульдер + Name[km]=កម្មវិធី​ជំនួយ + Name[ko]=플러그인 + Name[lo]=ລງບ +@@ -50,9 +52,10 @@ + Name[ms]=Plugin + Name[mt]=Plagins + Name[nb]=Programtillegg ++Name[ne]=प्लगइन + Name[nn]=Programtillegg + Name[nso]=Ditsenyo +-Name[pa]=ਪਲੱਗਿੰਨ ++Name[pa]=ਪਲੱਗਇਨ + Name[pl]=Wtyczki + Name[pt]='Plugins' + Name[pt_BR]=Plug-ins +@@ -67,12 +70,14 @@ + Name[ss]=Ema- Plugin + Name[sv]=Insticksprogram + Name[ta]=செருகல்கள் ++Name[te]=ప్లగిన్లు + Name[tg]=Мутассалкунандаҳо + Name[th]=ปลั๊กอิน + Name[tr]=Eklentiler + Name[tt]=Quşımta + Name[uk]=Втулки + Name[uz]=Плагинлар ++Name[vi]=Các trình bổ sung + Name[wa]=Tchôke-divins + Name[xh]=Iiplagi ezingaphakathi + Name[zh_CN]=插件 +@@ -80,23 +85,24 @@ + Name[zu]=Ama-Plugin + Comment=Configure the browser plugins + Comment[af]=Konfigureer die blaaier inprop modules +-Comment[ar]=إعداد ملحقات المتصفح + Comment[az]=Səyyah əlavələrini quraşdırın +-Comment[bg]=Настройки на приставките на браузъра ++Comment[be]=Настаўленні модуляў вандроўніка ++Comment[bg]=Настройване приставките на браузъра + Comment[bn]=বিভিন্ন ব্রাউজার প্লাগ-ইন কনফিগার করুন + Comment[br]=Kefluniañ lugantoù ar furcher + Comment[bs]=Podesite dodatke preglednika (browser plugins) + Comment[ca]=Aquí podeu configurar els connectors del navegador + Comment[cs]=Nastavení modulů prohlížeče (pluginy) ++Comment[csb]=Kònfigùracëjô pluginsów przezérnika + Comment[cy]=Ffurfweddu ategion y porydd + Comment[da]=Indstil browserens plugin +-Comment[de]=Plugins für Web-Browser einrichten ++Comment[de]=Plugins für Webbrowser einrichten + Comment[el]=Ρυθμίστε τα πρόσθετα του περιηγητή + Comment[eo]=Agordu la foliumilajn kromaĵojn +-Comment[es]=Configuración de los plugins del navegador ++Comment[es]=Configurar los complementos del navegador + Comment[et]=Veebilehitseja pluginate seadistamine + Comment[eu]=Konfiguratu arakatzailearen pluginak +-Comment[fa]=تنظیم متصل‌کننده‌های مرورگر ++Comment[fa]=پیکربندی وصله‌های مرورگر + Comment[fi]=Muokkaa selaimen liitännäisasetuksia + Comment[fr]=Configuration des modules externes du navigateur + Comment[fy]=Hjir kinne jo de blêder-plugins ynstelle +@@ -104,26 +110,28 @@ + Comment[gl]=Configurar os plugins do navegador + Comment[he]=שינוי הגדרות התוספים של הדפדפן + Comment[hi]=ब्राउज़र प्लगइन कॉन्फ़िगर करें +-Comment[hr]=Podešavanje pretraživačevih umetaka ++Comment[hr]=Konfiguriranje dodataka preglednika + Comment[hu]=A böngésző bővítőmoduljainak beállításai + Comment[is]=Stilla íforrit vafra + Comment[it]=Configura i plugin del browser + Comment[ja]=ブラウザのプラグインの設定 ++Comment[kk]=Браузер модульдерінің баптауы + Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​កម្មវិធី​ជំនួយ​របស់​កម្មវិធី​រុករក + Comment[ko]=탐색기 플러그인을 설정합니다 + Comment[lo]=ປັກອິນສອດສອ່ງຊີພີຍູ + Comment[lt]=Konfigūruoti naršyklės priedus + Comment[lv]=Konfigurēt pārlūka spaudņus +-Comment[mk]=Конфигурирај ги приклучоците на прелистувачот ++Comment[mk]=Конфигурација на приклучоците на прелистувачот + Comment[mn]=Вэб хөтөчийн плугин тохируулга + Comment[ms]=Tetapkan plugin pelayar + Comment[mt]=Ikkonfigura l-plugins tal-browser + Comment[nb]=Sett opp programtillegg for nettleseren + Comment[nds]=Kiekerplugins instellen ++Comment[ne]=प्लगइन ब्राउजर कन्फिगर गर्नुहोस् + Comment[nl]=Hier kunt u de browser-plugins instellen + Comment[nn]=Set opp programtillegg for nettlesaren + Comment[nso]=Beakanya ditsenyo tsa seinyakisi +-Comment[pa]=ਝਲਕਾਰਾ ਪਲੱਗਿੰਨ ਸੰਰਚਨਾ ++Comment[pa]=ਝਲਕਾਰਾ ਪਲੱਗਇਨ ਸੰਰਚਨਾ + Comment[pl]=Konfiguracja wtyczek przeglądarki + Comment[pt]=Configurar os 'plugins' do navegador + Comment[pt_BR]=Configura os plug-ins do navegador +@@ -144,7 +152,7 @@ + Comment[uk]=Налаштування втулків навігатора + Comment[uz]=Браузернинг плагинларини мослаш + Comment[ven]=Dzudzanyani plugins ya burausa +-Comment[vi]=Cấu hình plugin cho trình duyệt ++Comment[vi]=Cấu hình trình bổ sung cho trình duyệt + Comment[wa]=Apontyî les tchôke-divins do betchteu + Comment[xh]=Qwalasela umkhangheli zincwadi zeplagi ezingaphakathi + Comment[zh_CN]=配置浏览器插件 +@@ -152,19 +160,21 @@ + Comment[zu]=Hlanganisela ama-plugin omcingi + Keywords=konqueror,kfm,browser,html,web,www,fonts,plugins + Keywords[az]=konqueror,kfm,browser,html,web,www,fonts,plugins,konqueror,kfm,səyyah,html,şəbəkə,www,yazı növləri,rənglər,java,javascript,hərf,hərf dəstəsi,kodlama,bağlantılar,rəsmlər,ox +-Keywords[bg]=приставки, конфигуриране, браузър, уеб, шрифтове, Интернет, приставка, модул, konqueror, kfm, browser, html, web, www, fonts, plugins ++Keywords[be]=Вандроўнік,Сеціва,Шрыфты,Утулкі,konqueror,kfm,browser,html,web,www,fonts,plugins ++Keywords[bg]=приставки, настройване, браузър, уеб, шрифтове, Интернет, приставка, модул, konqueror, kfm, browser, html, web, www, fonts, plugins + Keywords[br]=konqueror,kfm,furcher,html,web,gwiad,livioù,java,javascript +-Keywords[ca]=konqueror,kfm,navegador,html,web,www,fonts,connectors ++Keywords[ca]=konqueror,kfm,navegador,html,web,www,lletres,connectors + Keywords[cs]=Konqueror,Kfm,Prohlížeč,HTML,Web,WWW,Písma,Moduly ++Keywords[csb]=konqueror,kfm,przezérnik,html,séc,www,fòntë,pluginsë + Keywords[cy]=konqueror,kfm,porwr,porydd,html,gwe,www,wynebfathau,ffontiau,ategion + Keywords[da]=konqueror,kfm,browser,html,net,www,skrifttyper,plugin + Keywords[de]=Konqueror,kfm,Browser,HTML,Web,WWW,Schriften,Plugins + Keywords[el]=konqueror,kfm,περιηγητής,html,ιστός,www,γραμματοσειρές,πρόσθετα + Keywords[eo]=Konkeranto,Kfm,TTT,HTML,WWW,tiparo,koloro,Javo,Javoskripto,kursoro, kursilo,ligo,referenco,bildo,signaro,kodo +-Keywords[es]=konqueror,kfm,navegador,html,web,www,fuentes,plugins ++Keywords[es]=konqueror,kfm,navegador,html,web,www,tipos de letra,complementos + Keywords[et]=konqueror,kfm,veebilehitseja,html,veeb,www,fondid,pluginad + Keywords[eu]=konqueror,kfm,arakatzailea,html,web,www,letra-tipoak,pluginak +-Keywords[fa]=konqueror,kfm,browser,html,web,www,fonts,plugins,متصل,کانکرر,قلم,خط ++Keywords[fa]=konqueror، kfm، مرورگر، html، وب، www، قلمها، وصله‌ها + Keywords[fi]=konqueror,kfm,selain,html,web,www,kirjasimet,liitännäiset + Keywords[fr]=konqueror,kfm,navigateur,html,web,www,polices,plugins,modules externes + Keywords[fy]=konqueror,kfm,browser,blêder,html,web,www,fonts,lettertypen,plugins,internet,ynternet,netscape plugins +@@ -172,11 +182,11 @@ + Keywords[gl]=konqueror,kfm,navegador,html,web,www,fontes,plugins + Keywords[he]=konqueror,kfm,דפדפן,html,web,www,אינטרנט,גופנים,תוספים, fonts,plugins + Keywords[hi]=कॉन्करर केएफएम,ब्राउजर,एचटीएमएल,वेब,डब्ल्यूडब्ल्यूडब्ल्यू,फ़ॉन्ट्स,प्लगइन्स +-Keywords[hr]=konqueror,kfm,pretraživač,html,web,www,pismavi,dodaci ++Keywords[hr]=konqueror,kfm,preglednik,html,web,www,fontovi,dodaci,mreža + Keywords[hu]=Konqueror,kfm,böngésző,HTML,web,WWW,betűtípusok,bővítőmodulok + Keywords[is]=konqueror,kfm,flakkari,html,web,www,letur,íforrit,vefur + Keywords[it]=konqueror,kfm,browser,html,web,www,caratteri,plugin +-Keywords[ja]=konqueror,kfm,ブラウザ,html,web,www,フォント,プラグイン ++Keywords[ja]=konqueror,kfm,ブラウザ,html,web,ウェブ,www,フォント,プラグイン + Keywords[km]=konqueror,kfm,កម្មវិធី​រុករក,html,បណ្ដាញ,វើលវ៉ាយវិប,ពុម្ពអក្សរ,កម្មវិធី​ជំនួយ + Keywords[lt]=konqueror,kfm,browser,html,web,www,fonts,plugins. naršyklė,tinklalapiai,šriftai,priedai + Keywords[lv]=iekarotājs,kfm,pārlūks,html,web,www,fonti,spraudņi +@@ -186,10 +196,11 @@ + Keywords[mt]=konqueror,kfm,browser,html,web,www,fonts,plugins,plagins + Keywords[nb]=Konqueror,KFM,nettleser,HTML,verdensveven,WWW,Internett,skrifter,programtillegg + Keywords[nds]=Konqueror,kfm,Nettkieker,HTML,web,www,Schriftoorden,Plugins ++Keywords[ne]=कन्क्वेरर,kfm, ब्राउजर,html, वेब,www, फन्ट, प्लगइन + Keywords[nl]=konqueror,kfm,browser,html,web,www,fonts,lettertypen,plugins,internet,netscape plugins + Keywords[nn]=Konqueror,KFM,nettlesar,HTML,verdsveven,WWW,skrifter,programtillegg + Keywords[nso]=konqueror,kfm,senyakisi,html,web,www,difonto,ditsenyo +-Keywords[pa]=konqueror,kfm,browser,html,web,www,ਫੋਂਟ,ਪਲੱਗਿੰਨ,ਕੋਨਕਿਉਰਰ,ਝਲਕਾਰਾ,ਵੈਬ ++Keywords[pa]=konqueror,kfm,browser,html,web,www,ਫੋਂਟ,ਪਲੱਗਇਨ,ਕੋਨਕਿਉਰਰ,ਝਲਕਾਰਾ,ਵੈਬ + Keywords[pl]=konqueror,kfm,przeglądarka,html,sieć,www,czcionki,wtyczki + Keywords[pt]=konqueror,kfm,navegador,HTML,web,WWW,tipos de letra,'plugins' + Keywords[pt_BR]=konqueror,kfm,navegador,html,web,www,fontes,plug-ins +@@ -208,7 +219,7 @@ + Keywords[tt]=konqueror,kfm,browser,html,web,www,fonts,plugins,quşımta,şäkel,päräwez,çeltär + Keywords[uk]=konqueror,kfm,навігатор,html,тенета,www,шрифти,втулки + Keywords[uz]=konqueror,kfm,html,www,браузер,веб,шрифтлар,плагинлар +-Keywords[vi]=konqueror,kfm,trình duyệt,html,web;www,phông,plugin ++Keywords[vi]=konqueror,kfm,trình duyệt,html,web;www,phông chữ,trình bổ sung + Keywords[wa]=konqueror,kfm,foyteuse,betchteu,html,waibe,www,fontes,tchôke-divins + Keywords[xh]=konqueror,kfm,umkhangeli zincwadi,html,web, www,imigca,iplagi ezingaphakathi + Keywords[zh_CN]=konqueror,kfm,browser,html,web,www,fonts,plugins,浏览器,字体,插件 +diff -urN kdebase-3.5.2/nsplugins/nspluginloader.cpp new/nsplugins/nspluginloader.cpp +--- kdebase-3.5.2/nsplugins/nspluginloader.cpp 2005-11-19 11:08:29.000000000 +0000 ++++ new/nsplugins/nspluginloader.cpp 2008-01-29 22:53:08.000000000 +0000 +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + #include + + #include "nspluginloader.h" +@@ -54,11 +55,14 @@ + int NSPluginLoader::s_refCount = 0; + + +-NSPluginInstance::NSPluginInstance(QWidget *parent, const QCString& app, const QCString& id) +- : DCOPStub(app, id), NSPluginInstanceIface_stub(app, id), EMBEDCLASS(parent) ++NSPluginInstance::NSPluginInstance(QWidget *parent) ++ : EMBEDCLASS(parent), _loader( NULL ), shown( false ), inited( false ), resize_count( 0 ), stub( NULL ) + { +- _loader = 0L; +- shown = false; ++} ++ ++void NSPluginInstance::init(const QCString& app, const QCString& obj) ++{ ++ stub = new NSPluginInstanceIface_stub( app, obj ); + QGridLayout *_layout = new QGridLayout(this, 1, 1); + KConfig cfg("kcmnspluginrc", false); + cfg.setGroup("Misc"); +@@ -69,22 +73,37 @@ + show(); + } else { + _button = 0L; +- doLoadPlugin(); ++ // Protection against repeated NPSetWindow() - Flash v9,0,115,0 doesn't handle ++ // repeated NPSetWindow() calls properly, which happens when NSPluginInstance is first ++ // shown and then resized. Which is what happens with KHTML. Therefore use 'shown' ++ // to detect whether the widget is shown and drop all resize events before that, ++ // and use 'resize_count' to wait for that one more resize to come (plus a timer ++ // for a possible timeout). Only then flash is actually initialized ('inited' is true). ++ resize_count = 1; ++ QTimer::singleShot( 1000, this, SLOT( doLoadPlugin())); + } + } + + + void NSPluginInstance::doLoadPlugin() { +- if (!_loader) { ++ if (!inited) { + delete _button; + _button = 0L; + _loader = NSPluginLoader::instance(); + setBackgroundMode(QWidget::NoBackground); +- setProtocol(QXEmbed::XPLAIN); +- embed( NSPluginInstanceIface_stub::winId() ); ++ WId winid = stub->winId(); ++ if( winid != 0 ) { ++ setProtocol(QXEmbed::XPLAIN); ++ embed( winid ); ++ } else { ++ setProtocol(QXEmbed::XEMBED); ++ } ++ // resize before showing, some plugins are stupid and can't handle repeated ++ // NPSetWindow() calls very well (viewer will avoid the call if not shown yet) ++ resizePlugin(width(), height()); + displayPlugin(); + show(); +- shown = true; ++ inited = true; + } + } + +@@ -92,10 +111,13 @@ + NSPluginInstance::~NSPluginInstance() + { + kdDebug() << "-> NSPluginInstance::~NSPluginInstance" << endl; +- shutdown(); ++ if( inited ) ++ shutdown(); + kdDebug() << "release" << endl; +- _loader->release(); ++ if(_loader) ++ _loader->release(); + kdDebug() << "<- NSPluginInstance::~NSPluginInstance" << endl; ++ delete stub; + } + + +@@ -111,8 +133,14 @@ + + void NSPluginInstance::resizeEvent(QResizeEvent *event) + { +- if (shown == false) ++ if (shown == false) // ignore all resizes before being shown + return; ++ if( !inited && resize_count > 0 ) { ++ if( --resize_count == 0 ) ++ doLoadPlugin(); ++ else ++ return; ++ } + EMBEDCLASS::resizeEvent(event); + if (isVisible()) { + resizePlugin(width(), height()); +@@ -120,6 +148,33 @@ + kdDebug() << "NSPluginInstance(client)::resizeEvent" << endl; + } + ++void NSPluginInstance::showEvent(QShowEvent *event) ++{ ++ EMBEDCLASS::showEvent(event); ++ shown = true; ++ if(!inited && resize_count == 0 ) ++ doLoadPlugin(); ++ if(inited) ++ resizePlugin(width(), height()); ++} ++ ++void NSPluginInstance::displayPlugin() ++{ ++ qApp->syncX(); // process pending X commands ++ stub->displayPlugin(); ++} ++ ++void NSPluginInstance::resizePlugin( int w, int h ) ++{ ++ qApp->syncX(); ++ stub->resizePlugin( w, h ); ++} ++ ++void NSPluginInstance::shutdown() ++{ ++ if( stub ) ++ stub->shutdown(); ++} + + /*******************************************************************************/ + +@@ -439,19 +494,19 @@ + if ( mime=="application/x-shockwave-flash" ) + embed = true; // flash doesn't work in full mode :( + ++ NSPluginInstance *plugin = new NSPluginInstance( parent ); ++ kdDebug() << "<- NSPluginLoader::NewInstance = " << (void*)plugin << endl; + + // get plugin instance +- DCOPRef inst_ref = cls->newInstance( url, mime, embed, argn, argv, appId, callbackId, reload, doPost, postData); ++ DCOPRef inst_ref = cls->newInstance( url, mime, embed, argn, argv, appId, callbackId, reload, doPost, postData, plugin->winId()); + if ( inst_ref.isNull() ) + { + kdDebug() << "Couldn't create plugin instance" << endl; ++ delete plugin; + return 0; + } + +- NSPluginInstance *plugin = new NSPluginInstance( parent, inst_ref.app(), +- inst_ref.object() ); +- +- kdDebug() << "<- NSPluginLoader::NewInstance = " << (void*)plugin << endl; ++ plugin->init( inst_ref.app(), inst_ref.object() ); + + return plugin; + } +diff -urN kdebase-3.5.2/nsplugins/nspluginloader.h new/nsplugins/nspluginloader.h +--- kdebase-3.5.2/nsplugins/nspluginloader.h 2005-11-19 11:08:29.000000000 +0000 ++++ new/nsplugins/nspluginloader.h 2008-01-29 22:53:08.000000000 +0000 +@@ -43,24 +43,35 @@ + class QPushButton; + class QGridLayout; + +-class NSPluginInstance : public EMBEDCLASS, virtual public NSPluginInstanceIface_stub ++class NSPluginInstance : public EMBEDCLASS + { + Q_OBJECT + + public: +- NSPluginInstance(QWidget *parent, const QCString& app, const QCString& id); ++ NSPluginInstance(QWidget *parent); ++ void init( const QCString& app, const QCString& obj ); + ~NSPluginInstance(); ++public: // wrappers ++ void javascriptResult( int id, QString result ) { stub->javascriptResult( id, result ); } + + private slots: + void doLoadPlugin(); + + protected: + void resizeEvent(QResizeEvent *event); ++ void showEvent (QShowEvent *); + void windowChanged(WId w); + class NSPluginLoader *_loader; + bool shown; ++ bool inited; ++ int resize_count; + QPushButton *_button; + QGridLayout *_layout; ++ NSPluginInstanceIface_stub* stub; ++private: // wrappers ++ void displayPlugin(); ++ void resizePlugin( int w, int h ); ++ void shutdown(); + }; + + +diff -urN kdebase-3.5.2/nsplugins/plugin_paths.cpp new/nsplugins/plugin_paths.cpp +--- kdebase-3.5.2/nsplugins/plugin_paths.cpp 1970-01-01 00:00:00.000000000 +0000 ++++ new/nsplugins/plugin_paths.cpp 2008-01-29 22:53:08.000000000 +0000 +@@ -0,0 +1,74 @@ ++/* ++ ++ This application scans for Netscape plugins and create a cache and ++ the necessary mimelnk and service files. ++ ++ ++ Copyright (c) 2000 Matthias Hoelzer-Kluepfel ++ Stefan Schimanski <1Stein@gmx.de> ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ ++*/ ++ ++#include "plugin_paths.h" ++ ++#include ++#include ++ ++QStringList getSearchPaths() ++{ ++ QStringList searchPaths; ++ ++ KConfig *config = new KConfig("kcmnspluginrc", false); ++ config->setGroup("Misc"); ++ ++ // setup default paths ++ if ( !config->hasKey("scanPaths") ) { ++ QStringList paths; ++ // keep sync with kdebase/kcontrol/konqhtml ++ paths.append("$HOME/.mozilla/plugins"); ++ paths.append("$HOME/.netscape/plugins"); ++ paths.append("/usr/lib/firefox/plugins"); ++ paths.append("/usr/lib64/browser-plugins"); ++ paths.append("/usr/lib/browser-plugins"); ++ paths.append("/usr/local/netscape/plugins"); ++ paths.append("/opt/mozilla/plugins"); ++ paths.append("/opt/mozilla/lib/plugins"); ++ paths.append("/opt/netscape/plugins"); ++ paths.append("/opt/netscape/communicator/plugins"); ++ paths.append("/usr/lib/netscape/plugins"); ++ paths.append("/usr/lib/netscape/plugins-libc5"); ++ paths.append("/usr/lib/netscape/plugins-libc6"); ++ paths.append("/usr/lib/mozilla/plugins"); ++ paths.append("/usr/lib64/netscape/plugins"); ++ paths.append("/usr/lib64/mozilla/plugins"); ++ paths.append("$MOZILLA_HOME/plugins"); ++ config->writeEntry( "scanPaths", paths ); ++ } ++ ++ // read paths ++ config->setDollarExpansion( true ); ++ searchPaths = config->readListEntry( "scanPaths" ); ++ delete config; ++ ++ // append environment variable NPX_PLUGIN_PATH ++ QStringList envs = QStringList::split(':', getenv("NPX_PLUGIN_PATH")); ++ QStringList::Iterator it; ++ for (it = envs.begin(); it != envs.end(); ++it) ++ searchPaths.append(*it); ++ ++ return searchPaths; ++} +diff -urN kdebase-3.5.2/nsplugins/plugin_paths.h new/nsplugins/plugin_paths.h +--- kdebase-3.5.2/nsplugins/plugin_paths.h 1970-01-01 00:00:00.000000000 +0000 ++++ new/nsplugins/plugin_paths.h 2008-01-29 22:53:08.000000000 +0000 +@@ -0,0 +1,8 @@ ++#ifndef PLUGIN_PATHS_H ++#define PLUGIN_PATHS_H ++ ++#include ++ ++extern QStringList getSearchPaths(); ++ ++#endif +diff -urN kdebase-3.5.2/nsplugins/pluginscan.cpp new/nsplugins/pluginscan.cpp +--- kdebase-3.5.2/nsplugins/pluginscan.cpp 2006-01-19 17:01:49.000000000 +0000 ++++ new/nsplugins/pluginscan.cpp 2008-01-29 22:53:08.000000000 +0000 +@@ -54,6 +54,9 @@ + #include + + #include "sdk/npupp.h" ++#include ++ ++#include "plugin_paths.h" + + static int showProgress=0; + +@@ -93,6 +96,16 @@ + } + #endif + ++// The only purpose of this function is just to pull in libXt. ++// Using --enable-new-ldflags makes the linker use --as-needed and since ++// otherwise nspluginscan wouldn't actually use libXt it wouldn't be really ++// linked against it. However some plugins are not linked against libXt ++// yet expect to have it available in the hosting application. ++void pullInXt() ++{ ++ XtFree( NULL ); ++} ++ + KConfig *infoConfig = 0; + + +@@ -433,51 +446,6 @@ + } + + +-QStringList getSearchPaths() +-{ +- QStringList searchPaths; +- +- KConfig *config = new KConfig("kcmnspluginrc", false); +- config->setGroup("Misc"); +- +- // setup default paths +- if ( !config->hasKey("scanPaths") ) { +- QStringList paths; +- paths.append("$HOME/.mozilla/plugins"); +- paths.append("$HOME/.netscape/plugins"); +- paths.append("/usr/lib/firefox/plugins"); +- paths.append("/usr/lib64/browser-plugins"); +- paths.append("/usr/lib/browser-plugins"); +- paths.append("/usr/local/netscape/plugins"); +- paths.append("/opt/mozilla/plugins"); +- paths.append("/opt/mozilla/lib/plugins"); +- paths.append("/opt/netscape/plugins"); +- paths.append("/opt/netscape/communicator/plugins"); +- paths.append("/usr/lib/netscape/plugins"); +- paths.append("/usr/lib/netscape/plugins-libc5"); +- paths.append("/usr/lib/netscape/plugins-libc6"); +- paths.append("/usr/lib/mozilla/plugins"); +- paths.append("/usr/lib64/netscape/plugins"); +- paths.append("/usr/lib64/mozilla/plugins"); +- paths.append("$MOZILLA_HOME/plugins"); +- config->writeEntry( "scanPaths", paths ); +- } +- +- // read paths +- config->setDollarExpansion( true ); +- searchPaths = config->readListEntry( "scanPaths" ); +- delete config; +- +- // append environment variable NPX_PLUGIN_PATH +- QStringList envs = QStringList::split(':', getenv("NPX_PLUGIN_PATH")); +- QStringList::Iterator it; +- for (it = envs.begin(); it != envs.end(); ++it) +- searchPaths.append(*it); +- +- return searchPaths; +-} +- +- + void writeServicesFile( QStringList mimeTypes ) + { + QString fname = KGlobal::dirs()->saveLocation("services", "") +@@ -585,6 +553,7 @@ + + sigaction( SIGCHLD, &act, 0 ); + ++ pullInXt(); + + // set up the paths used to look for plugins + QStringList searchPaths = getSearchPaths(); +diff -urN kdebase-3.5.2/nsplugins/sdk/README new/nsplugins/sdk/README +--- kdebase-3.5.2/nsplugins/sdk/README 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/sdk/README 1970-01-01 00:00:00.000000000 +0000 +@@ -1,4 +0,0 @@ +-These files are part of the Netscape Plugin SDK. +- +-To get the complete SDK, go to developer.netscape.com. +- +diff -urN kdebase-3.5.2/nsplugins/sdk/jni.h new/nsplugins/sdk/jni.h +--- kdebase-3.5.2/nsplugins/sdk/jni.h 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/sdk/jni.h 2008-01-29 22:53:08.000000000 +0000 +@@ -1,36 +1,38 @@ +-/* +- * @(#)jni.h 1.26 97/01/27 ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * +- * Copyright (c) 1993-1996 Sun Microsystems, Inc. All Rights Reserved. ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ + * +- * Permission to use, copy, modify, and distribute this software +- * and its documentation for NON-COMMERCIAL purposes and without +- * fee is hereby granted provided that this copyright notice +- * appears in all copies. ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. + * +- * The Java source code is the confidential and proprietary information +- * of Sun Microsystems, Inc. ("Confidential Information"). You shall +- * not disclose such Confidential Information and shall use it only in +- * accordance with the terms of the license agreement you entered into +- * with Sun. ++ * The Original Code is the Java Runtime Interface. + * +- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF +- * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +- * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +- * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR +- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR +- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. +- */ +- +-/* +- * We used part of Netscape's Java Runtime Interface (JRI) as the starting +- * point of our design and implementation. +- */ +- +-/****************************************************************************** +- * Java Runtime Interface +- * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. +- *****************************************************************************/ ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation and Sun Microsystems, Inc. ++ * Portions created by the Initial Developer are Copyright (C) 1993-1996 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ + + #ifndef JNI_H + #define JNI_H +@@ -112,8 +114,10 @@ + + #endif + ++#if 0 /* moved to jri_md.h */ + typedef jobject jref; /* For transition---not meant to be part of public + API anymore.*/ ++#endif + + typedef union jvalue { + jboolean z; +@@ -199,508 +203,508 @@ + void *reserved2; + + void *reserved3; +- jint (*GetVersion)(JNIEnv *env); ++ jint (JNICALL *GetVersion)(JNIEnv *env); + +- jclass (*DefineClass) ++ jclass (JNICALL *DefineClass) + (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, + jsize len); +- jclass (*FindClass) ++ jclass (JNICALL *FindClass) + (JNIEnv *env, const char *name); + + void *reserved4; + void *reserved5; + void *reserved6; + +- jclass (*GetSuperclass) ++ jclass (JNICALL *GetSuperclass) + (JNIEnv *env, jclass sub); +- jboolean (*IsAssignableFrom) ++ jboolean (JNICALL *IsAssignableFrom) + (JNIEnv *env, jclass sub, jclass sup); + void *reserved7; + + +- jint (*_Throw) ++ jint (JNICALL *Throw) + (JNIEnv *env, jthrowable obj); +- jint (*ThrowNew) ++ jint (JNICALL *ThrowNew) + (JNIEnv *env, jclass clazz, const char *msg); +- jthrowable (*ExceptionOccurred) ++ jthrowable (JNICALL *ExceptionOccurred) + (JNIEnv *env); +- void (*ExceptionDescribe) ++ void (JNICALL *ExceptionDescribe) + (JNIEnv *env); +- void (*ExceptionClear) ++ void (JNICALL *ExceptionClear) + (JNIEnv *env); +- void (*FatalError) ++ void (JNICALL *FatalError) + (JNIEnv *env, const char *msg); + void *reserved8; + void *reserved9; + +- jobject (*NewGlobalRef) ++ jobject (JNICALL *NewGlobalRef) + (JNIEnv *env, jobject lobj); +- void (*DeleteGlobalRef) ++ void (JNICALL *DeleteGlobalRef) + (JNIEnv *env, jobject gref); +- void (*DeleteLocalRef) ++ void (JNICALL *DeleteLocalRef) + (JNIEnv *env, jobject obj); +- jboolean (*IsSameObject) ++ jboolean (JNICALL *IsSameObject) + (JNIEnv *env, jobject obj1, jobject obj2); + void *reserved10; + void *reserved11; + +- jobject (*AllocObject) ++ jobject (JNICALL *AllocObject) + (JNIEnv *env, jclass clazz); +- jobject (*NewObject) ++ jobject (JNICALL *NewObject) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jobject (*NewObjectV) ++ jobject (JNICALL *NewObjectV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jobject (*NewObjectA) ++ jobject (JNICALL *NewObjectA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- jclass (*GetObjectClass) ++ jclass (JNICALL *GetObjectClass) + (JNIEnv *env, jobject obj); +- jboolean (*IsInstanceOf) ++ jboolean (JNICALL *IsInstanceOf) + (JNIEnv *env, jobject obj, jclass clazz); + +- jmethodID (*GetMethodID) ++ jmethodID (JNICALL *GetMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + +- jobject (*CallObjectMethod) ++ jobject (JNICALL *CallObjectMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- jobject (*CallObjectMethodV) ++ jobject (JNICALL *CallObjectMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- jobject (*CallObjectMethodA) ++ jobject (JNICALL *CallObjectMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); + +- jboolean (*CallBooleanMethod) ++ jboolean (JNICALL *CallBooleanMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- jboolean (*CallBooleanMethodV) ++ jboolean (JNICALL *CallBooleanMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- jboolean (*CallBooleanMethodA) ++ jboolean (JNICALL *CallBooleanMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); + +- jbyte (*CallByteMethod) ++ jbyte (JNICALL *CallByteMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- jbyte (*CallByteMethodV) ++ jbyte (JNICALL *CallByteMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- jbyte (*CallByteMethodA) ++ jbyte (JNICALL *CallByteMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + +- jchar (*CallCharMethod) ++ jchar (JNICALL *CallCharMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- jchar (*CallCharMethodV) ++ jchar (JNICALL *CallCharMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- jchar (*CallCharMethodA) ++ jchar (JNICALL *CallCharMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + +- jshort (*CallShortMethod) ++ jshort (JNICALL *CallShortMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- jshort (*CallShortMethodV) ++ jshort (JNICALL *CallShortMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- jshort (*CallShortMethodA) ++ jshort (JNICALL *CallShortMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + +- jint (*CallIntMethod) ++ jint (JNICALL *CallIntMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- jint (*CallIntMethodV) ++ jint (JNICALL *CallIntMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- jint (*CallIntMethodA) ++ jint (JNICALL *CallIntMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + +- jlong (*CallLongMethod) ++ jlong (JNICALL *CallLongMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- jlong (*CallLongMethodV) ++ jlong (JNICALL *CallLongMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- jlong (*CallLongMethodA) ++ jlong (JNICALL *CallLongMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + +- jfloat (*CallFloatMethod) ++ jfloat (JNICALL *CallFloatMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- jfloat (*CallFloatMethodV) ++ jfloat (JNICALL *CallFloatMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- jfloat (*CallFloatMethodA) ++ jfloat (JNICALL *CallFloatMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + +- jdouble (*CallDoubleMethod) ++ jdouble (JNICALL *CallDoubleMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- jdouble (*CallDoubleMethodV) ++ jdouble (JNICALL *CallDoubleMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- jdouble (*CallDoubleMethodA) ++ jdouble (JNICALL *CallDoubleMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + +- void (*CallVoidMethod) ++ void (JNICALL *CallVoidMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); +- void (*CallVoidMethodV) ++ void (JNICALL *CallVoidMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); +- void (*CallVoidMethodA) ++ void (JNICALL *CallVoidMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); + +- jobject (*CallNonvirtualObjectMethod) ++ jobject (JNICALL *CallNonvirtualObjectMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- jobject (*CallNonvirtualObjectMethodV) ++ jobject (JNICALL *CallNonvirtualObjectMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- jobject (*CallNonvirtualObjectMethodA) ++ jobject (JNICALL *CallNonvirtualObjectMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue * args); + +- jboolean (*CallNonvirtualBooleanMethod) ++ jboolean (JNICALL *CallNonvirtualBooleanMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- jboolean (*CallNonvirtualBooleanMethodV) ++ jboolean (JNICALL *CallNonvirtualBooleanMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- jboolean (*CallNonvirtualBooleanMethodA) ++ jboolean (JNICALL *CallNonvirtualBooleanMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue * args); + +- jbyte (*CallNonvirtualByteMethod) ++ jbyte (JNICALL *CallNonvirtualByteMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- jbyte (*CallNonvirtualByteMethodV) ++ jbyte (JNICALL *CallNonvirtualByteMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- jbyte (*CallNonvirtualByteMethodA) ++ jbyte (JNICALL *CallNonvirtualByteMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + +- jchar (*CallNonvirtualCharMethod) ++ jchar (JNICALL *CallNonvirtualCharMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- jchar (*CallNonvirtualCharMethodV) ++ jchar (JNICALL *CallNonvirtualCharMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- jchar (*CallNonvirtualCharMethodA) ++ jchar (JNICALL *CallNonvirtualCharMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + +- jshort (*CallNonvirtualShortMethod) ++ jshort (JNICALL *CallNonvirtualShortMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- jshort (*CallNonvirtualShortMethodV) ++ jshort (JNICALL *CallNonvirtualShortMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- jshort (*CallNonvirtualShortMethodA) ++ jshort (JNICALL *CallNonvirtualShortMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + +- jint (*CallNonvirtualIntMethod) ++ jint (JNICALL *CallNonvirtualIntMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- jint (*CallNonvirtualIntMethodV) ++ jint (JNICALL *CallNonvirtualIntMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- jint (*CallNonvirtualIntMethodA) ++ jint (JNICALL *CallNonvirtualIntMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + +- jlong (*CallNonvirtualLongMethod) ++ jlong (JNICALL *CallNonvirtualLongMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- jlong (*CallNonvirtualLongMethodV) ++ jlong (JNICALL *CallNonvirtualLongMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- jlong (*CallNonvirtualLongMethodA) ++ jlong (JNICALL *CallNonvirtualLongMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + +- jfloat (*CallNonvirtualFloatMethod) ++ jfloat (JNICALL *CallNonvirtualFloatMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- jfloat (*CallNonvirtualFloatMethodV) ++ jfloat (JNICALL *CallNonvirtualFloatMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- jfloat (*CallNonvirtualFloatMethodA) ++ jfloat (JNICALL *CallNonvirtualFloatMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + +- jdouble (*CallNonvirtualDoubleMethod) ++ jdouble (JNICALL *CallNonvirtualDoubleMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- jdouble (*CallNonvirtualDoubleMethodV) ++ jdouble (JNICALL *CallNonvirtualDoubleMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- jdouble (*CallNonvirtualDoubleMethodA) ++ jdouble (JNICALL *CallNonvirtualDoubleMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + +- void (*CallNonvirtualVoidMethod) ++ void (JNICALL *CallNonvirtualVoidMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); +- void (*CallNonvirtualVoidMethodV) ++ void (JNICALL *CallNonvirtualVoidMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); +- void (*CallNonvirtualVoidMethodA) ++ void (JNICALL *CallNonvirtualVoidMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue * args); + +- jfieldID (*GetFieldID) ++ jfieldID (JNICALL *GetFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + +- jobject (*GetObjectField) ++ jobject (JNICALL *GetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID); +- jboolean (*GetBooleanField) ++ jboolean (JNICALL *GetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID); +- jbyte (*GetByteField) ++ jbyte (JNICALL *GetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID); +- jchar (*GetCharField) ++ jchar (JNICALL *GetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID); +- jshort (*GetShortField) ++ jshort (JNICALL *GetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID); +- jint (*GetIntField) ++ jint (JNICALL *GetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID); +- jlong (*GetLongField) ++ jlong (JNICALL *GetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID); +- jfloat (*GetFloatField) ++ jfloat (JNICALL *GetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID); +- jdouble (*GetDoubleField) ++ jdouble (JNICALL *GetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + +- void (*SetObjectField) ++ void (JNICALL *SetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); +- void (*SetBooleanField) ++ void (JNICALL *SetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); +- void (*SetByteField) ++ void (JNICALL *SetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); +- void (*SetCharField) ++ void (JNICALL *SetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); +- void (*SetShortField) ++ void (JNICALL *SetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); +- void (*SetIntField) ++ void (JNICALL *SetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); +- void (*SetLongField) ++ void (JNICALL *SetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); +- void (*SetFloatField) ++ void (JNICALL *SetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); +- void (*SetDoubleField) ++ void (JNICALL *SetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); + +- jmethodID (*GetStaticMethodID) ++ jmethodID (JNICALL *GetStaticMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + +- jobject (*CallStaticObjectMethod) ++ jobject (JNICALL *CallStaticObjectMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jobject (*CallStaticObjectMethodV) ++ jobject (JNICALL *CallStaticObjectMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jobject (*CallStaticObjectMethodA) ++ jobject (JNICALL *CallStaticObjectMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- jboolean (*CallStaticBooleanMethod) ++ jboolean (JNICALL *CallStaticBooleanMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jboolean (*CallStaticBooleanMethodV) ++ jboolean (JNICALL *CallStaticBooleanMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jboolean (*CallStaticBooleanMethodA) ++ jboolean (JNICALL *CallStaticBooleanMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- jbyte (*CallStaticByteMethod) ++ jbyte (JNICALL *CallStaticByteMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jbyte (*CallStaticByteMethodV) ++ jbyte (JNICALL *CallStaticByteMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jbyte (*CallStaticByteMethodA) ++ jbyte (JNICALL *CallStaticByteMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- jchar (*CallStaticCharMethod) ++ jchar (JNICALL *CallStaticCharMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jchar (*CallStaticCharMethodV) ++ jchar (JNICALL *CallStaticCharMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jchar (*CallStaticCharMethodA) ++ jchar (JNICALL *CallStaticCharMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- jshort (*CallStaticShortMethod) ++ jshort (JNICALL *CallStaticShortMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jshort (*CallStaticShortMethodV) ++ jshort (JNICALL *CallStaticShortMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jshort (*CallStaticShortMethodA) ++ jshort (JNICALL *CallStaticShortMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- jint (*CallStaticIntMethod) ++ jint (JNICALL *CallStaticIntMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jint (*CallStaticIntMethodV) ++ jint (JNICALL *CallStaticIntMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jint (*CallStaticIntMethodA) ++ jint (JNICALL *CallStaticIntMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- jlong (*CallStaticLongMethod) ++ jlong (JNICALL *CallStaticLongMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jlong (*CallStaticLongMethodV) ++ jlong (JNICALL *CallStaticLongMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jlong (*CallStaticLongMethodA) ++ jlong (JNICALL *CallStaticLongMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- jfloat (*CallStaticFloatMethod) ++ jfloat (JNICALL *CallStaticFloatMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jfloat (*CallStaticFloatMethodV) ++ jfloat (JNICALL *CallStaticFloatMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jfloat (*CallStaticFloatMethodA) ++ jfloat (JNICALL *CallStaticFloatMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- jdouble (*CallStaticDoubleMethod) ++ jdouble (JNICALL *CallStaticDoubleMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); +- jdouble (*CallStaticDoubleMethodV) ++ jdouble (JNICALL *CallStaticDoubleMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); +- jdouble (*CallStaticDoubleMethodA) ++ jdouble (JNICALL *CallStaticDoubleMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + +- void (*CallStaticVoidMethod) ++ void (JNICALL *CallStaticVoidMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, ...); +- void (*CallStaticVoidMethodV) ++ void (JNICALL *CallStaticVoidMethodV) + (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); +- void (*CallStaticVoidMethodA) ++ void (JNICALL *CallStaticVoidMethodA) + (JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args); + +- jfieldID (*GetStaticFieldID) ++ jfieldID (JNICALL *GetStaticFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); +- jobject (*GetStaticObjectField) ++ jobject (JNICALL *GetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); +- jboolean (*GetStaticBooleanField) ++ jboolean (JNICALL *GetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); +- jbyte (*GetStaticByteField) ++ jbyte (JNICALL *GetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); +- jchar (*GetStaticCharField) ++ jchar (JNICALL *GetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); +- jshort (*GetStaticShortField) ++ jshort (JNICALL *GetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); +- jint (*GetStaticIntField) ++ jint (JNICALL *GetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); +- jlong (*GetStaticLongField) ++ jlong (JNICALL *GetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); +- jfloat (*GetStaticFloatField) ++ jfloat (JNICALL *GetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); +- jdouble (*GetStaticDoubleField) ++ jdouble (JNICALL *GetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + +- void (*SetStaticObjectField) ++ void (JNICALL *SetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); +- void (*SetStaticBooleanField) ++ void (JNICALL *SetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); +- void (*SetStaticByteField) ++ void (JNICALL *SetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); +- void (*SetStaticCharField) ++ void (JNICALL *SetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); +- void (*SetStaticShortField) ++ void (JNICALL *SetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); +- void (*SetStaticIntField) ++ void (JNICALL *SetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); +- void (*SetStaticLongField) ++ void (JNICALL *SetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); +- void (*SetStaticFloatField) ++ void (JNICALL *SetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); +- void (*SetStaticDoubleField) ++ void (JNICALL *SetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); + +- jstring (*NewString) ++ jstring (JNICALL *NewString) + (JNIEnv *env, const jchar *unicode, jsize len); +- jsize (*GetStringLength) ++ jsize (JNICALL *GetStringLength) + (JNIEnv *env, jstring str); +- const jchar *(*GetStringChars) ++ const jchar *(JNICALL *GetStringChars) + (JNIEnv *env, jstring str, jboolean *isCopy); +- void (*ReleaseStringChars) ++ void (JNICALL *ReleaseStringChars) + (JNIEnv *env, jstring str, const jchar *chars); + +- jstring (*NewStringUTF) ++ jstring (JNICALL *NewStringUTF) + (JNIEnv *env, const char *utf); +- jsize (*GetStringUTFLength) ++ jsize (JNICALL *GetStringUTFLength) + (JNIEnv *env, jstring str); +- const char* (*GetStringUTFChars) ++ const char* (JNICALL *GetStringUTFChars) + (JNIEnv *env, jstring str, jboolean *isCopy); +- void (*ReleaseStringUTFChars) ++ void (JNICALL *ReleaseStringUTFChars) + (JNIEnv *env, jstring str, const char* chars); + + +- jsize (*GetArrayLength) ++ jsize (JNICALL *GetArrayLength) + (JNIEnv *env, jarray array); + +- jobjectArray (*NewObjectArray) ++ jobjectArray (JNICALL *NewObjectArray) + (JNIEnv *env, jsize len, jclass clazz, jobject init); +- jobject (*GetObjectArrayElement) ++ jobject (JNICALL *GetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index); +- void (*SetObjectArrayElement) ++ void (JNICALL *SetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index, jobject val); + +- jbooleanArray (*NewBooleanArray) ++ jbooleanArray (JNICALL *NewBooleanArray) + (JNIEnv *env, jsize len); +- jbyteArray (*NewByteArray) ++ jbyteArray (JNICALL *NewByteArray) + (JNIEnv *env, jsize len); +- jcharArray (*NewCharArray) ++ jcharArray (JNICALL *NewCharArray) + (JNIEnv *env, jsize len); +- jshortArray (*NewShortArray) ++ jshortArray (JNICALL *NewShortArray) + (JNIEnv *env, jsize len); +- jintArray (*NewIntArray) ++ jintArray (JNICALL *NewIntArray) + (JNIEnv *env, jsize len); +- jlongArray (*NewLongArray) ++ jlongArray (JNICALL *NewLongArray) + (JNIEnv *env, jsize len); +- jfloatArray (*NewFloatArray) ++ jfloatArray (JNICALL *NewFloatArray) + (JNIEnv *env, jsize len); +- jdoubleArray (*NewDoubleArray) ++ jdoubleArray (JNICALL *NewDoubleArray) + (JNIEnv *env, jsize len); + +- jboolean * (*GetBooleanArrayElements) ++ jboolean * (JNICALL *GetBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *isCopy); +- jbyte * (*GetByteArrayElements) ++ jbyte * (JNICALL *GetByteArrayElements) + (JNIEnv *env, jbyteArray array, jboolean *isCopy); +- jchar * (*GetCharArrayElements) ++ jchar * (JNICALL *GetCharArrayElements) + (JNIEnv *env, jcharArray array, jboolean *isCopy); +- jshort * (*GetShortArrayElements) ++ jshort * (JNICALL *GetShortArrayElements) + (JNIEnv *env, jshortArray array, jboolean *isCopy); +- jint * (*GetIntArrayElements) ++ jint * (JNICALL *GetIntArrayElements) + (JNIEnv *env, jintArray array, jboolean *isCopy); +- jlong * (*GetLongArrayElements) ++ jlong * (JNICALL *GetLongArrayElements) + (JNIEnv *env, jlongArray array, jboolean *isCopy); +- jfloat * (*GetFloatArrayElements) ++ jfloat * (JNICALL *GetFloatArrayElements) + (JNIEnv *env, jfloatArray array, jboolean *isCopy); +- jdouble * (*GetDoubleArrayElements) ++ jdouble * (JNICALL *GetDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jboolean *isCopy); + +- void (*ReleaseBooleanArrayElements) ++ void (JNICALL *ReleaseBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); +- void (*ReleaseByteArrayElements) ++ void (JNICALL *ReleaseByteArrayElements) + (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); +- void (*ReleaseCharArrayElements) ++ void (JNICALL *ReleaseCharArrayElements) + (JNIEnv *env, jcharArray array, jchar *elems, jint mode); +- void (*ReleaseShortArrayElements) ++ void (JNICALL *ReleaseShortArrayElements) + (JNIEnv *env, jshortArray array, jshort *elems, jint mode); +- void (*ReleaseIntArrayElements) ++ void (JNICALL *ReleaseIntArrayElements) + (JNIEnv *env, jintArray array, jint *elems, jint mode); +- void (*ReleaseLongArrayElements) ++ void (JNICALL *ReleaseLongArrayElements) + (JNIEnv *env, jlongArray array, jlong *elems, jint mode); +- void (*ReleaseFloatArrayElements) ++ void (JNICALL *ReleaseFloatArrayElements) + (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); +- void (*ReleaseDoubleArrayElements) ++ void (JNICALL *ReleaseDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); + +- void (*GetBooleanArrayRegion) ++ void (JNICALL *GetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); +- void (*GetByteArrayRegion) ++ void (JNICALL *GetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); +- void (*GetCharArrayRegion) ++ void (JNICALL *GetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); +- void (*GetShortArrayRegion) ++ void (JNICALL *GetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); +- void (*GetIntArrayRegion) ++ void (JNICALL *GetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); +- void (*GetLongArrayRegion) ++ void (JNICALL *GetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); +- void (*GetFloatArrayRegion) ++ void (JNICALL *GetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); +- void (*GetDoubleArrayRegion) ++ void (JNICALL *GetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); + +- void (*SetBooleanArrayRegion) ++ void (JNICALL *SetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); +- void (*SetByteArrayRegion) ++ void (JNICALL *SetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); +- void (*SetCharArrayRegion) ++ void (JNICALL *SetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); +- void (*SetShortArrayRegion) ++ void (JNICALL *SetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); +- void (*SetIntArrayRegion) ++ void (JNICALL *SetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); +- void (*SetLongArrayRegion) ++ void (JNICALL *SetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); +- void (*SetFloatArrayRegion) ++ void (JNICALL *SetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); +- void (*SetDoubleArrayRegion) ++ void (JNICALL *SetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); + +- jint (*RegisterNatives) ++ jint (JNICALL *RegisterNatives) + (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, + jint nMethods); +- jint (*UnregisterNatives) ++ jint (JNICALL *UnregisterNatives) + (JNIEnv *env, jclass clazz); + +- jint (*MonitorEnter) ++ jint (JNICALL *MonitorEnter) + (JNIEnv *env, jobject obj); +- jint (*MonitorExit) ++ jint (JNICALL *MonitorExit) + (JNIEnv *env, jobject obj); + +- jint (*GetJavaVM) ++ jint (JNICALL *GetJavaVM) + (JNIEnv *env, JavaVM **vm); + }; + +@@ -739,8 +743,8 @@ + return functions->IsAssignableFrom(this, sub, sup); + } + +- jint _Throw(jthrowable obj) { +- return functions->_Throw(this, obj); ++ jint Throw(jthrowable obj) { ++ return functions->Throw(this, obj); + } + jint ThrowNew(jclass clazz, const char *msg) { + return functions->ThrowNew(this, clazz, msg); +@@ -1728,9 +1732,9 @@ + /* These structures will be VM-specific. */ + + typedef struct JDK1_1InitArgs { +- jint reserved0; +- void *reserved1; ++ jint version; + ++ char **properties; + jint checkSource; + jint nativeStackSize; + jint javaStackSize; +@@ -1739,15 +1743,15 @@ + jint verifyMode; + char *classpath; + +- jint (*vfprintf)(FILE *fp, const char *format, va_list args); +- void (*exit)(jint code); +- void (*abort)(); ++ jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args); ++ void (JNICALL *exit)(jint code); ++ void (JNICALL *abort)(); + + jint enableClassGC; + jint enableVerboseGC; + jint disableAsyncGC; + jint verbose; +- jint debugAgent; ++ jboolean debugging; + jint debugPort; + } JDK1_1InitArgs; + +@@ -1762,12 +1766,12 @@ + void *reserved1; + void *reserved2; + +- jint (*DestroyJavaVM)(JavaVM *vm); ++ jint (JNICALL *DestroyJavaVM)(JavaVM *vm); + +- jint (*AttachCurrentThread) ++ jint (JNICALL *AttachCurrentThread) + (JavaVM *vm, JNIEnv **penv, void *args); + +- jint (*DetachCurrentThread)(JavaVM *vm); ++ jint (JNICALL *DetachCurrentThread)(JavaVM *vm); + }; + + struct JavaVM_ { +@@ -1790,11 +1794,12 @@ + #endif + }; + +-void JNICALL JNI_GetDefaultJavaVMInitArgs(void *); ++JNI_PUBLIC_API(void) JNI_GetDefaultJavaVMInitArgs(void *); + +-jint JNICALL JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *); ++JNI_PUBLIC_API(jint) JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *); + +-jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); ++JNI_PUBLIC_API(jint) JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); ++JNI_PUBLIC_API(jref) JNI_MakeLocalRef(JNIEnv *pJNIEnv, void *pHObject); + + #ifdef __cplusplus + } /* extern "C" */ +diff -urN kdebase-3.5.2/nsplugins/sdk/jni_md.h new/nsplugins/sdk/jni_md.h +--- kdebase-3.5.2/nsplugins/sdk/jni_md.h 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/sdk/jni_md.h 2008-01-29 22:53:08.000000000 +0000 +@@ -1,41 +1,182 @@ +-/* +- * @(#)jni_md.h 1.3 97/01/10 ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * +- * Copyright (c) 1993-1996 Sun Microsystems, Inc. All Rights Reserved. ++ * The contents of this file are subject to the Netscape Public ++ * License Version 1.1 (the "License"); you may not use this file ++ * except in compliance with the License. You may obtain a copy of ++ * the License at http://www.mozilla.org/NPL/ + * +- * Permission to use, copy, modify, and distribute this software +- * and its documentation for NON-COMMERCIAL purposes and without +- * fee is hereby granted provided that this copyright notice +- * appears in all copies. +- * +- * The Java source code is the confidential and proprietary information +- * of Sun Microsystems, Inc. ("Confidential Information"). You shall +- * not disclose such Confidential Information and shall use it only in +- * accordance with the terms of the license agreement you entered into +- * with Sun. +- * +- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF +- * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +- * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +- * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR +- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR +- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. ++ * Software distributed under the License is distributed on an "AS ++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or ++ * implied. See the License for the specific language governing ++ * rights and limitations under the License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is Netscape ++ * Communications Corporation. Portions created by Netscape are ++ * Copyright (C) 1998 Netscape Communications Corporation. All ++ * Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * ++ * This Original Code has been modified by IBM Corporation. ++ * Modifications made by IBM described herein are ++ * Copyright (c) International Business Machines ++ * Corporation, 2000 ++ * ++ * Modifications to Mozilla code or documentation ++ * identified per MPL Section 3.3 ++ * ++ * Date Modified by Description of modification ++ * 03/27/2000 IBM Corp. Set JNICALL to Optlink for ++ * use in OS2 + */ + ++/******************************************************************************* ++ * Netscape version of jni_md.h -- depends on jri_md.h ++ ******************************************************************************/ ++ + #ifndef JNI_MD_H + #define JNI_MD_H + +-#include "jri_md.h" ++#include "prtypes.h" /* needed for _declspec */ + +-#define JNICALL JRI_CALLBACK ++/******************************************************************************* ++ * WHAT'S UP WITH THIS FILE? ++ * ++ * This is where we define the mystical JNI_PUBLIC_API macro that works on all ++ * platforms. If you're running with Visual C++, Symantec C, or Borland's ++ * development environment on the PC, you're all set. Or if you're on the Mac ++ * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't ++ * matter. ++ ++ * Changes by sailesh on 9/26 ++ ++ * There are two symbols used in the declaration of the JNI functions ++ * and native code that uses the JNI: ++ * JNICALL - specifies the calling convention ++ * JNIEXPORT - specifies export status of the function ++ * ++ * The syntax to specify calling conventions is different in Win16 and ++ * Win32 - the brains at Micro$oft at work here. JavaSoft in their ++ * infinite wisdom cares for no platform other than Win32, and so they ++ * just define these two symbols as: ++ ++ #define JNIEXPORT __declspec(dllexport) ++ #define JNICALL __stdcall ++ ++ * We deal with this, in the way JRI defines the JRI_PUBLIC_API, by ++ * defining a macro called JNI_PUBLIC_API. Any of our developers who ++ * wish to use code for Win16 and Win32, _must_ use JNI_PUBLIC_API to ++ * be able to export functions properly. ++ ++ * Since we must also maintain compatibility with JavaSoft, we ++ * continue to define the symbol JNIEXPORT. However, use of this ++ * internally is deprecated, since it will cause a mess on Win16. ++ ++ * We _do not_ need a new symbol called JNICALL. Instead we ++ * redefine JNICALL in the same way JRI_CALLBACK was defined. ++ ++ ******************************************************************************/ ++ ++/* DLL Entry modifiers... */ ++#if defined(XP_OS2) ++# ifdef XP_OS2_VACPP ++# define JNI_PUBLIC_API(ResultType) ResultType _System ++# define JNI_PUBLIC_VAR(VarType) VarType ++# define JNICALL _Optlink ++# define JNIEXPORT ++# else ++# define JNI_PUBLIC_API(ResultType) ResultType ++# define JNI_PUBLIC_VAR(VarType) VarType ++# define JNICALL ++# define JNIEXPORT ++# endif ++/* Win32 */ ++#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) ++# include ++# if defined(_MSC_VER) || defined(__GNUC__) ++# if defined(WIN32) || defined(_WIN32) ++# define JNI_PUBLIC_API(ResultType) _declspec(dllexport) ResultType __stdcall ++# define JNI_PUBLIC_VAR(VarType) VarType ++# define JNI_NATIVE_STUB(ResultType) _declspec(dllexport) ResultType ++# define JNICALL __stdcall ++# else /* !_WIN32 */ ++# if defined(_WINDLL) ++# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds ++# define JNI_PUBLIC_VAR(VarType) VarType ++# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds ++# define JNICALL __loadds ++# else /* !WINDLL */ ++# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export ++# define JNI_PUBLIC_VAR(VarType) VarType ++# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __export ++# define JNICALL __export ++# endif /* !WINDLL */ ++# endif /* !_WIN32 */ ++# elif defined(__BORLANDC__) ++# if defined(WIN32) || defined(_WIN32) ++# define JNI_PUBLIC_API(ResultType) __export ResultType ++# define JNI_PUBLIC_VAR(VarType) VarType ++# define JNI_NATIVE_STUB(ResultType) __export ResultType ++# define JNICALL ++# else /* !_WIN32 */ ++# define JNI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds ++# define JNI_PUBLIC_VAR(VarType) VarType ++# define JNI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds ++# define JNICALL _loadds ++# endif ++# else ++# error Unsupported PC development environment. ++# endif ++# ifndef IS_LITTLE_ENDIAN ++# define IS_LITTLE_ENDIAN ++# endif ++ /* This is the stuff inherited from JavaSoft .. */ ++# define JNIEXPORT __declspec(dllexport) ++ ++ ++/* Mac */ ++#elif defined(macintosh) || defined(Macintosh) || defined(THINK_C) ++# if defined(__MWERKS__) /* Metrowerks */ ++# if !__option(enumsalwaysint) ++# error You need to define 'Enums Always Int' for your project. ++# endif ++# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM ++# if !__option(fourbyteints) ++# error You need to define 'Struct Alignment: 68k' for your project. ++# endif ++# endif /* !GENERATINGCFM */ ++# define JNI_PUBLIC_API(ResultType) __declspec(export) ResultType ++# define JNI_PUBLIC_VAR(VarType) JNI_PUBLIC_API(VarType) ++# define JNI_NATIVE_STUB(ResultType) JNI_PUBLIC_API(ResultType) ++# elif defined(__SC__) /* Symantec */ ++# error What are the Symantec defines? (warren@netscape.com) ++# elif macintosh && applec /* MPW */ ++# error Please upgrade to the latest MPW compiler (SC). ++# else ++# error Unsupported Mac development environment. ++# endif ++# define JNICALL ++ /* This is the stuff inherited from JavaSoft .. */ ++# define JNIEXPORT + +-/* XXX don't use this -- it doesn't work for Win16 */ +-#ifdef XP_WIN +-#define JNIEXPORT __declspec(dllexport) ++/* Unix or else */ + #else +-#define JNIEXPORT ++# define JNI_PUBLIC_API(ResultType) ResultType ++# define JNI_PUBLIC_VAR(VarType) VarType ++# define JNI_NATIVE_STUB(ResultType) ResultType ++# define JNICALL ++ /* This is the stuff inherited from JavaSoft .. */ ++# define JNIEXPORT + #endif + ++#ifndef FAR /* for non-Win16 */ ++#define FAR ++#endif + ++/* Get the rest of the stuff from jri_md.h */ ++#include "jri_md.h" + + #endif /* JNI_MD_H */ +diff -urN kdebase-3.5.2/nsplugins/sdk/jri.h new/nsplugins/sdk/jri.h +--- kdebase-3.5.2/nsplugins/sdk/jri.h 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/sdk/jri.h 2008-01-29 22:53:08.000000000 +0000 +@@ -1,7 +1,42 @@ +-/* -*- Mode: C; tab-width: 4; -*- */ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: NPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Netscape Public License ++ * Version 1.1 (the "License"); you may not use this file except in ++ * compliance with the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/NPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the NPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the NPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ + /******************************************************************************* + * Java Runtime Interface +- * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. + ******************************************************************************/ + + #ifndef JRI_H +diff -urN kdebase-3.5.2/nsplugins/sdk/jri_md.h new/nsplugins/sdk/jri_md.h +--- kdebase-3.5.2/nsplugins/sdk/jri_md.h 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/sdk/jri_md.h 2008-01-29 22:53:08.000000000 +0000 +@@ -1,13 +1,49 @@ +-/* -*- Mode: C; tab-width: 4; -*- */ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: NPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Netscape Public License ++ * Version 1.1 (the "License"); you may not use this file except in ++ * compliance with the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/NPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the NPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the NPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ + /******************************************************************************* + * Java Runtime Interface - Machine Dependent Types +- * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. + ******************************************************************************/ + + #ifndef JRI_MD_H + #define JRI_MD_H + + #include ++#include "prtypes.h" /* Needed for HAS_LONG_LONG ifdefs & _declspec */ + + #ifdef __cplusplus + extern "C" { +@@ -33,23 +69,39 @@ + /* DLL Entry modifiers... */ + + /* PC */ +-#if defined(XP_PC) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) ++#if defined(XP_OS2) ++# ifdef XP_OS2_VACPP ++# define JRI_PUBLIC_API(ResultType) ResultType _Optlink ++# define JRI_PUBLIC_VAR(VarType) VarType ++# define JRI_CALLBACK ++# else ++# define JRI_PUBLIC_API(ResultType) ResultType ++# define JRI_PUBLIC_VAR(VarType) VarType ++# define JRI_CALLBACK ++# endif ++#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) + # include +-# if defined(_MSC_VER) ++# if defined(_MSC_VER) || defined(__GNUC__) + # if defined(WIN32) || defined(_WIN32) + # define JRI_PUBLIC_API(ResultType) _declspec(dllexport) ResultType + # define JRI_PUBLIC_VAR(VarType) VarType ++# define JRI_PUBLIC_VAR_EXP(VarType) _declspec(dllexport) VarType ++# define JRI_PUBLIC_VAR_IMP(VarType) _declspec(dllimport) VarType + # define JRI_NATIVE_STUB(ResultType) _declspec(dllexport) ResultType + # define JRI_CALLBACK + # else /* !_WIN32 */ + # if defined(_WINDLL) + # define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds + # define JRI_PUBLIC_VAR(VarType) VarType ++# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) ++# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) + # define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds + # define JRI_CALLBACK __loadds + # else /* !WINDLL */ + # define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export + # define JRI_PUBLIC_VAR(VarType) VarType ++# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) ++# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) + # define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __export + # define JRI_CALLBACK __export + # endif /* !WINDLL */ +@@ -58,11 +110,15 @@ + # if defined(WIN32) || defined(_WIN32) + # define JRI_PUBLIC_API(ResultType) __export ResultType + # define JRI_PUBLIC_VAR(VarType) VarType ++# define JRI_PUBLIC_VAR_EXP(VarType) __export VarType ++# define JRI_PUBLIC_VAR_IMP(VarType) __import VarType + # define JRI_NATIVE_STUB(ResultType) __export ResultType + # define JRI_CALLBACK + # else /* !_WIN32 */ + # define JRI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds + # define JRI_PUBLIC_VAR(VarType) VarType ++# define JRI_PUBLIC_VAR_EXP(VarType) __cdecl __export VarType ++# define JRI_PUBLIC_VAR_IMP(VarType) __cdecl __import VarType + # define JRI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds + # define JRI_CALLBACK _loadds + # endif +@@ -74,18 +130,20 @@ + # endif + + /* Mac */ +-#elif defined(macintosh) || defined(Macintosh) || defined(THINK_C) ++#elif defined (macintosh) || defined(Macintosh) || defined(THINK_C) + # if defined(__MWERKS__) /* Metrowerks */ + # if !__option(enumsalwaysint) + # error You need to define 'Enums Always Int' for your project. + # endif +-# if defined(GENERATING68K) && !GENERATINGCFM ++# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM + # if !__option(fourbyteints) + # error You need to define 'Struct Alignment: 68k' for your project. + # endif + # endif /* !GENERATINGCFM */ + # define JRI_PUBLIC_API(ResultType) __declspec(export) ResultType + # define JRI_PUBLIC_VAR(VarType) JRI_PUBLIC_API(VarType) ++# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_API(VarType) ++# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_API(VarType) + # define JRI_NATIVE_STUB(ResultType) JRI_PUBLIC_API(ResultType) + # elif defined(__SC__) /* Symantec */ + # error What are the Symantec defines? (warren@netscape.com) +@@ -100,7 +158,9 @@ + #else + # define JRI_PUBLIC_API(ResultType) ResultType + # define JRI_PUBLIC_VAR(VarType) VarType +-# define JRI_NATIVE_STUB(ResultType) ResultType ++# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) ++# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) ++# define JRI_NATIVE_STUB(ResultType) ResultType + # define JRI_CALLBACK + #endif + +@@ -120,8 +180,15 @@ + typedef juint jsize; + #endif + ++/* moved from jni.h -- Sun's new jni.h doesn't have this anymore */ ++#ifdef __cplusplus ++typedef class _jobject *jref; ++#else ++typedef struct _jobject *jref; ++#endif ++ + typedef unsigned char jbool; +-typedef char jbyte; ++typedef signed char jbyte; + #ifdef IS_64 /* XXX ok for alpha, but not right on all 64-bit architectures */ + typedef unsigned int juint; + typedef int jint; +@@ -142,21 +209,30 @@ + + #ifdef HAVE_LONG_LONG + +-#if !(defined(WIN32) || defined(_WIN32)) +-typedef long long jlong; +-typedef unsigned long long julong; +- +-#define jlong_MAXINT 0x7fffffffffffffffLL +-#define jlong_MININT 0x8000000000000000LL +-#define jlong_ZERO 0x0LL ++#ifdef OSF1 ++ ++/* long is default 64-bit on OSF1, -std1 does not allow long long */ ++typedef long jlong; ++typedef unsigned long julong; ++#define jlong_MAXINT 0x7fffffffffffffffL ++#define jlong_MININT 0x8000000000000000L ++#define jlong_ZERO 0x0L ++ ++#elif (defined(WIN32) || defined(_WIN32)) ++ ++typedef LONGLONG jlong; ++typedef DWORDLONG julong; ++#define jlong_MAXINT 0x7fffffffffffffffi64 ++#define jlong_MININT 0x8000000000000000i64 ++#define jlong_ZERO 0x0i64 + + #else +-typedef LONGLONG jlong; +-typedef DWORDLONG julong; + +-#define jlong_MAXINT 0x7fffffffffffffffi64 +-#define jlong_MININT 0x8000000000000000i64 +-#define jlong_ZERO 0x0i64 ++typedef long long jlong; ++typedef unsigned long long julong; ++#define jlong_MAXINT 0x7fffffffffffffffLL ++#define jlong_MININT 0x8000000000000000LL ++#define jlong_ZERO 0x0LL + + #endif + +diff -urN kdebase-3.5.2/nsplugins/sdk/jritypes.h new/nsplugins/sdk/jritypes.h +--- kdebase-3.5.2/nsplugins/sdk/jritypes.h 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/sdk/jritypes.h 2008-01-29 22:53:08.000000000 +0000 +@@ -1,12 +1,48 @@ +-/* -*- Mode: C; tab-width: 4; -*- */ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: NPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Netscape Public License ++ * Version 1.1 (the "License"); you may not use this file except in ++ * compliance with the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/NPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the NPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the NPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ + /******************************************************************************* + * Java Runtime Interface +- * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. + ******************************************************************************/ + + #ifndef JRITYPES_H + #define JRITYPES_H + ++#include "jri_md.h" + #include "jni.h" + #include + #include +diff -urN kdebase-3.5.2/nsplugins/sdk/npapi.h new/nsplugins/sdk/npapi.h +--- kdebase-3.5.2/nsplugins/sdk/npapi.h 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/sdk/npapi.h 2008-01-29 22:53:08.000000000 +0000 +@@ -1,78 +1,215 @@ +-/* -*- Mode: C; tab-width: 4; -*- */ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: NPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Netscape Public License ++ * Version 1.1 (the "License"); you may not use this file except in ++ * compliance with the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/NPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the NPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the NPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++ + /* +- * npapi.h $Revision: 67527 $ ++ * npapi.h $Revision: 750897 $ + * Netscape client plug-in API spec + */ + + #ifndef _NPAPI_H_ + #define _NPAPI_H_ + ++#ifdef __OS2__ ++#pragma pack(1) ++#endif ++ ++#include "prtypes.h" ++/* Copied from xp_core.h */ ++/* removed #ifdef for hpux defined in /usr/include/model.h */ ++#ifndef XP_MAC ++#ifndef _INT16 ++#define _INT16 ++#endif ++#ifndef _INT32 ++#define _INT32 ++#endif ++#ifndef _UINT16 ++#define _UINT16 ++#endif ++#ifndef _UINT32 ++#define _UINT32 ++#endif ++#endif ++ ++/* ++ * NO_NSPR_10_SUPPORT disables the inclusion ++ * of obsolete/protypes.h, whose int16, uint16, ++ * int32, and uint32 typedefs conflict with those ++ * in this file. ++ */ ++#ifndef NO_NSPR_10_SUPPORT ++#define NO_NSPR_10_SUPPORT ++#endif ++#ifdef OJI + #include "jri.h" /* Java Runtime Interface */ ++#endif ++#include ++ ++#if defined (__OS2__ ) || defined (OS2) ++# ifndef XP_OS2 ++# define XP_OS2 1 ++# endif /* XP_OS2 */ ++#endif /* __OS2__ */ + + #ifdef _WINDOWS +-# ifndef XP_WIN +-# define XP_WIN 1 +-# endif /* XP_WIN */ ++# include ++# ifndef XP_WIN ++# define XP_WIN 1 ++# endif /* XP_WIN */ + #endif /* _WINDOWS */ + + #ifdef __MWERKS__ +-# define _declspec __declspec +-# ifdef macintosh +-# ifndef XP_MAC +-# define XP_MAC 1 +-# endif /* XP_MAC */ +-# endif /* macintosh */ +-# ifdef __INTEL__ +-# undef NULL +-# ifndef XP_WIN +-# define XP_WIN 1 +-# endif /* __INTEL__ */ +-# endif /* XP_PC */ ++# define _declspec __declspec ++# ifdef macintosh ++# ifndef XP_MAC ++# define XP_MAC 1 ++# endif /* XP_MAC */ ++# endif /* macintosh */ ++# ifdef __INTEL__ ++# undef NULL ++# ifndef XP_WIN ++# define XP_WIN 1 ++# endif /* XP_WIN */ ++# endif /* __INTEL__ */ + #endif /* __MWERKS__ */ + +-#ifdef XP_MAC +- #include +- #include ++#if defined(XP_MAC) || defined(XP_MACOSX) ++ #include ++ #include + #endif +- +-#ifdef XP_UNIX +- #include +- #include +-#endif + ++#if defined(XP_UNIX) ++# include ++# if defined(MOZ_X11) ++# include ++# include ++# endif ++#endif + + /*----------------------------------------------------------------------*/ +-/* Plugin Version Constants */ ++/* Plugin Version Constants */ + /*----------------------------------------------------------------------*/ + + #define NP_VERSION_MAJOR 0 +-#define NP_VERSION_MINOR 11 ++#define NP_VERSION_MINOR 13 ++ ++ ++/* The OS/2 version of Netscape uses RC_DATA to define the ++ mime types, file extensions, etc that are required. ++ Use a vertical bar to separate types, end types with \0. ++ FileVersion and ProductVersion are 32bit ints, all other ++ entries are strings the MUST be terminated wwith a \0. ++ ++AN EXAMPLE: ++ ++RCDATA NP_INFO_ProductVersion { 1,0,0,1,} ++ ++RCDATA NP_INFO_MIMEType { "video/x-video|", ++ "video/x-flick\0" } ++RCDATA NP_INFO_FileExtents { "avi|", ++ "flc\0" } ++RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", ++ "MMOS2 Flc/Fli player(*.flc)\0" } ++ ++RCDATA NP_INFO_FileVersion { 1,0,0,1 } ++RCDATA NP_INFO_CompanyName { "Netscape Communications\0" } ++RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0" ++RCDATA NP_INFO_InternalName { "NPAVI32\0" ) ++RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" ++RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" } ++RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } ++ ++*/ ++ ++ ++/* RC_DATA types for version info - required */ ++#define NP_INFO_ProductVersion 1 ++#define NP_INFO_MIMEType 2 ++#define NP_INFO_FileOpenName 3 ++#define NP_INFO_FileExtents 4 ++ ++/* RC_DATA types for version info - used if found */ ++#define NP_INFO_FileDescription 5 ++#define NP_INFO_ProductName 6 ++ ++/* RC_DATA types for version info - optional */ ++#define NP_INFO_CompanyName 7 ++#define NP_INFO_FileVersion 8 ++#define NP_INFO_InternalName 9 ++#define NP_INFO_LegalCopyright 10 ++#define NP_INFO_OriginalFilename 11 ++ ++#ifndef RC_INVOKED + + + + /*----------------------------------------------------------------------*/ +-/* Definition of Basic Types */ ++/* Definition of Basic Types */ + /*----------------------------------------------------------------------*/ + + #ifndef _UINT16 + typedef unsigned short uint16; + #endif ++ + #ifndef _UINT32 +-#if defined(__alpha) ++# if defined(__alpha) || defined(_AIX) || defined(__x86_64__) || defined(__LP64__) || defined(__amd64__) + typedef unsigned int uint32; +-#else /* __alpha */ +-typedef unsigned long uint32; +-#endif /* __alpha */ ++# else ++typedef u_int32_t uint32; ++# endif + #endif ++ ++/* ++ * AIX defines these in sys/inttypes.h included from sys/types.h ++ */ ++#ifndef AIX + #ifndef _INT16 +-typedef short int16; ++typedef int16_t int16; + #endif ++ + #ifndef _INT32 +-#if defined(__alpha) || defined(_AIX) ++# if defined(__alpha) || defined(_AIX) || defined(__x86_64__) || defined(__LP64__) || defined(__amd64__) + typedef int int32; +-#else /* __alpha || _AIX */ +-typedef long int32; +-#endif /* __alpha || _AIX */ ++# else ++typedef int32_t int32; ++# endif ++#endif + #endif + + #ifndef FALSE +@@ -85,15 +222,15 @@ + #define NULL (0L) + #endif + +-typedef unsigned char NPBool; +-typedef int16 NPError; +-typedef int16 NPReason; +-typedef char* NPMIMEType; ++typedef unsigned char NPBool; ++typedef int16 NPError; ++typedef int16 NPReason; ++typedef char* NPMIMEType; + + + + /*----------------------------------------------------------------------*/ +-/* Structures and definitions */ ++/* Structures and definitions */ + /*----------------------------------------------------------------------*/ + + #ifdef XP_MAC +@@ -105,8 +242,8 @@ + */ + typedef struct _NPP + { +- void* pdata; /* plug-in private data */ +- void* ndata; /* netscape private data */ ++ void* pdata; /* plug-in private data */ ++ void* ndata; /* netscape private data */ + } NPP_t; + + typedef NPP_t* NPP; +@@ -114,38 +251,43 @@ + + typedef struct _NPStream + { +- void* pdata; /* plug-in private data */ +- void* ndata; /* netscape private data */ +- const char* url; +- uint32 end; +- uint32 lastmodified; +- void* notifyData; ++ void* pdata; /* plug-in private data */ ++ void* ndata; /* netscape private data */ ++ const char* url; ++ uint32 end; ++ uint32 lastmodified; ++ void* notifyData; + } NPStream; + + + typedef struct _NPByteRange + { +- int32 offset; /* negative offset means from the end */ +- uint32 length; +- struct _NPByteRange* next; ++ int32 offset; /* negative offset means from the end */ ++ uint32 length; ++ struct _NPByteRange* next; + } NPByteRange; + + + typedef struct _NPSavedData + { +- int32 len; +- void* buf; ++ int32 len; ++ void* buf; + } NPSavedData; + + + typedef struct _NPRect + { +- uint16 top; +- uint16 left; +- uint16 bottom; +- uint16 right; ++ uint16 top; ++ uint16 left; ++ uint16 bottom; ++ uint16 right; + } NPRect; + ++typedef struct _NPSize ++{ ++ int32 width; ++ int32 height; ++} NPSize; + + #ifdef XP_UNIX + /* +@@ -164,26 +306,71 @@ + + typedef struct + { +- int32 type; ++ int32 type; + } NPAnyCallbackStruct; + + typedef struct + { +- int32 type; +- Display* display; +- Visual* visual; +- Colormap colormap; +- unsigned int depth; ++ int32 type; ++#ifdef MOZ_X11 ++ Display* display; ++ Visual* visual; ++ Colormap colormap; ++ unsigned int depth; ++#endif + } NPSetWindowCallbackStruct; + + typedef struct + { +- int32 type; +- FILE* fp; ++ int32 type; ++ FILE* fp; + } NPPrintCallbackStruct; + + #endif /* XP_UNIX */ + ++ ++/* ++ * The following masks are applied on certain platforms to NPNV and ++ * NPPV selectors that pass around pointers to COM interfaces. Newer ++ * compilers on some platforms may generate vtables that are not ++ * compatible with older compilers. To prevent older plugins from ++ * not understanding a new browser's ABI, these masks change the ++ * values of those selectors on those platforms. To remain backwards ++ * compatible with differenet versions of the browser, plugins can ++ * use these masks to dynamically determine and use the correct C++ ++ * ABI that the browser is expecting. This does not apply to Windows ++ * as Microsoft's COM ABI will likely not change. ++ */ ++ ++#define NP_ABI_GCC3_MASK 0x10000000 ++/* ++ * gcc 3.x generated vtables on UNIX and OSX are incompatible with ++ * previous compilers. ++ */ ++#if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) ++#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK ++#else ++#define _NP_ABI_MIXIN_FOR_GCC3 0 ++#endif ++ ++ ++#define NP_ABI_MACHO_MASK 0x01000000 ++/* ++ * On OSX, the Mach-O executable format is significantly ++ * different than CFM. In addition to having a different ++ * C++ ABI, it also has has different C calling convention. ++ * You must use glue code when calling between CFM and ++ * Mach-O C functions. ++ */ ++#if (defined(TARGET_RT_MAC_MACHO)) ++#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK ++#else ++#define _NP_ABI_MIXIN_FOR_MACHO 0 ++#endif ++ ++ ++#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) ++ + /* + * List of variable names for which NPP_GetValue shall be implemented + */ +@@ -191,7 +378,18 @@ + NPPVpluginNameString = 1, + NPPVpluginDescriptionString, + NPPVpluginWindowBool, +- NPPVpluginTransparentBool ++ NPPVpluginTransparentBool, ++ NPPVjavaClass, /* Not implemented in Mozilla 1.0 */ ++ NPPVpluginWindowSize, ++ NPPVpluginTimerInterval, ++ ++ NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), ++ NPPVpluginScriptableIID = 11, ++ ++ /* 12 and over are available on Mozilla builds starting with 0.9.9 */ ++ NPPVjavascriptPushCallerBool = 12, ++ NPPVpluginKeepLibraryInMemory = 13, /* available in Mozilla 1.0 */ ++ NPPVpluginNeedsXEmbed = 14 + } NPPVariable; + + /* +@@ -200,124 +398,157 @@ + typedef enum { + NPNVxDisplay = 1, + NPNVxtAppContext, +- NPNVnetscapeWindow, ++ NPNVnetscapeWindow, + NPNVjavascriptEnabledBool, + NPNVasdEnabledBool, +- NPNVisOfflineBool ++ NPNVisOfflineBool, ++ ++ /* 10 and over are available on Mozilla builds starting with 0.9.4 */ ++ NPNVserviceManager = (10 | NP_ABI_MASK), ++ NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */ ++ NPNVDOMWindow = (12 | NP_ABI_MASK), ++ NPNVToolkit = (13 | NP_ABI_MASK), ++ NPNVSupportsXEmbedBool = 14 + } NPNVariable; + + /* ++ * The type of Tookkit the widgets use ++ */ ++typedef enum { ++ NPNVGtk12 = 1, ++ NPNVGtk2 ++} NPNToolkitType; ++ ++/* + * The type of a NPWindow - it specifies the type of the data structure + * returned in the window field. + */ + typedef enum { +- NPWindowTypeWindow = 1, +- NPWindowTypeDrawable ++ NPWindowTypeWindow = 1, ++ NPWindowTypeDrawable + } NPWindowType; + + typedef struct _NPWindow + { +- void* window; /* Platform specific window handle */ +- int32 x; /* Position of top left corner relative */ +- int32 y; /* to a netscape page. */ +- uint32 width; /* Maximum window size */ +- uint32 height; +- NPRect clipRect; /* Clipping rectangle in port coordinates */ +- /* Used by MAC only. */ +-#ifdef XP_UNIX +- void * ws_info; /* Platform-dependent additonal data */ ++ void* window; /* Platform specific window handle */ ++ /* OS/2: x - Position of bottom left corner */ ++ /* OS/2: y - relative to visible netscape window */ ++ int32 x; /* Position of top left corner relative */ ++ int32 y; /* to a netscape page. */ ++ uint32 width; /* Maximum window size */ ++ uint32 height; ++ NPRect clipRect; /* Clipping rectangle in port coordinates */ ++ /* Used by MAC only. */ ++#if defined(XP_UNIX) && !defined(XP_MACOSX) ++ void * ws_info; /* Platform-dependent additional data */ + #endif /* XP_UNIX */ +- NPWindowType type; /* Is this a window or a drawable? */ ++ NPWindowType type; /* Is this a window or a drawable? */ + } NPWindow; + + + typedef struct _NPFullPrint + { +- NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */ +- /* printing */ +- NPBool printOne; /* TRUE if plugin should print one copy */ +- /* to default printer */ +- void* platformPrint; /* Platform-specific printing info */ ++ NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ ++ NPBool printOne; /* TRUE if plugin should print one copy to default printer */ ++ void* platformPrint; /* Platform-specific printing info */ + } NPFullPrint; + + typedef struct _NPEmbedPrint + { +- NPWindow window; +- void* platformPrint; /* Platform-specific printing info */ ++ NPWindow window; ++ void* platformPrint; /* Platform-specific printing info */ + } NPEmbedPrint; + + typedef struct _NPPrint + { +- uint16 mode; /* NP_FULL or NP_EMBED */ +- union +- { +- NPFullPrint fullPrint; /* if mode is NP_FULL */ +- NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ +- } print; ++ uint16 mode; /* NP_FULL or NP_EMBED */ ++ union ++ { ++ NPFullPrint fullPrint; /* if mode is NP_FULL */ ++ NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ ++ } print; + } NPPrint; + +-#ifdef XP_MAC +-typedef EventRecord NPEvent; ++#if defined(XP_MAC) || defined(XP_MACOSX) ++typedef EventRecord NPEvent; + #elif defined(XP_WIN) + typedef struct _NPEvent + { +- uint16 event; +- uint32 wParam; +- uint32 lParam; ++ uint16 event; ++ uint32 wParam; ++ uint32 lParam; ++} NPEvent; ++#elif defined(XP_OS2) ++typedef struct _NPEvent ++{ ++ uint32 event; ++ uint32 wParam; ++ uint32 lParam; + } NPEvent; +-#elif defined (XP_UNIX) ++#elif defined (XP_UNIX) && defined(MOZ_X11) + typedef XEvent NPEvent; + #else +-typedef void* NPEvent; ++typedef void* NPEvent; + #endif /* XP_MAC */ + +-#ifdef XP_MAC ++#if defined(XP_MAC) || defined(XP_MACOSX) + typedef RgnHandle NPRegion; + #elif defined(XP_WIN) + typedef HRGN NPRegion; +-#elif defined(XP_UNIX) ++#elif defined(XP_UNIX) && defined(MOZ_X11) + typedef Region NPRegion; + #else + typedef void *NPRegion; + #endif /* XP_MAC */ + +-#ifdef XP_MAC ++#if defined(XP_MAC) || defined(XP_MACOSX) + /* + * Mac-specific structures and definitions. + */ + + typedef struct NP_Port + { +- CGrafPtr port; /* Grafport */ +- int32 portx; /* position inside the topmost window */ +- int32 porty; ++ CGrafPtr port; /* Grafport */ ++ int32 portx; /* position inside the topmost window */ ++ int32 porty; + } NP_Port; + + /* + * Non-standard event types that can be passed to HandleEvent + */ +-#define getFocusEvent (osEvt + 16) +-#define loseFocusEvent (osEvt + 17) +-#define adjustCursorEvent (osEvt + 18) + +-#endif /* XP_MAC */ ++enum NPEventType { ++ NPEventType_GetFocusEvent = (osEvt + 16), ++ NPEventType_LoseFocusEvent, ++ NPEventType_AdjustCursorEvent, ++ NPEventType_MenuCommandEvent, ++ NPEventType_ClippingChangedEvent, ++ NPEventType_ScrollingBeginsEvent = 1000, ++ NPEventType_ScrollingEndsEvent ++}; + ++#ifdef OBSOLETE ++#define getFocusEvent (osEvt + 16) ++#define loseFocusEvent (osEvt + 17) ++#define adjustCursorEvent (osEvt + 18) ++#endif ++#endif /* XP_MAC */ + + /* + * Values for mode passed to NPP_New: + */ +-#define NP_EMBED 1 +-#define NP_FULL 2 ++#define NP_EMBED 1 ++#define NP_FULL 2 + + /* + * Values for stream type passed to NPP_NewStream: + */ +-#define NP_NORMAL 1 +-#define NP_SEEK 2 +-#define NP_ASFILE 3 +-#define NP_ASFILEONLY 4 ++#define NP_NORMAL 1 ++#define NP_SEEK 2 ++#define NP_ASFILE 3 ++#define NP_ASFILEONLY 4 + +-#define NP_MAXREADY (((unsigned)(~0)<<1)>>1) ++#define NP_MAXREADY (((unsigned)(~0)<<1)>>1) + + #ifdef XP_MAC + #pragma options align=reset +@@ -325,38 +556,38 @@ + + + /*----------------------------------------------------------------------*/ +-/* Error and Reason Code definitions */ ++/* Error and Reason Code definitions */ + /*----------------------------------------------------------------------*/ + + /* +- * Values of type NPError: ++ * Values of type NPError: + */ +-#define NPERR_BASE 0 +-#define NPERR_NO_ERROR (NPERR_BASE + 0) +-#define NPERR_GENERIC_ERROR (NPERR_BASE + 1) +-#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) +-#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) ++#define NPERR_BASE 0 ++#define NPERR_NO_ERROR (NPERR_BASE + 0) ++#define NPERR_GENERIC_ERROR (NPERR_BASE + 1) ++#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) ++#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) + #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) +-#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) +-#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) ++#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) ++#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) + #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) + #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) +-#define NPERR_INVALID_PARAM (NPERR_BASE + 9) +-#define NPERR_INVALID_URL (NPERR_BASE + 10) +-#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) +-#define NPERR_NO_DATA (NPERR_BASE + 12) +-#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) ++#define NPERR_INVALID_PARAM (NPERR_BASE + 9) ++#define NPERR_INVALID_URL (NPERR_BASE + 10) ++#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) ++#define NPERR_NO_DATA (NPERR_BASE + 12) ++#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) + + /* +- * Values of type NPReason: ++ * Values of type NPReason: + */ +-#define NPRES_BASE 0 +-#define NPRES_DONE (NPRES_BASE + 0) +-#define NPRES_NETWORK_ERR (NPRES_BASE + 1) +-#define NPRES_USER_BREAK (NPRES_BASE + 2) ++#define NPRES_BASE 0 ++#define NPRES_DONE (NPRES_BASE + 0) ++#define NPRES_NETWORK_ERR (NPRES_BASE + 1) ++#define NPRES_USER_BREAK (NPRES_BASE + 2) + + /* +- * Don't use these obsolete error codes any more. ++ * Don't use these obsolete error codes any more. + */ + #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR + #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR +@@ -365,23 +596,27 @@ + /* + * Version feature information + */ +-#define NPVERS_HAS_STREAMOUTPUT 8 +-#define NPVERS_HAS_NOTIFICATION 9 +-#define NPVERS_HAS_LIVECONNECT 9 +-#define NPVERS_WIN16_HAS_LIVECONNECT 9 +-#define NPVERS_68K_HAS_LIVECONNECT 11 +-#define NPVERS_HAS_WINDOWLESS 11 +- ++#define NPVERS_HAS_STREAMOUTPUT 8 ++#define NPVERS_HAS_NOTIFICATION 9 ++#define NPVERS_HAS_LIVECONNECT 9 ++#define NPVERS_WIN16_HAS_LIVECONNECT 9 ++#define NPVERS_68K_HAS_LIVECONNECT 11 ++#define NPVERS_HAS_WINDOWLESS 11 ++#define NPVERS_HAS_XPCONNECT_SCRIPTING 13 + + /*----------------------------------------------------------------------*/ +-/* Function Prototypes */ ++/* Function Prototypes */ + /*----------------------------------------------------------------------*/ + + #if defined(_WINDOWS) && !defined(WIN32) + #define NP_LOADDS _loadds + #else ++#if defined(__OS2__) ++#define NP_LOADDS _System ++#else + #define NP_LOADDS + #endif ++#endif + + #ifdef __cplusplus + extern "C" { +@@ -392,78 +627,80 @@ + */ + + #ifdef XP_UNIX +-char* NPP_GetMIMEDescription(void); ++char* NPP_GetMIMEDescription(void); + #endif /* XP_UNIX */ + +-NPError NPP_Initialize(void); +-void NPP_Shutdown(void); +-NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, +- uint16 mode, int16 argc, char* argn[], +- char* argv[], NPSavedData* saved); +-NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); +-NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); +-NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, +- NPStream* stream, NPBool seekable, +- uint16* stype); +-NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, +- NPReason reason); +-int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); +-int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, +- int32 len, void* buffer); +-void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, +- const char* fname); +-void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); +-int16 NPP_HandleEvent(NPP instance, void* event); +-void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, +- NPReason reason, void* notifyData); +-jref NP_LOADDS NPP_GetJavaClass(void); +-NPError NPP_GetValue(void *instance, NPPVariable variable, +- void *value); +-NPError NPP_SetValue(void *instance, NPNVariable variable, +- void *value); ++NPError NP_LOADDS NPP_Initialize(void); ++void NP_LOADDS NPP_Shutdown(void); ++NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, ++ uint16 mode, int16 argc, char* argn[], ++ char* argv[], NPSavedData* saved); ++NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); ++NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); ++NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, ++ NPStream* stream, NPBool seekable, ++ uint16* stype); ++NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, ++ NPReason reason); ++int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); ++int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, ++ int32 len, void* buffer); ++void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, ++ const char* fname); ++void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); ++int16 NP_LOADDS NPP_HandleEvent(NPP instance, void* event); ++void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, ++ NPReason reason, void* notifyData); ++#ifdef OJI ++jref NP_LOADDS NPP_GetJavaClass(void); ++#endif ++NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); ++NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); + + /* + * NPN_* functions are provided by the navigator and called by the plugin. + */ +- +-void NPN_Version(int* plugin_major, int* plugin_minor, +- int* netscape_major, int* netscape_minor); +-NPError NPN_GetURLNotify(NPP instance, const char* url, +- const char* target, void* notifyData); +-NPError NPN_GetURL(NPP instance, const char* url, +- const char* target); +-NPError NPN_PostURLNotify(NPP instance, const char* url, +- const char* target, uint32 len, +- const char* buf, NPBool file, +- void* notifyData); +-NPError NPN_PostURL(NPP instance, const char* url, +- const char* target, uint32 len, +- const char* buf, NPBool file); +-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); +-NPError NPN_NewStream(NPP instance, NPMIMEType type, +- const char* target, NPStream** stream); +-int32 NPN_Write(NPP instance, NPStream* stream, int32 len, +- void* buffer); +-NPError NPN_DestroyStream(NPP instance, NPStream* stream, +- NPReason reason); +-void NPN_Status(NPP instance, const char* message); +-const char* NPN_UserAgent(NPP instance); +-void* NPN_MemAlloc(uint32 size); +-void NPN_MemFree(void* ptr); +-uint32 NPN_MemFlush(uint32 size); +-void NPN_ReloadPlugins(NPBool reloadPages); +-JRIEnv* NPN_GetJavaEnv(void); +-jref NPN_GetJavaPeer(NPP instance); +-NPError NPN_GetValue(NPP instance, NPNVariable variable, +- void *value); +-NPError NPN_SetValue(NPP instance, NPPVariable variable, +- void *value); +-void NPN_InvalidateRect(NPP instance, NPRect *invalidRect); +-void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); +-void NPN_ForceRedraw(NPP instance); ++void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, ++ int* netscape_major, int* netscape_minor); ++NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, ++ const char* target, void* notifyData); ++NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url, ++ const char* target); ++NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, ++ const char* target, uint32 len, ++ const char* buf, NPBool file, ++ void* notifyData); ++NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url, ++ const char* target, uint32 len, ++ const char* buf, NPBool file); ++NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); ++NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, ++ const char* target, NPStream** stream); ++int32 NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); ++NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason); ++void NP_LOADDS NPN_Status(NPP instance, const char* message); ++const char* NP_LOADDS NPN_UserAgent(NPP instance); ++void* NP_LOADDS NPN_MemAlloc(uint32 size); ++void NP_LOADDS NPN_MemFree(void* ptr); ++uint32 NP_LOADDS NPN_MemFlush(uint32 size); ++void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); ++#ifdef OJI ++JRIEnv* NP_LOADDS NPN_GetJavaEnv(void); ++jref NP_LOADDS NPN_GetJavaPeer(NPP instance); ++#endif ++NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value); ++NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value); ++void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); ++void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); ++void NP_LOADDS NPN_ForceRedraw(NPP instance); + + #ifdef __cplusplus + } /* end extern "C" */ + #endif + ++#endif /* RC_INVOKED */ ++#ifdef __OS2__ ++#pragma pack() ++#endif ++ + #endif /* _NPAPI_H_ */ +diff -urN kdebase-3.5.2/nsplugins/sdk/npapi.h.orig new/nsplugins/sdk/npapi.h.orig +--- kdebase-3.5.2/nsplugins/sdk/npapi.h.orig 1970-01-01 00:00:00.000000000 +0000 ++++ new/nsplugins/sdk/npapi.h.orig 2008-01-29 22:53:08.000000000 +0000 +@@ -0,0 +1,695 @@ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: NPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Netscape Public License ++ * Version 1.1 (the "License"); you may not use this file except in ++ * compliance with the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/NPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the NPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the NPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++ ++/* ++ * npapi.h $Revision: 719539 $ ++ * Netscape client plug-in API spec ++ */ ++ ++#ifndef _NPAPI_H_ ++#define _NPAPI_H_ ++ ++#ifdef __OS2__ ++#pragma pack(1) ++#endif ++ ++#include "prtypes.h" ++/* Copied from xp_core.h */ ++/* removed #ifdef for hpux defined in /usr/include/model.h */ ++#ifndef XP_MAC ++#ifndef _INT16 ++#define _INT16 ++#endif ++#ifndef _INT32 ++#define _INT32 ++#endif ++#ifndef _UINT16 ++#define _UINT16 ++#endif ++#ifndef _UINT32 ++#define _UINT32 ++#endif ++#endif ++ ++/* ++ * NO_NSPR_10_SUPPORT disables the inclusion ++ * of obsolete/protypes.h, whose int16, uint16, ++ * int32, and uint32 typedefs conflict with those ++ * in this file. ++ */ ++#ifndef NO_NSPR_10_SUPPORT ++#define NO_NSPR_10_SUPPORT ++#endif ++#ifdef OJI ++#include "jri.h" /* Java Runtime Interface */ ++#endif ++#include ++ ++#if defined (__OS2__ ) || defined (OS2) ++# ifndef XP_OS2 ++# define XP_OS2 1 ++# endif /* XP_OS2 */ ++#endif /* __OS2__ */ ++ ++#ifdef _WINDOWS ++# include ++# ifndef XP_WIN ++# define XP_WIN 1 ++# endif /* XP_WIN */ ++#endif /* _WINDOWS */ ++ ++#ifdef __MWERKS__ ++# define _declspec __declspec ++# ifdef macintosh ++# ifndef XP_MAC ++# define XP_MAC 1 ++# endif /* XP_MAC */ ++# endif /* macintosh */ ++# ifdef __INTEL__ ++# undef NULL ++# ifndef XP_WIN ++# define XP_WIN 1 ++# endif /* XP_WIN */ ++# endif /* __INTEL__ */ ++#endif /* __MWERKS__ */ ++ ++#if defined(XP_MAC) || defined(XP_MACOSX) ++ #include ++ #include ++#endif ++ ++#if defined(XP_UNIX) ++# include ++# if defined(MOZ_X11) ++# include ++# include ++# endif ++#endif ++ ++/*----------------------------------------------------------------------*/ ++/* Plugin Version Constants */ ++/*----------------------------------------------------------------------*/ ++ ++#define NP_VERSION_MAJOR 0 ++#define NP_VERSION_MINOR 11 ++ ++ ++/* The OS/2 version of Netscape uses RC_DATA to define the ++ mime types, file extentions, etc that are required. ++ Use a vertical bar to separate types, end types with \0. ++ FileVersion and ProductVersion are 32bit ints, all other ++ entries are strings the MUST be terminated wwith a \0. ++ ++AN EXAMPLE: ++ ++RCDATA NP_INFO_ProductVersion { 1,0,0,1,} ++ ++RCDATA NP_INFO_MIMEType { "video/x-video|", ++ "video/x-flick\0" } ++RCDATA NP_INFO_FileExtents { "avi|", ++ "flc\0" } ++RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", ++ "MMOS2 Flc/Fli player(*.flc)\0" } ++ ++RCDATA NP_INFO_FileVersion { 1,0,0,1 } ++RCDATA NP_INFO_CompanyName { "Netscape Communications\0" } ++RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0" ++RCDATA NP_INFO_InternalName { "NPAVI32\0" ) ++RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" ++RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" } ++RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } ++ ++*/ ++ ++ ++/* RC_DATA types for version info - required */ ++#define NP_INFO_ProductVersion 1 ++#define NP_INFO_MIMEType 2 ++#define NP_INFO_FileOpenName 3 ++#define NP_INFO_FileExtents 4 ++ ++/* RC_DATA types for version info - used if found */ ++#define NP_INFO_FileDescription 5 ++#define NP_INFO_ProductName 6 ++ ++/* RC_DATA types for version info - optional */ ++#define NP_INFO_CompanyName 7 ++#define NP_INFO_FileVersion 8 ++#define NP_INFO_InternalName 9 ++#define NP_INFO_LegalCopyright 10 ++#define NP_INFO_OriginalFilename 11 ++ ++#ifndef RC_INVOKED ++ ++ ++ ++/*----------------------------------------------------------------------*/ ++/* Definition of Basic Types */ ++/*----------------------------------------------------------------------*/ ++ ++#ifndef _UINT16 ++typedef unsigned short uint16; ++#endif ++ ++#ifndef _UINT32 ++# if defined(__alpha) || defined(_AIX) || defined(__x86_64__) || defined(__LP64__) || defined(__amd64__) ++typedef unsigned int uint32; ++# else ++typedef u_int32_t uint32; ++# endif ++#endif ++ ++/* ++ * AIX defines these in sys/inttypes.h included from sys/types.h ++ */ ++#ifndef AIX ++#ifndef _INT16 ++typedef int16_t int16; ++#endif ++ ++#ifndef _INT32 ++# if defined(__alpha) || defined(_AIX) || defined(__x86_64__) || defined(__LP64__) || defined(__amd64__) ++typedef int int32; ++# else ++typedef int32_t int32; ++# endif ++#endif ++#endif ++ ++#ifndef FALSE ++#define FALSE (0) ++#endif ++#ifndef TRUE ++#define TRUE (1) ++#endif ++#ifndef NULL ++#define NULL (0L) ++#endif ++ ++typedef unsigned char NPBool; ++typedef int16 NPError; ++typedef int16 NPReason; ++typedef char* NPMIMEType; ++ ++ ++ ++/*----------------------------------------------------------------------*/ ++/* Structures and definitions */ ++/*----------------------------------------------------------------------*/ ++ ++#ifdef XP_MAC ++#pragma options align=mac68k ++#endif ++ ++/* ++ * NPP is a plug-in's opaque instance handle ++ */ ++typedef struct _NPP ++{ ++ void* pdata; /* plug-in private data */ ++ void* ndata; /* netscape private data */ ++} NPP_t; ++ ++typedef NPP_t* NPP; ++ ++ ++typedef struct _NPStream ++{ ++ void* pdata; /* plug-in private data */ ++ void* ndata; /* netscape private data */ ++ const char* url; ++ uint32 end; ++ uint32 lastmodified; ++ void* notifyData; ++} NPStream; ++ ++ ++typedef struct _NPByteRange ++{ ++ int32 offset; /* negative offset means from the end */ ++ uint32 length; ++ struct _NPByteRange* next; ++} NPByteRange; ++ ++ ++typedef struct _NPSavedData ++{ ++ int32 len; ++ void* buf; ++} NPSavedData; ++ ++ ++typedef struct _NPRect ++{ ++ uint16 top; ++ uint16 left; ++ uint16 bottom; ++ uint16 right; ++} NPRect; ++ ++typedef struct _NPSize ++{ ++ int32 width; ++ int32 height; ++} NPSize; ++ ++#ifdef XP_UNIX ++/* ++ * Unix specific structures and definitions ++ */ ++ ++/* ++ * Callback Structures. ++ * ++ * These are used to pass additional platform specific information. ++ */ ++enum { ++ NP_SETWINDOW = 1, ++ NP_PRINT ++}; ++ ++typedef struct ++{ ++ int32 type; ++} NPAnyCallbackStruct; ++ ++typedef struct ++{ ++ int32 type; ++#ifdef MOZ_X11 ++ Display* display; ++ Visual* visual; ++ Colormap colormap; ++ unsigned int depth; ++#endif ++} NPSetWindowCallbackStruct; ++ ++typedef struct ++{ ++ int32 type; ++ FILE* fp; ++} NPPrintCallbackStruct; ++ ++#endif /* XP_UNIX */ ++ ++ ++/* ++ * The following masks are applied on certain platforms to NPNV and ++ * NPPV selectors that pass around pointers to COM interfaces. Newer ++ * compilers on some platforms may generate vtables that are not ++ * compatible with older compilers. To prevent older plugins from ++ * not understanding a new browser's ABI, these masks change the ++ * values of those selectors on those platforms. To remain backwards ++ * compatible with differenet versions of the browser, plugins can ++ * use these masks to dynamically determine and use the correct C++ ++ * ABI that the browser is expecting. This does not apply to Windows ++ * as Microsoft's COM ABI will likely not change. ++ */ ++ ++#define NP_ABI_GCC3_MASK 0x10000000 ++/* ++ * gcc 3.x generated vtables on UNIX and OSX are incompatible with ++ * previous compilers. ++ */ ++#if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) ++#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK ++#else ++#define _NP_ABI_MIXIN_FOR_GCC3 0 ++#endif ++ ++ ++#define NP_ABI_MACHO_MASK 0x01000000 ++/* ++ * On OSX, the Mach-O executable format is significantly ++ * different than CFM. In addition to having a different ++ * C++ ABI, it also has has different C calling convention. ++ * You must use glue code when calling between CFM and ++ * Mach-O C functions. ++ */ ++#if (defined(TARGET_RT_MAC_MACHO)) ++#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK ++#else ++#define _NP_ABI_MIXIN_FOR_MACHO 0 ++#endif ++ ++ ++#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) ++ ++/* ++ * List of variable names for which NPP_GetValue shall be implemented ++ */ ++typedef enum { ++ NPPVpluginNameString = 1, ++ NPPVpluginDescriptionString, ++ NPPVpluginWindowBool, ++ NPPVpluginTransparentBool, ++ NPPVjavaClass, /* Not implemented in Mozilla 1.0 */ ++ NPPVpluginWindowSize, ++ NPPVpluginTimerInterval, ++ ++ NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), ++ NPPVpluginScriptableIID = 11, ++ ++ /* 12 and over are available on Mozilla builds starting with 0.9.9 */ ++ NPPVjavascriptPushCallerBool = 12, ++ NPPVpluginKeepLibraryInMemory = 13 /* available in Mozilla 1.0 */ ++} NPPVariable; ++ ++/* ++ * List of variable names for which NPN_GetValue is implemented by Mozilla ++ */ ++typedef enum { ++ NPNVxDisplay = 1, ++ NPNVxtAppContext, ++ NPNVnetscapeWindow, ++ NPNVjavascriptEnabledBool, ++ NPNVasdEnabledBool, ++ NPNVisOfflineBool, ++ ++ /* 10 and over are available on Mozilla builds starting with 0.9.4 */ ++ NPNVserviceManager = (10 | NP_ABI_MASK), ++ NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */ ++ NPNVDOMWindow = (12 | NP_ABI_MASK) ++} NPNVariable; ++ ++/* ++ * The type of a NPWindow - it specifies the type of the data structure ++ * returned in the window field. ++ */ ++typedef enum { ++ NPWindowTypeWindow = 1, ++ NPWindowTypeDrawable ++} NPWindowType; ++ ++typedef struct _NPWindow ++{ ++ void* window; /* Platform specific window handle */ ++ /* OS/2: x - Position of bottom left corner */ ++ /* OS/2: y - relative to visible netscape window */ ++ int32 x; /* Position of top left corner relative */ ++ int32 y; /* to a netscape page. */ ++ uint32 width; /* Maximum window size */ ++ uint32 height; ++ NPRect clipRect; /* Clipping rectangle in port coordinates */ ++ /* Used by MAC only. */ ++#if defined(XP_UNIX) && !defined(XP_MACOSX) ++ void * ws_info; /* Platform-dependent additonal data */ ++#endif /* XP_UNIX */ ++ NPWindowType type; /* Is this a window or a drawable? */ ++} NPWindow; ++ ++ ++typedef struct _NPFullPrint ++{ ++ NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ ++ NPBool printOne; /* TRUE if plugin should print one copy to default printer */ ++ void* platformPrint; /* Platform-specific printing info */ ++} NPFullPrint; ++ ++typedef struct _NPEmbedPrint ++{ ++ NPWindow window; ++ void* platformPrint; /* Platform-specific printing info */ ++} NPEmbedPrint; ++ ++typedef struct _NPPrint ++{ ++ uint16 mode; /* NP_FULL or NP_EMBED */ ++ union ++ { ++ NPFullPrint fullPrint; /* if mode is NP_FULL */ ++ NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ ++ } print; ++} NPPrint; ++ ++#if defined(XP_MAC) || defined(XP_MACOSX) ++typedef EventRecord NPEvent; ++#elif defined(XP_WIN) ++typedef struct _NPEvent ++{ ++ uint16 event; ++ uint32 wParam; ++ uint32 lParam; ++} NPEvent; ++#elif defined(XP_OS2) ++typedef struct _NPEvent ++{ ++ uint32 event; ++ uint32 wParam; ++ uint32 lParam; ++} NPEvent; ++#elif defined (XP_UNIX) && defined(MOZ_X11) ++typedef XEvent NPEvent; ++#else ++typedef void* NPEvent; ++#endif /* XP_MAC */ ++ ++#if defined(XP_MAC) || defined(XP_MACOSX) ++typedef RgnHandle NPRegion; ++#elif defined(XP_WIN) ++typedef HRGN NPRegion; ++#elif defined(XP_UNIX) && defined(MOZ_X11) ++typedef Region NPRegion; ++#else ++typedef void *NPRegion; ++#endif /* XP_MAC */ ++ ++#if defined(XP_MAC) || defined(XP_MACOSX) ++/* ++ * Mac-specific structures and definitions. ++ */ ++ ++typedef struct NP_Port ++{ ++ CGrafPtr port; /* Grafport */ ++ int32 portx; /* position inside the topmost window */ ++ int32 porty; ++} NP_Port; ++ ++/* ++ * Non-standard event types that can be passed to HandleEvent ++ */ ++ ++enum NPEventType { ++ NPEventType_GetFocusEvent = (osEvt + 16), ++ NPEventType_LoseFocusEvent, ++ NPEventType_AdjustCursorEvent, ++ NPEventType_MenuCommandEvent, ++ NPEventType_ClippingChangedEvent, ++ NPEventType_ScrollingBeginsEvent = 1000, ++ NPEventType_ScrollingEndsEvent ++}; ++ ++#ifdef OBSOLETE ++#define getFocusEvent (osEvt + 16) ++#define loseFocusEvent (osEvt + 17) ++#define adjustCursorEvent (osEvt + 18) ++#endif ++#endif /* XP_MAC */ ++ ++/* ++ * Values for mode passed to NPP_New: ++ */ ++#define NP_EMBED 1 ++#define NP_FULL 2 ++ ++/* ++ * Values for stream type passed to NPP_NewStream: ++ */ ++#define NP_NORMAL 1 ++#define NP_SEEK 2 ++#define NP_ASFILE 3 ++#define NP_ASFILEONLY 4 ++ ++#define NP_MAXREADY (((unsigned)(~0)<<1)>>1) ++ ++#ifdef XP_MAC ++#pragma options align=reset ++#endif ++ ++ ++/*----------------------------------------------------------------------*/ ++/* Error and Reason Code definitions */ ++/*----------------------------------------------------------------------*/ ++ ++/* ++ * Values of type NPError: ++ */ ++#define NPERR_BASE 0 ++#define NPERR_NO_ERROR (NPERR_BASE + 0) ++#define NPERR_GENERIC_ERROR (NPERR_BASE + 1) ++#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) ++#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) ++#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) ++#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) ++#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) ++#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) ++#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) ++#define NPERR_INVALID_PARAM (NPERR_BASE + 9) ++#define NPERR_INVALID_URL (NPERR_BASE + 10) ++#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) ++#define NPERR_NO_DATA (NPERR_BASE + 12) ++#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) ++ ++/* ++ * Values of type NPReason: ++ */ ++#define NPRES_BASE 0 ++#define NPRES_DONE (NPRES_BASE + 0) ++#define NPRES_NETWORK_ERR (NPRES_BASE + 1) ++#define NPRES_USER_BREAK (NPRES_BASE + 2) ++ ++/* ++ * Don't use these obsolete error codes any more. ++ */ ++#define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR ++#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR ++#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK ++ ++/* ++ * Version feature information ++ */ ++#define NPVERS_HAS_STREAMOUTPUT 8 ++#define NPVERS_HAS_NOTIFICATION 9 ++#define NPVERS_HAS_LIVECONNECT 9 ++#define NPVERS_WIN16_HAS_LIVECONNECT 9 ++#define NPVERS_68K_HAS_LIVECONNECT 11 ++#define NPVERS_HAS_WINDOWLESS 11 ++#define NPVERS_HAS_XPCONNECT_SCRIPTING 13 ++ ++/*----------------------------------------------------------------------*/ ++/* Function Prototypes */ ++/*----------------------------------------------------------------------*/ ++ ++#if defined(_WINDOWS) && !defined(WIN32) ++#define NP_LOADDS _loadds ++#else ++#if defined(__OS2__) ++#define NP_LOADDS _System ++#else ++#define NP_LOADDS ++#endif ++#endif ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++ * NPP_* functions are provided by the plugin and called by the navigator. ++ */ ++ ++#ifdef XP_UNIX ++char* NPP_GetMIMEDescription(void); ++#endif /* XP_UNIX */ ++ ++NPError NP_LOADDS NPP_Initialize(void); ++void NP_LOADDS NPP_Shutdown(void); ++NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, ++ uint16 mode, int16 argc, char* argn[], ++ char* argv[], NPSavedData* saved); ++NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); ++NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); ++NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, ++ NPStream* stream, NPBool seekable, ++ uint16* stype); ++NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, ++ NPReason reason); ++int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); ++int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, ++ int32 len, void* buffer); ++void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, ++ const char* fname); ++void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); ++int16 NP_LOADDS NPP_HandleEvent(NPP instance, void* event); ++void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, ++ NPReason reason, void* notifyData); ++#ifdef OJI ++jref NP_LOADDS NPP_GetJavaClass(void); ++#endif ++NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); ++NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); ++ ++/* ++ * NPN_* functions are provided by the navigator and called by the plugin. ++ */ ++void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, ++ int* netscape_major, int* netscape_minor); ++NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, ++ const char* target, void* notifyData); ++NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url, ++ const char* target); ++NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, ++ const char* target, uint32 len, ++ const char* buf, NPBool file, ++ void* notifyData); ++NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url, ++ const char* target, uint32 len, ++ const char* buf, NPBool file); ++NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); ++NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, ++ const char* target, NPStream** stream); ++int32 NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); ++NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason); ++void NP_LOADDS NPN_Status(NPP instance, const char* message); ++const char* NP_LOADDS NPN_UserAgent(NPP instance); ++void* NP_LOADDS NPN_MemAlloc(uint32 size); ++void NP_LOADDS NPN_MemFree(void* ptr); ++uint32 NP_LOADDS NPN_MemFlush(uint32 size); ++void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); ++#ifdef OJI ++JRIEnv* NP_LOADDS NPN_GetJavaEnv(void); ++jref NP_LOADDS NPN_GetJavaPeer(NPP instance); ++#endif ++NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value); ++NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value); ++void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); ++void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); ++void NP_LOADDS NPN_ForceRedraw(NPP instance); ++ ++#ifdef __cplusplus ++} /* end extern "C" */ ++#endif ++ ++#endif /* RC_INVOKED */ ++#ifdef __OS2__ ++#pragma pack() ++#endif ++ ++#endif /* _NPAPI_H_ */ +diff -urN kdebase-3.5.2/nsplugins/sdk/npruntime.h new/nsplugins/sdk/npruntime.h +--- kdebase-3.5.2/nsplugins/sdk/npruntime.h 1970-01-01 00:00:00.000000000 +0000 ++++ new/nsplugins/sdk/npruntime.h 2008-01-29 22:53:08.000000000 +0000 +@@ -0,0 +1,399 @@ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* ++ * Copyright � 2004, Apple Computer, Inc. and The Mozilla Foundation. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are ++ * met: ++ * ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla ++ * Foundation ("Mozilla") nor the names of their contributors may be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS ++ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ++ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ++ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR ++ * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED ++ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * Revision 1 (March 4, 2004): ++ * Initial proposal. ++ * ++ * Revision 2 (March 10, 2004): ++ * All calls into script were made asynchronous. Results are ++ * provided via the NPScriptResultFunctionPtr callback. ++ * ++ * Revision 3 (March 10, 2004): ++ * Corrected comments to not refer to class retain/release FunctionPtrs. ++ * ++ * Revision 4 (March 11, 2004): ++ * Added additional convenience NPN_SetExceptionWithUTF8(). ++ * Changed NPHasPropertyFunctionPtr and NPHasMethodFunctionPtr to take NPClass ++ * pointers instead of NPObject pointers. ++ * Added NPIsValidIdentifier(). ++ * ++ * Revision 5 (March 17, 2004): ++ * Added context parameter to result callbacks from ScriptObject functions. ++ * ++ * Revision 6 (March 29, 2004): ++ * Renamed functions implemented by user agent to NPN_*. Removed _ from ++ * type names. ++ * Renamed "JavaScript" types to "Script". ++ * ++ * Revision 7 (April 21, 2004): ++ * NPIdentifier becomes a void*, was int32_t ++ * Remove NP_IsValidIdentifier, renamed NP_IdentifierFromUTF8 to NP_GetIdentifier ++ * Added NPVariant and modified functions to use this new type. ++ * ++ * Revision 8 (July 9, 2004): ++ * Updated to joint Apple-Mozilla license. ++ * ++ */ ++#ifndef _NP_RUNTIME_H_ ++#define _NP_RUNTIME_H_ ++ ++#include ++typedef Q_UINT32 uint32_t; ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ ++/* ++ This API is used to facilitate binding code written in C to script ++ objects. The API in this header does not assume the presence of a ++ user agent. That is, it can be used to bind C code to scripting ++ environments outside of the context of a user agent. ++ ++ However, the normal use of the this API is in the context of a ++ scripting environment running in a browser or other user agent. ++ In particular it is used to support the extended Netscape ++ script-ability API for plugins (NP-SAP). NP-SAP is an extension ++ of the Netscape plugin API. As such we have adopted the use of ++ the "NP" prefix for this API. ++ ++ The following NP{N|P}Variables were added to the Netscape plugin ++ API (in npapi.h): ++ ++ NPNVWindowNPObject ++ NPNVPluginElementNPObject ++ NPPVpluginScriptableNPObject ++ ++ These variables are exposed through NPN_GetValue() and ++ NPP_GetValue() (respectively) and are used to establish the ++ initial binding between the user agent and native code. The DOM ++ objects in the user agent can be examined and manipulated using ++ the NPN_ functions that operate on NPObjects described in this ++ header. ++ ++ To the extent possible the assumptions about the scripting ++ language used by the scripting environment have been minimized. ++*/ ++ ++#define NP_BEGIN_MACRO do { ++#define NP_END_MACRO } while (0) ++ ++/* ++ Objects (non-primitive data) passed between 'C' and script is ++ always wrapped in an NPObject. The 'interface' of an NPObject is ++ described by an NPClass. ++*/ ++typedef struct NPObject NPObject; ++typedef struct NPClass NPClass; ++ ++typedef char NPUTF8; ++typedef struct _NPString { ++ const NPUTF8 *utf8characters; ++ uint32_t utf8length; ++} NPString; ++ ++typedef enum { ++ NPVariantType_Void, ++ NPVariantType_Null, ++ NPVariantType_Bool, ++ NPVariantType_Int32, ++ NPVariantType_Double, ++ NPVariantType_String, ++ NPVariantType_Object ++} NPVariantType; ++ ++typedef struct _NPVariant { ++ NPVariantType type; ++ union { ++ bool boolValue; ++ uint32_t intValue; ++ double doubleValue; ++ NPString stringValue; ++ NPObject *objectValue; ++ } value; ++} NPVariant; ++ ++/* ++ NPN_ReleaseVariantValue is called on all 'out' parameters ++ references. Specifically it is to be called on variants that own ++ their value, as is the case with all non-const NPVariant* ++ arguments after a successful call to any methods (except this one) ++ in this API. ++ ++ After calling NPN_ReleaseVariantValue, the type of the variant ++ will be NPVariantType_Void. ++*/ ++void NPN_ReleaseVariantValue(NPVariant *variant); ++ ++#define NPVARIANT_IS_VOID(_v) ((_v).type == NPVariantType_Void) ++#define NPVARIANT_IS_NULL(_v) ((_v).type == NPVariantType_Null) ++#define NPVARIANT_IS_BOOLEAN(_v) ((_v).type == NPVariantType_Bool) ++#define NPVARIANT_IS_INT32(_v) ((_v).type == NPVariantType_Int32) ++#define NPVARIANT_IS_DOUBLE(_v) ((_v).type == NPVariantType_Double) ++#define NPVARIANT_IS_STRING(_v) ((_v).type == NPVariantType_String) ++#define NPVARIANT_IS_OBJECT(_v) ((_v).type == NPVariantType_Object) ++ ++#define NPVARIANT_TO_BOOLEAN(_v) ((_v).value.boolValue) ++#define NPVARIANT_TO_INT32(_v) ((_v).value.intValue) ++#define NPVARIANT_TO_DOUBLE(_v) ((_v).value.doubleValue) ++#define NPVARIANT_TO_STRING(_v) ((_v).value.stringValue) ++#define NPVARIANT_TO_OBJECT(_v) ((_v).value.objectValue) ++ ++#define VOID_TO_NPVARIANT(_v) \ ++NP_BEGIN_MACRO \ ++ (_v).type = NPVariantType_Void; \ ++ (_v).value.objectValue = NULL; \ ++NP_END_MACRO ++ ++#define NULL_TO_NPVARIANT(_v) \ ++NP_BEGIN_MACRO \ ++ (_v).type = NPVariantType_Null; \ ++ (_v).value.objectValue = NULL; \ ++NP_END_MACRO ++ ++#define BOOLEAN_TO_NPVARIANT(_val, _v) \ ++NP_BEGIN_MACRO \ ++ (_v).type = NPVariantType_Bool; \ ++ (_v).value.boolValue = !!(_val); \ ++NP_END_MACRO ++ ++#define INT32_TO_NPVARIANT(_val, _v) \ ++NP_BEGIN_MACRO \ ++ (_v).type = NPVariantType_Int32; \ ++ (_v).value.intValue = _val; \ ++NP_END_MACRO ++ ++#define DOUBLE_TO_NPVARIANT(_val, _v) \ ++NP_BEGIN_MACRO \ ++ (_v).type = NPVariantType_Double; \ ++ (_v).value.doubleValue = _val; \ ++NP_END_MACRO ++ ++#define STRINGZ_TO_NPVARIANT(_val, _v) \ ++NP_BEGIN_MACRO \ ++ (_v).type = NPVariantType_String; \ ++ NPString str = { _val, strlen(_val) }; \ ++ (_v).value.stringValue = str; \ ++NP_END_MACRO ++ ++#define STRINGN_TO_NPVARIANT(_val, _len, _v) \ ++NP_BEGIN_MACRO \ ++ (_v).type = NPVariantType_String; \ ++ NPString str = { _val, _len }; \ ++ (_v).value.stringValue = str; \ ++NP_END_MACRO ++ ++#define OBJECT_TO_NPVARIANT(_val, _v) \ ++NP_BEGIN_MACRO \ ++ (_v).type = NPVariantType_Object; \ ++ (_v).value.objectValue = _val; \ ++NP_END_MACRO ++ ++ ++/* ++ Type mappings (JavaScript types have been used for illustration ++ purposes): ++ ++ JavaScript to C (NPVariant with type:) ++ undefined NPVariantType_Void ++ null NPVariantType_Null ++ Boolean NPVariantType_Bool ++ Number NPVariantType_Double or NPVariantType_Int32 ++ String NPVariantType_String ++ Object NPVariantType_Object ++ ++ C (NPVariant with type:) to JavaScript ++ NPVariantType_Void undefined ++ NPVariantType_Null null ++ NPVariantType_Bool Boolean ++ NPVariantType_Int32 Number ++ NPVariantType_Double Number ++ NPVariantType_String String ++ NPVariantType_Object Object ++*/ ++ ++typedef void *NPIdentifier; ++ ++/* ++ NPObjects have methods and properties. Methods and properties are ++ identified with NPIdentifiers. These identifiers may be reflected ++ in script. NPIdentifiers can be either strings or integers, IOW, ++ methods and properties can be identified by either strings or ++ integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be ++ compared using ==. In case of any errors, the requested ++ NPIdentifier(s) will be NULL. ++*/ ++NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name); ++void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, ++ NPIdentifier *identifiers); ++NPIdentifier NPN_GetIntIdentifier(int32_t intid); ++bool NPN_IdentifierIsString(NPIdentifier identifier); ++ ++/* ++ The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed. ++*/ ++NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier); ++ ++/* ++ Get the integer represented by identifier. If identifier is not an ++ integer identifier, the behaviour is undefined. ++*/ ++int32_t NPN_IntFromIdentifier(NPIdentifier identifier); ++ ++/* ++ NPObject behavior is implemented using the following set of ++ callback functions. ++ ++ The NPVariant *result argument of these functions (where ++ applicable) should be released using NPN_ReleaseVariantValue(). ++*/ ++typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass); ++typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj); ++typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj); ++typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name); ++typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name, ++ const NPVariant *args, uint32_t argCount, ++ NPVariant *result); ++typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj, ++ const NPVariant *args, ++ uint32_t argCount, ++ NPVariant *result); ++typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name); ++typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, ++ NPVariant *result); ++typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, ++ const NPVariant *value); ++typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj, ++ NPIdentifier name); ++ ++/* ++ NPObjects returned by create, retain, invoke, and getProperty pass ++ a reference count to the caller. That is, the callee adds a ++ reference count which passes to the caller. It is the caller's ++ responsibility to release the returned object. ++ ++ NPInvokeFunctionPtr function may return 0 to indicate a void ++ result. ++ ++ NPInvalidateFunctionPtr is called by the scripting environment ++ when the native code is shutdown. Any attempt to message a ++ NPObject instance after the invalidate callback has been ++ called will result in undefined behavior, even if the native code ++ is still retaining those NPObject instances. (The runtime ++ will typically return immediately, with 0 or NULL, from an attempt ++ to dispatch to a NPObject, but this behavior should not be ++ depended upon.) ++*/ ++struct NPClass ++{ ++ uint32_t structVersion; ++ NPAllocateFunctionPtr allocate; ++ NPDeallocateFunctionPtr deallocate; ++ NPInvalidateFunctionPtr invalidate; ++ NPHasMethodFunctionPtr hasMethod; ++ NPInvokeFunctionPtr invoke; ++ NPInvokeDefaultFunctionPtr invokeDefault; ++ NPHasPropertyFunctionPtr hasProperty; ++ NPGetPropertyFunctionPtr getProperty; ++ NPSetPropertyFunctionPtr setProperty; ++ NPRemovePropertyFunctionPtr removeProperty; ++}; ++ ++#define NP_CLASS_STRUCT_VERSION 1 ++ ++struct NPObject { ++ NPClass *_class; ++ uint32_t referenceCount; ++ /* ++ * Additional space may be allocated here by types of NPObjects ++ */ ++}; ++ ++/* ++ If the class has an allocate function, NPN_CreateObject invokes ++ that function, otherwise a NPObject is allocated and ++ returned. This method will initialize the referenceCount member of ++ the NPObject to 1. ++*/ ++NPObject *NPN_CreateObject(NPP npp, NPClass *aClass); ++ ++/* ++ Increment the NPObject's reference count. ++*/ ++NPObject *NPN_RetainObject(NPObject *npobj); ++ ++/* ++ Decremented the NPObject's reference count. If the reference ++ count goes to zero, the class's destroy function is invoke if ++ specified, otherwise the object is freed directly. ++*/ ++void NPN_ReleaseObject(NPObject *npobj); ++ ++/* ++ Functions to access script objects represented by NPObject. ++ ++ Calls to script objects are synchronous. If a function returns a ++ value, it will be supplied via the result NPVariant ++ argument. Successful calls will return true, false will be ++ returned in case of an error. ++ ++ Calls made from plugin code to script must be made from the thread ++ on which the plugin was initialized. ++*/ ++ ++bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, ++ const NPVariant *args, uint32_t argCount, NPVariant *result); ++bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, ++ uint32_t argCount, NPVariant *result); ++bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, ++ NPVariant *result); ++bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, ++ NPVariant *result); ++bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, ++ const NPVariant *value); ++bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); ++bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); ++bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName); ++ ++/* ++ NPN_SetException may be called to trigger a script exception upon ++ return from entry points into NPObjects. Typical usage: ++ ++ NPN_SetException (npobj, message); ++*/ ++void NPN_SetException(NPObject *npobj, const NPUTF8 *message); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff -urN kdebase-3.5.2/nsplugins/sdk/npupp.h new/nsplugins/sdk/npupp.h +--- kdebase-3.5.2/nsplugins/sdk/npupp.h 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/sdk/npupp.h 2008-01-29 22:53:08.000000000 +0000 +@@ -1,6 +1,43 @@ +-/* -*- Mode: C; tab-width: 4; -*- */ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++ + /* +- * npupp.h $Revision: 46100 $ ++ * npupp.h $Revision: 750897 $ + * function call mecahnics needed by platform specific glue code. + */ + +@@ -8,6 +45,10 @@ + #ifndef _NPUPP_H_ + #define _NPUPP_H_ + ++#if defined(__OS2__) ++#pragma pack(1) ++#endif ++ + #ifndef GENERATINGCFM + #define GENERATINGCFM 0 + #endif +@@ -16,435 +57,437 @@ + #include "npapi.h" + #endif + ++#include "npruntime.h" ++ + #include "jri.h" + + /****************************************************************************************** + plug-in function table macros +- for each function in and out of the plugin API we define ++ for each function in and out of the plugin API we define + typedef NPP_FooUPP +- #define NewNPP_FooProc +- #define CallNPP_FooProc +- for mac, define the UPP magic for PPC/68K calling ++ #define NewNPP_FooProc ++ #define CallNPP_FooProc ++ for mac, define the UPP magic for PPC/68K calling + *******************************************************************************************/ + + + /* NPP_Initialize */ + +-#if GENERATINGCFM ++#define _NPUPP_USE_UPP_ 0 ++ ++#if _NPUPP_USE_UPP_ + typedef UniversalProcPtr NPP_InitializeUPP; + + enum { +- uppNPP_InitializeProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) +- | RESULT_SIZE(SIZE_CODE(0)) +-}; +- +-#define NewNPP_InitializeProc(FUNC) \ +- (NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture()) +-#define CallNPP_InitializeProc(FUNC) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo) +- +-#else +- +-typedef void (*NPP_InitializeUPP)(void); +-#define NewNPP_InitializeProc(FUNC) \ +- ((NPP_InitializeUPP) (FUNC)) +-#define CallNPP_InitializeProc(FUNC) \ +- (*(FUNC))() ++ uppNPP_InitializeProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++ ++#define NewNPP_InitializeProc(FUNC) \ ++ (NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture()) ++#define CallNPP_InitializeProc(FUNC) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo) ++ ++#else ++ ++typedef void (* NP_LOADDS NPP_InitializeUPP)(void); ++#define NewNPP_InitializeProc(FUNC) \ ++ ((NPP_InitializeUPP) (FUNC)) ++#define CallNPP_InitializeProc(FUNC) \ ++ (*(FUNC))() + + #endif + + + /* NPP_Shutdown */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + typedef UniversalProcPtr NPP_ShutdownUPP; + + enum { +- uppNPP_ShutdownProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) +- | RESULT_SIZE(SIZE_CODE(0)) +-}; +- +-#define NewNPP_ShutdownProc(FUNC) \ +- (NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture()) +-#define CallNPP_ShutdownProc(FUNC) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo) +- +-#else +- +-typedef void (*NPP_ShutdownUPP)(void); +-#define NewNPP_ShutdownProc(FUNC) \ +- ((NPP_ShutdownUPP) (FUNC)) +-#define CallNPP_ShutdownProc(FUNC) \ +- (*(FUNC))() ++ uppNPP_ShutdownProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++ ++#define NewNPP_ShutdownProc(FUNC) \ ++ (NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture()) ++#define CallNPP_ShutdownProc(FUNC) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo) ++ ++#else ++ ++typedef void (* NP_LOADDS NPP_ShutdownUPP)(void); ++#define NewNPP_ShutdownProc(FUNC) \ ++ ((NPP_ShutdownUPP) (FUNC)) ++#define CallNPP_ShutdownProc(FUNC) \ ++ (*(FUNC))() + + #endif + + + /* NPP_New */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + typedef UniversalProcPtr NPP_NewUPP; + + enum { +- uppNPP_NewProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16))) +- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16))) +- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **))) +- | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **))) +- | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++ uppNPP_NewProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16))) ++ | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **))) ++ | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **))) ++ | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + }; + +-#define NewNPP_NewProc(FUNC) \ +- (NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture()) ++#define NewNPP_NewProc(FUNC) \ ++ (NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture()) + #define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \ +- (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \ ++ (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) + #else + +-typedef NPError (*NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); +-#define NewNPP_NewProc(FUNC) \ +- ((NPP_NewUPP) (FUNC)) +-#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) ++typedef NPError (* NP_LOADDS NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); ++#define NewNPP_NewProc(FUNC) \ ++ ((NPP_NewUPP) (FUNC)) ++#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) + + #endif + + + /* NPP_Destroy */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_DestroyUPP; + enum { +- uppNPP_DestroyProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +-}; +-#define NewNPP_DestroyProc(FUNC) \ +- (NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture()) +-#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2)) +-#else +- +-typedef NPError (*NPP_DestroyUPP)(NPP instance, NPSavedData** save); +-#define NewNPP_DestroyProc(FUNC) \ +- ((NPP_DestroyUPP) (FUNC)) +-#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ +- (*(FUNC))((ARG1), (ARG2)) ++ uppNPP_DestroyProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++}; ++#define NewNPP_DestroyProc(FUNC) \ ++ (NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture()) ++#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2)) ++#else ++ ++typedef NPError (* NP_LOADDS NPP_DestroyUPP)(NPP instance, NPSavedData** save); ++#define NewNPP_DestroyProc(FUNC) \ ++ ((NPP_DestroyUPP) (FUNC)) ++#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) + + #endif + + + /* NPP_SetWindow */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_SetWindowUPP; + enum { +- uppNPP_SetWindowProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +-}; +-#define NewNPP_SetWindowProc(FUNC) \ +- (NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture()) +-#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2)) ++ uppNPP_SetWindowProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++}; ++#define NewNPP_SetWindowProc(FUNC) \ ++ (NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture()) ++#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2)) + + #else + +-typedef NPError (*NPP_SetWindowUPP)(NPP instance, NPWindow* window); +-#define NewNPP_SetWindowProc(FUNC) \ +- ((NPP_SetWindowUPP) (FUNC)) +-#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ +- (*(FUNC))((ARG1), (ARG2)) ++typedef NPError (* NP_LOADDS NPP_SetWindowUPP)(NPP instance, NPWindow* window); ++#define NewNPP_SetWindowProc(FUNC) \ ++ ((NPP_SetWindowUPP) (FUNC)) ++#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) + + #endif + + + /* NPP_NewStream */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_NewStreamUPP; + enum { +- uppNPP_NewStreamProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *))) +- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool))) +- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +-}; +-#define NewNPP_NewStreamProc(FUNC) \ +- (NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture()) +-#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) +-#else +- +-typedef NPError (*NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); +-#define NewNPP_NewStreamProc(FUNC) \ +- ((NPP_NewStreamUPP) (FUNC)) ++ uppNPP_NewStreamProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool))) ++ | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++}; ++#define NewNPP_NewStreamProc(FUNC) \ ++ (NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture()) ++#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) ++#else ++ ++typedef NPError (* NP_LOADDS NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); ++#define NewNPP_NewStreamProc(FUNC) \ ++ ((NPP_NewStreamUPP) (FUNC)) + #define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) + #endif + + + /* NPP_DestroyStream */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_DestroyStreamUPP; + enum { +- uppNPP_DestroyStreamProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +-}; +-#define NewNPP_DestroyStreamProc(FUNC) \ +- (NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture()) +-#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPReasonArg)) ++ uppNPP_DestroyStreamProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++}; ++#define NewNPP_DestroyStreamProc(FUNC) \ ++ (NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture()) ++#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPReasonArg)) + + #else + +-typedef NPError (*NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); +-#define NewNPP_DestroyStreamProc(FUNC) \ +- ((NPP_DestroyStreamUPP) (FUNC)) +-#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ +- (*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg)) ++typedef NPError (* NP_LOADDS NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); ++#define NewNPP_DestroyStreamProc(FUNC) \ ++ ((NPP_DestroyStreamUPP) (FUNC)) ++#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ ++ (*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg)) + + #endif + + + /* NPP_WriteReady */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_WriteReadyUPP; + enum { +- uppNPP_WriteReadyProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +-}; +-#define NewNPP_WriteReadyProc(FUNC) \ +- (NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture()) +-#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ +- (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr)) ++ uppNPP_WriteReadyProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(int32))) ++}; ++#define NewNPP_WriteReadyProc(FUNC) \ ++ (NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture()) ++#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ ++ (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr)) + + #else + +-typedef int32 (*NPP_WriteReadyUPP)(NPP instance, NPStream* stream); +-#define NewNPP_WriteReadyProc(FUNC) \ +- ((NPP_WriteReadyUPP) (FUNC)) +-#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ +- (*(FUNC))((NPParg), (NPStreamPtr)) ++typedef int32 (* NP_LOADDS NPP_WriteReadyUPP)(NPP instance, NPStream* stream); ++#define NewNPP_WriteReadyProc(FUNC) \ ++ ((NPP_WriteReadyUPP) (FUNC)) ++#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ ++ (*(FUNC))((NPParg), (NPStreamPtr)) + + #endif + + + /* NPP_Write */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_WriteUPP; + enum { +- uppNPP_WriteProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) +- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32))) +- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*))) +- | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +-}; +-#define NewNPP_WriteProc(FUNC) \ +- (NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture()) +-#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ +- (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) ++ uppNPP_WriteProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32))) ++ | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(int32))) ++}; ++#define NewNPP_WriteProc(FUNC) \ ++ (NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture()) ++#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ ++ (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) + + #else + +-typedef int32 (*NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); +-#define NewNPP_WriteProc(FUNC) \ +- ((NPP_WriteUPP) (FUNC)) +-#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ +- (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) ++typedef int32 (* NP_LOADDS NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); ++#define NewNPP_WriteProc(FUNC) \ ++ ((NPP_WriteUPP) (FUNC)) ++#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ ++ (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) + + #endif + + + /* NPP_StreamAsFile */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_StreamAsFileUPP; + enum { +- uppNPP_StreamAsFileProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) +- | RESULT_SIZE(SIZE_CODE(0)) +-}; +-#define NewNPP_StreamAsFileProc(FUNC) \ +- (NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture()) +-#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3)) ++ uppNPP_StreamAsFileProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++#define NewNPP_StreamAsFileProc(FUNC) \ ++ (NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture()) ++#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3)) + + #else + +-typedef void (*NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname); +-#define NewNPP_StreamAsFileProc(FUNC) \ +- ((NPP_StreamAsFileUPP) (FUNC)) +-#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3)) ++typedef void (* NP_LOADDS NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname); ++#define NewNPP_StreamAsFileProc(FUNC) \ ++ ((NPP_StreamAsFileUPP) (FUNC)) ++#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) + #endif + + + /* NPP_Print */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_PrintUPP; + enum { +- uppNPP_PrintProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *))) +- | RESULT_SIZE(SIZE_CODE(0)) +-}; +-#define NewNPP_PrintProc(FUNC) \ +- (NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture()) +-#define CallNPP_PrintProc(FUNC, NPParg, voidPtr) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr)) ++ uppNPP_PrintProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *))) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++#define NewNPP_PrintProc(FUNC) \ ++ (NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture()) ++#define CallNPP_PrintProc(FUNC, NPParg, voidPtr) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr)) + + #else + +-typedef void (*NPP_PrintUPP)(NPP instance, NPPrint* platformPrint); +-#define NewNPP_PrintProc(FUNC) \ +- ((NPP_PrintUPP) (FUNC)) +-#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \ +- (*(FUNC))((NPParg), (NPPrintArg)) ++typedef void (* NP_LOADDS NPP_PrintUPP)(NPP instance, NPPrint* platformPrint); ++#define NewNPP_PrintProc(FUNC) \ ++ ((NPP_PrintUPP) (FUNC)) ++#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \ ++ (*(FUNC))((NPParg), (NPPrintArg)) + + #endif + + + /* NPP_HandleEvent */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_HandleEventUPP; + enum { +- uppNPP_HandleEventProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(int16))) +-}; +-#define NewNPP_HandleEventProc(FUNC) \ +- (NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture()) +-#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ +- (int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr)) ++ uppNPP_HandleEventProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(int16))) ++}; ++#define NewNPP_HandleEventProc(FUNC) \ ++ (NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture()) ++#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ ++ (int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr)) + + #else + +-typedef int16 (*NPP_HandleEventUPP)(NPP instance, void* event); +-#define NewNPP_HandleEventProc(FUNC) \ +- ((NPP_HandleEventUPP) (FUNC)) +-#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ +- (*(FUNC))((NPParg), (voidPtr)) ++typedef int16 (* NP_LOADDS NPP_HandleEventUPP)(NPP instance, void* event); ++#define NewNPP_HandleEventProc(FUNC) \ ++ ((NPP_HandleEventUPP) (FUNC)) ++#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ ++ (*(FUNC))((NPParg), (voidPtr)) + + #endif + + + /* NPP_URLNotify */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_URLNotifyUPP; + enum { +- uppNPP_URLNotifyProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) +- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) +- | RESULT_SIZE(SIZE_CODE(SIZE_CODE(0))) +-}; +-#define NewNPP_URLNotifyProc(FUNC) \ +- (NPP_URLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, GetCurrentArchitecture()) +-#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) ++ uppNPP_URLNotifyProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) ++ | RESULT_SIZE(SIZE_CODE(SIZE_CODE(0))) ++}; ++#define NewNPP_URLNotifyProc(FUNC) \ ++ (NPP_URLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, GetCurrentArchitecture()) ++#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + + #else + +-typedef void (*NPP_URLNotifyUPP)(NPP instance, const char* url, NPReason reason, void* notifyData); +-#define NewNPP_URLNotifyProc(FUNC) \ +- ((NPP_URLNotifyUPP) (FUNC)) +-#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) ++typedef void (* NP_LOADDS NPP_URLNotifyUPP)(NPP instance, const char* url, NPReason reason, void* notifyData); ++#define NewNPP_URLNotifyProc(FUNC) \ ++ ((NPP_URLNotifyUPP) (FUNC)) ++#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) + + #endif + + + /* NPP_GetValue */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_GetValueUPP; + enum { +- uppNPP_GetValueProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++ uppNPP_GetValueProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + }; +-#define NewNPP_GetValueProc(FUNC) \ +- (NPP_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_GetValueProcInfo, GetCurrentArchitecture()) ++#define NewNPP_GetValueProc(FUNC) \ ++ (NPP_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_GetValueProcInfo, GetCurrentArchitecture()) + #define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) + #else + +-typedef NPError (*NPP_GetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); +-#define NewNPP_GetValueProc(FUNC) \ +- ((NPP_GetValueUPP) (FUNC)) +-#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3)) ++typedef NPError (* NP_LOADDS NPP_GetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); ++#define NewNPP_GetValueProc(FUNC) \ ++ ((NPP_GetValueUPP) (FUNC)) ++#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) + #endif + + + /* NPP_SetValue */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_SetValueUPP; + enum { +- uppNPP_SetValueProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++ uppNPP_SetValueProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + }; +-#define NewNPP_SetValueProc(FUNC) \ +- (NPP_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetValueProcInfo, GetCurrentArchitecture()) ++#define NewNPP_SetValueProc(FUNC) \ ++ (NPP_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetValueProcInfo, GetCurrentArchitecture()) + #define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) + #else + +-typedef NPError (*NPP_SetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); +-#define NewNPP_SetValueProc(FUNC) \ +- ((NPP_SetValueUPP) (FUNC)) +-#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3)) ++typedef NPError (* NP_LOADDS NPP_SetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); ++#define NewNPP_SetValueProc(FUNC) \ ++ ((NPP_SetValueUPP) (FUNC)) ++#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) + #endif + + +- +- + /* + * Netscape entry points + */ +@@ -452,310 +495,310 @@ + + /* NPN_GetValue */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_GetValueUPP; + enum { +- uppNPN_GetValueProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++ uppNPN_GetValueProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + }; +-#define NewNPN_GetValueProc(FUNC) \ +- (NPN_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetValueProcInfo, GetCurrentArchitecture()) ++#define NewNPN_GetValueProc(FUNC) \ ++ (NPN_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetValueProcInfo, GetCurrentArchitecture()) + #define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) + #else + +-typedef NPError (*NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); +-#define NewNPN_GetValueProc(FUNC) \ +- ((NPN_GetValueUPP) (FUNC)) +-#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3)) ++typedef NPError (* NP_LOADDS NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); ++#define NewNPN_GetValueProc(FUNC) \ ++ ((NPN_GetValueUPP) (FUNC)) ++#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) + #endif + + + /* NPN_SetValue */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_SetValueUPP; + enum { +- uppNPN_SetValueProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++ uppNPN_SetValueProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + }; +-#define NewNPN_SetValueProc(FUNC) \ +- (NPN_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetValueProcInfo, GetCurrentArchitecture()) ++#define NewNPN_SetValueProc(FUNC) \ ++ (NPN_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetValueProcInfo, GetCurrentArchitecture()) + #define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) + #else + +-typedef NPError (*NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); +-#define NewNPN_SetValueProc(FUNC) \ +- ((NPN_SetValueUPP) (FUNC)) +-#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3)) ++typedef NPError (* NP_LOADDS NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); ++#define NewNPN_SetValueProc(FUNC) \ ++ ((NPN_SetValueUPP) (FUNC)) ++#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) + #endif + + + /* NPN_GetUrlNotify */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_GetURLNotifyUPP; + enum { +- uppNPN_GetURLNotifyProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++ uppNPN_GetURLNotifyProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + }; +-#define NewNPN_GetURLNotifyProc(FUNC) \ +- (NPN_GetURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, GetCurrentArchitecture()) ++#define NewNPN_GetURLNotifyProc(FUNC) \ ++ (NPN_GetURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, GetCurrentArchitecture()) + #define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + #else + +-typedef NPError (*NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); +-#define NewNPN_GetURLNotifyProc(FUNC) \ +- ((NPN_GetURLNotifyUPP) (FUNC)) +-#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) ++typedef NPError (* NP_LOADDS NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); ++#define NewNPN_GetURLNotifyProc(FUNC) \ ++ ((NPN_GetURLNotifyUPP) (FUNC)) ++#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) + #endif + + + /* NPN_PostUrlNotify */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_PostURLNotifyUPP; + enum { +- uppNPN_PostURLNotifyProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) +- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) +- | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(void*))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++ uppNPN_PostURLNotifyProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) ++ | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) ++ | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(void*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + }; +-#define NewNPN_PostURLNotifyProc(FUNC) \ +- (NPN_PostURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, GetCurrentArchitecture()) ++#define NewNPN_PostURLNotifyProc(FUNC) \ ++ (NPN_PostURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, GetCurrentArchitecture()) + #define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) + #else + +-typedef NPError (*NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData); +-#define NewNPN_PostURLNotifyProc(FUNC) \ +- ((NPN_PostURLNotifyUPP) (FUNC)) ++typedef NPError (* NP_LOADDS NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData); ++#define NewNPN_PostURLNotifyProc(FUNC) \ ++ ((NPN_PostURLNotifyUPP) (FUNC)) + #define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) + #endif + + + /* NPN_GetUrl */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_GetURLUPP; + enum { +- uppNPN_GetURLProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++ uppNPN_GetURLProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + }; +-#define NewNPN_GetURLProc(FUNC) \ +- (NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture()) ++#define NewNPN_GetURLProc(FUNC) \ ++ (NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture()) + #define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3)) ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3)) + #else + +-typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window); +-#define NewNPN_GetURLProc(FUNC) \ +- ((NPN_GetURLUPP) (FUNC)) +-#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3)) ++typedef NPError (* NP_LOADDS NPN_GetURLUPP)(NPP instance, const char* url, const char* window); ++#define NewNPN_GetURLProc(FUNC) \ ++ ((NPN_GetURLUPP) (FUNC)) ++#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) + #endif + + + /* NPN_PostUrl */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_PostURLUPP; + enum { +- uppNPN_PostURLProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) +- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) +- | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++ uppNPN_PostURLProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) ++ | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) ++ | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + }; +-#define NewNPN_PostURLProc(FUNC) \ +- (NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture()) ++#define NewNPN_PostURLProc(FUNC) \ ++ (NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture()) + #define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) + #else + +-typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); +-#define NewNPN_PostURLProc(FUNC) \ +- ((NPN_PostURLUPP) (FUNC)) ++typedef NPError (* NP_LOADDS NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); ++#define NewNPN_PostURLProc(FUNC) \ ++ ((NPN_PostURLUPP) (FUNC)) + #define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ +- (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) + #endif + + + /* NPN_RequestRead */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_RequestReadUPP; + enum { +- uppNPN_RequestReadProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +-}; +-#define NewNPN_RequestReadProc(FUNC) \ +- (NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture()) +-#define CallNPN_RequestReadProc(FUNC, stream, range) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range)) ++ uppNPN_RequestReadProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++}; ++#define NewNPN_RequestReadProc(FUNC) \ ++ (NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture()) ++#define CallNPN_RequestReadProc(FUNC, stream, range) \ ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range)) + + #else + +-typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); +-#define NewNPN_RequestReadProc(FUNC) \ +- ((NPN_RequestReadUPP) (FUNC)) +-#define CallNPN_RequestReadProc(FUNC, stream, range) \ +- (*(FUNC))((stream), (range)) ++typedef NPError (* NP_LOADDS NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); ++#define NewNPN_RequestReadProc(FUNC) \ ++ ((NPN_RequestReadUPP) (FUNC)) ++#define CallNPN_RequestReadProc(FUNC, stream, range) \ ++ (*(FUNC))((stream), (range)) + + #endif + + + /* NPN_NewStream */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_NewStreamUPP; + enum { +- uppNPN_NewStreamProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) +- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPStream **))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +-}; +-#define NewNPN_NewStreamProc(FUNC) \ +- (NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture()) +-#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (window), (stream)) ++ uppNPN_NewStreamProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPStream **))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++}; ++#define NewNPN_NewStreamProc(FUNC) \ ++ (NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture()) ++#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (window), (stream)) + + #else + +-typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); +-#define NewNPN_NewStreamProc(FUNC) \ +- ((NPN_NewStreamUPP) (FUNC)) +-#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ +- (*(FUNC))((npp), (type), (window), (stream)) ++typedef NPError (* NP_LOADDS NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); ++#define NewNPN_NewStreamProc(FUNC) \ ++ ((NPN_NewStreamUPP) (FUNC)) ++#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ ++ (*(FUNC))((npp), (type), (window), (stream)) + + #endif + + + /* NPN_Write */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_WriteUPP; + enum { +- uppNPN_WriteProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) +- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) +- | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +-}; +-#define NewNPN_WriteProc(FUNC) \ +- (NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture()) +-#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ +- (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer)) ++ uppNPN_WriteProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(int32))) ++}; ++#define NewNPN_WriteProc(FUNC) \ ++ (NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture()) ++#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ ++ (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer)) + + #else + +-typedef int32 (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer); +-#define NewNPN_WriteProc(FUNC) \ +- ((NPN_WriteUPP) (FUNC)) +-#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ +- (*(FUNC))((npp), (stream), (len), (buffer)) ++typedef int32 (* NP_LOADDS NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer); ++#define NewNPN_WriteProc(FUNC) \ ++ ((NPN_WriteUPP) (FUNC)) ++#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ ++ (*(FUNC))((npp), (stream), (len), (buffer)) + + #endif + + + /* NPN_DestroyStream */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_DestroyStreamUPP; + enum { +- uppNPN_DestroyStreamProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +-}; +-#define NewNPN_DestroyStreamProc(FUNC) \ +- (NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture()) +-#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ +- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (reason)) ++ uppNPN_DestroyStreamProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++}; ++#define NewNPN_DestroyStreamProc(FUNC) \ ++ (NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture()) ++#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ ++ (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (reason)) + + #else + +-typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); +-#define NewNPN_DestroyStreamProc(FUNC) \ +- ((NPN_DestroyStreamUPP) (FUNC)) +-#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ +- (*(FUNC))((npp), (stream), (reason)) ++typedef NPError (* NP_LOADDS NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); ++#define NewNPN_DestroyStreamProc(FUNC) \ ++ ((NPN_DestroyStreamUPP) (FUNC)) ++#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ ++ (*(FUNC))((npp), (stream), (reason)) + + #endif + + + /* NPN_Status */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_StatusUPP; + enum { +- uppNPN_StatusProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) ++ uppNPN_StatusProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) + }; + +-#define NewNPN_StatusProc(FUNC) \ +- (NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture()) +-#define CallNPN_StatusProc(FUNC, npp, msg) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg)) ++#define NewNPN_StatusProc(FUNC) \ ++ (NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture()) ++#define CallNPN_StatusProc(FUNC, npp, msg) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg)) + + #else + +-typedef void (*NPN_StatusUPP)(NPP instance, const char* message); +-#define NewNPN_StatusProc(FUNC) \ +- ((NPN_StatusUPP) (FUNC)) +-#define CallNPN_StatusProc(FUNC, npp, msg) \ +- (*(FUNC))((npp), (msg)) ++typedef void (* NP_LOADDS NPN_StatusUPP)(NPP instance, const char* message); ++#define NewNPN_StatusProc(FUNC) \ ++ ((NPN_StatusUPP) (FUNC)) ++#define CallNPN_StatusProc(FUNC, npp, msg) \ ++ (*(FUNC))((npp), (msg)) + + #endif + + + /* NPN_UserAgent */ +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_UserAgentUPP; + enum { +@@ -771,7 +814,7 @@ + + #else + +-typedef const char* (*NPN_UserAgentUPP)(NPP instance); ++typedef const char* (* NP_LOADDS NPN_UserAgentUPP)(NPP instance); + #define NewNPN_UserAgentProc(FUNC) \ + ((NPN_UserAgentUPP) (FUNC)) + #define CallNPN_UserAgentProc(FUNC, ARG1) \ +@@ -781,80 +824,80 @@ + + + /* NPN_MemAlloc */ +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_MemAllocUPP; + enum { +- uppNPN_MemAllocProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) +- | RESULT_SIZE(SIZE_CODE(sizeof(void *))) ++ uppNPN_MemAllocProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(void *))) + }; + +-#define NewNPN_MemAllocProc(FUNC) \ +- (NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture()) +-#define CallNPN_MemAllocProc(FUNC, ARG1) \ +- (void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1)) ++#define NewNPN_MemAllocProc(FUNC) \ ++ (NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture()) ++#define CallNPN_MemAllocProc(FUNC, ARG1) \ ++ (void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1)) + + #else + +-typedef void* (*NPN_MemAllocUPP)(uint32 size); +-#define NewNPN_MemAllocProc(FUNC) \ +- ((NPN_MemAllocUPP) (FUNC)) +-#define CallNPN_MemAllocProc(FUNC, ARG1) \ +- (*(FUNC))((ARG1)) ++typedef void* (* NP_LOADDS NPN_MemAllocUPP)(uint32 size); ++#define NewNPN_MemAllocProc(FUNC) \ ++ ((NPN_MemAllocUPP) (FUNC)) ++#define CallNPN_MemAllocProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) + + #endif + + + /* NPN__MemFree */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_MemFreeUPP; + enum { +- uppNPN_MemFreeProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *))) ++ uppNPN_MemFreeProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *))) + }; + +-#define NewNPN_MemFreeProc(FUNC) \ +- (NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture()) +-#define CallNPN_MemFreeProc(FUNC, ARG1) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1)) ++#define NewNPN_MemFreeProc(FUNC) \ ++ (NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture()) ++#define CallNPN_MemFreeProc(FUNC, ARG1) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1)) + + #else + +-typedef void (*NPN_MemFreeUPP)(void* ptr); +-#define NewNPN_MemFreeProc(FUNC) \ +- ((NPN_MemFreeUPP) (FUNC)) +-#define CallNPN_MemFreeProc(FUNC, ARG1) \ +- (*(FUNC))((ARG1)) ++typedef void (* NP_LOADDS NPN_MemFreeUPP)(void* ptr); ++#define NewNPN_MemFreeProc(FUNC) \ ++ ((NPN_MemFreeUPP) (FUNC)) ++#define CallNPN_MemFreeProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) + + #endif + + + /* NPN_MemFlush */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_MemFlushUPP; + enum { +- uppNPN_MemFlushProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) +- | RESULT_SIZE(SIZE_CODE(sizeof(uint32))) ++ uppNPN_MemFlushProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(uint32))) + }; + +-#define NewNPN_MemFlushProc(FUNC) \ +- (NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture()) +-#define CallNPN_MemFlushProc(FUNC, ARG1) \ +- (uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1)) ++#define NewNPN_MemFlushProc(FUNC) \ ++ (NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture()) ++#define CallNPN_MemFlushProc(FUNC, ARG1) \ ++ (uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1)) + + #else + +-typedef uint32 (*NPN_MemFlushUPP)(uint32 size); +-#define NewNPN_MemFlushProc(FUNC) \ +- ((NPN_MemFlushUPP) (FUNC)) +-#define CallNPN_MemFlushProc(FUNC, ARG1) \ +- (*(FUNC))((ARG1)) ++typedef uint32 (* NP_LOADDS NPN_MemFlushUPP)(uint32 size); ++#define NewNPN_MemFlushProc(FUNC) \ ++ ((NPN_MemFlushUPP) (FUNC)) ++#define CallNPN_MemFlushProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) + + #endif + +@@ -862,172 +905,749 @@ + + /* NPN_ReloadPlugins */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_ReloadPluginsUPP; + enum { +- uppNPN_ReloadPluginsProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool))) +- | RESULT_SIZE(SIZE_CODE(0)) ++ uppNPN_ReloadPluginsProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool))) ++ | RESULT_SIZE(SIZE_CODE(0)) + }; + +-#define NewNPN_ReloadPluginsProc(FUNC) \ +- (NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture()) +-#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1)) ++#define NewNPN_ReloadPluginsProc(FUNC) \ ++ (NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture()) ++#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1)) + + #else + +-typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages); +-#define NewNPN_ReloadPluginsProc(FUNC) \ +- ((NPN_ReloadPluginsUPP) (FUNC)) +-#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ +- (*(FUNC))((ARG1)) ++typedef void (* NP_LOADDS NPN_ReloadPluginsUPP)(NPBool reloadPages); ++#define NewNPN_ReloadPluginsProc(FUNC) \ ++ ((NPN_ReloadPluginsUPP) (FUNC)) ++#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) + + #endif + +- + /* NPN_GetJavaEnv */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_GetJavaEnvUPP; + enum { +- uppNPN_GetJavaEnvProcInfo = kThinkCStackBased +- | RESULT_SIZE(SIZE_CODE(sizeof(JRIEnv*))) ++ uppNPN_GetJavaEnvProcInfo = kThinkCStackBased ++ | RESULT_SIZE(SIZE_CODE(sizeof(JRIEnv*))) + }; + +-#define NewNPN_GetJavaEnvProc(FUNC) \ +- (NPN_GetJavaEnvUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo, GetCurrentArchitecture()) +-#define CallNPN_GetJavaEnvProc(FUNC) \ +- (JRIEnv*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo) ++#define NewNPN_GetJavaEnvProc(FUNC) \ ++ (NPN_GetJavaEnvUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo, GetCurrentArchitecture()) ++#define CallNPN_GetJavaEnvProc(FUNC) \ ++ (JRIEnv*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo) + + #else +- +-typedef JRIEnv* (*NPN_GetJavaEnvUPP)(void); +-#define NewNPN_GetJavaEnvProc(FUNC) \ +- ((NPN_GetJavaEnvUPP) (FUNC)) +-#define CallNPN_GetJavaEnvProc(FUNC) \ +- (*(FUNC))() ++typedef JRIEnv* (* NP_LOADDS NPN_GetJavaEnvUPP)(void); ++#define NewNPN_GetJavaEnvProc(FUNC) \ ++ ((NPN_GetJavaEnvUPP) (FUNC)) ++#define CallNPN_GetJavaEnvProc(FUNC) \ ++ (*(FUNC))() + + #endif + + + /* NPN_GetJavaPeer */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_GetJavaPeerUPP; + enum { +- uppNPN_GetJavaPeerProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | RESULT_SIZE(SIZE_CODE(sizeof(jref))) ++ uppNPN_GetJavaPeerProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(jref))) + }; + +-#define NewNPN_GetJavaPeerProc(FUNC) \ +- (NPN_GetJavaPeerUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, GetCurrentArchitecture()) +-#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ +- (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, (ARG1)) ++#define NewNPN_GetJavaPeerProc(FUNC) \ ++ (NPN_GetJavaPeerUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, GetCurrentArchitecture()) ++#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, (ARG1)) + + #else + +-typedef jref (*NPN_GetJavaPeerUPP)(NPP instance); +-#define NewNPN_GetJavaPeerProc(FUNC) \ +- ((NPN_GetJavaPeerUPP) (FUNC)) +-#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ +- (*(FUNC))((ARG1)) ++typedef jref (* NP_LOADDS NPN_GetJavaPeerUPP)(NPP instance); ++#define NewNPN_GetJavaPeerProc(FUNC) \ ++ ((NPN_GetJavaPeerUPP) (FUNC)) ++#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) + + #endif + +- + /* NPN_InvalidateRect */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_InvalidateRectUPP; + enum { +- uppNPN_InvalidateRectProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRect *))) +- | RESULT_SIZE(SIZE_CODE(0)) ++ uppNPN_InvalidateRectProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRect *))) ++ | RESULT_SIZE(SIZE_CODE(0)) + }; + +-#define NewNPN_InvalidateRectProc(FUNC) \ +- (NPN_InvalidateRectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, GetCurrentArchitecture()) +-#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, (ARG1), (ARG2)) ++#define NewNPN_InvalidateRectProc(FUNC) \ ++ (NPN_InvalidateRectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, GetCurrentArchitecture()) ++#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, (ARG1), (ARG2)) + + #else + +-typedef void (*NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); +-#define NewNPN_InvalidateRectProc(FUNC) \ +- ((NPN_InvalidateRectUPP) (FUNC)) +-#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ +- (*(FUNC))((ARG1), (ARG2)) ++typedef void (* NP_LOADDS NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); ++#define NewNPN_InvalidateRectProc(FUNC) \ ++ ((NPN_InvalidateRectUPP) (FUNC)) ++#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) + + #endif + + + /* NPN_InvalidateRegion */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_InvalidateRegionUPP; + enum { +- uppNPN_InvalidateRegionProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRegion))) +- | RESULT_SIZE(SIZE_CODE(0)) ++ uppNPN_InvalidateRegionProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRegion))) ++ | RESULT_SIZE(SIZE_CODE(0)) + }; + +-#define NewNPN_InvalidateRegionProc(FUNC) \ +- (NPN_InvalidateRegionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, GetCurrentArchitecture()) +-#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ +- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, (ARG1), (ARG2)) ++#define NewNPN_InvalidateRegionProc(FUNC) \ ++ (NPN_InvalidateRegionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, GetCurrentArchitecture()) ++#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ ++ (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, (ARG1), (ARG2)) + + #else + +-typedef void (*NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); +-#define NewNPN_InvalidateRegionProc(FUNC) \ +- ((NPN_InvalidateRegionUPP) (FUNC)) +-#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ +- (*(FUNC))((ARG1), (ARG2)) ++typedef void (* NP_LOADDS NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); ++#define NewNPN_InvalidateRegionProc(FUNC) \ ++ ((NPN_InvalidateRegionUPP) (FUNC)) ++#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) + + #endif + + /* NPN_ForceRedraw */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPN_ForceRedrawUPP; + enum { +- uppNPN_ForceRedrawProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) +- | RESULT_SIZE(SIZE_CODE(sizeof(0))) ++ uppNPN_ForceRedrawProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(0))) ++}; ++ ++#define NewNPN_ForceRedrawProc(FUNC) \ ++ (NPN_ForceRedrawUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, GetCurrentArchitecture()) ++#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, (ARG1)) ++ ++#else ++ ++typedef void (* NP_LOADDS NPN_ForceRedrawUPP)(NPP instance); ++#define NewNPN_ForceRedrawProc(FUNC) \ ++ ((NPN_ForceRedrawUPP) (FUNC)) ++#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++/* NPN_GetStringIdentifier */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_GetStringIdentifierUPP; ++enum { ++ uppNPN_GetStringIdentifierProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const NPUTF8*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPIdentifier))) ++}; ++ ++#define NewNPN_GetStringIdentifierProc(FUNC) \ ++ (NPN_GetStringIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetStringIdentifierProcInfo, GetCurrentArchitecture()) ++#define CallNPN_GetStringIdentifierProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetStringIdentifierProcInfo, (ARG1)) ++ ++#else ++ ++typedef NPIdentifier (* NP_LOADDS NPN_GetStringIdentifierUPP)(const NPUTF8* name); ++#define NewNPN_GetStringIdentifierProc(FUNC) \ ++ ((NPN_GetStringIdentifierUPP) (FUNC)) ++#define CallNPN_GetStringIdentifierProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++/* NPN_GetStringIdentifiers */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_GetStringIdentifiersUPP; ++enum { ++ uppNPN_GetStringIdentifiersProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const NPUTF8**))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(int32_t))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier*))) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++ ++#define NewNPN_GetStringIdentifiersProc(FUNC) \ ++ (NPN_GetStringIdentifiersUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetStringIdentifiersProcInfo, GetCurrentArchitecture()) ++#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetStringIdentifiersProcInfo, (ARG1), (ARG2), (ARG3)) ++ ++#else ++ ++typedef void (* NP_LOADDS NPN_GetStringIdentifiersUPP)(const NPUTF8** names, ++ int32_t nameCount, ++ NPIdentifier* identifiers); ++#define NewNPN_GetStringIdentifiersProc(FUNC) \ ++ ((NPN_GetStringIdentifiersUPP) (FUNC)) ++#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++#endif ++ ++/* NPN_GetIntIdentifier */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_GetIntIdentifierUPP; ++enum { ++ uppNPN_GetIntIdentifierProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(int32_t))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPIdentifier))) ++}; ++ ++#define NewNPN_GetIntIdentifierProc(FUNC) \ ++ (NPN_GetIntIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetIntIdentifierProcInfo, GetCurrentArchitecture()) ++#define CallNPN_GetIntIdentifierProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetIntIdentifierProcInfo, (ARG1)) ++ ++#else ++ ++typedef NPIdentifier (* NP_LOADDS NPN_GetIntIdentifierUPP)(int32_t intid); ++#define NewNPN_GetIntIdentifierProc(FUNC) \ ++ ((NPN_GetIntIdentifierUPP) (FUNC)) ++#define CallNPN_GetIntIdentifierProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++/* NPN_IdentifierIsString */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_IdentifierIsStringUPP; ++enum { ++ uppNPN_IdentifierIsStringProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier identifier))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(bool))) ++}; ++ ++#define NewNPN_IdentifierIsStringProc(FUNC) \ ++ (NPN_IdentifierIsStringUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_IdentifierIsStringProcInfo, GetCurrentArchitecture()) ++#define CallNPN_IdentifierIsStringProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_IdentifierIsStringProcInfo, (ARG1)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_IdentifierIsStringUPP)(NPIdentifier identifier); ++#define NewNPN_IdentifierIsStringProc(FUNC) \ ++ ((NPN_IdentifierIsStringUPP) (FUNC)) ++#define CallNPN_IdentifierIsStringProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++/* NPN_UTF8FromIdentifier */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_UTF8FromIdentifierUPP; ++enum { ++ uppNPN_UTF8FromIdentifierProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPUTF8*))) ++}; ++ ++#define NewNPN_UTF8FromIdentifierProc(FUNC) \ ++ (NPN_UTF8FromIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UTF8FromIdentifierProcInfo, GetCurrentArchitecture()) ++#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UTF8FromIdentifierProcInfo, (ARG1)) ++ ++#else ++ ++typedef NPUTF8* (* NP_LOADDS NPN_UTF8FromIdentifierUPP)(NPIdentifier identifier); ++#define NewNPN_UTF8FromIdentifierProc(FUNC) \ ++ ((NPN_UTF8FromIdentifierUPP) (FUNC)) ++#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++/* NPN_IntFromIdentifier */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_IntFromIdentifierUPP; ++enum { ++ uppNPN_IntFromIdentifierProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(int32_t))) ++}; ++ ++#define NewNPN_IntFromIdentifierProc(FUNC) \ ++ (NPN_IntFromIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_IntFromIdentifierProcInfo, GetCurrentArchitecture()) ++#define CallNPN_IntFromIdentifierProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_IntFromIdentifierProcInfo, (ARG1)) ++ ++#else ++ ++typedef int32_t (* NP_LOADDS NPN_IntFromIdentifierUPP)(NPIdentifier identifier); ++#define NewNPN_IntFromIdentifierProc(FUNC) \ ++ ((NPN_IntFromIdentifierUPP) (FUNC)) ++#define CallNPN_IntFromIdentifierProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++/* NPN_CreateObject */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_CreateObjectUPP; ++enum { ++ uppNPN_CreateObjectProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPClass*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPObject*))) ++}; ++ ++#define NewNPN_CreateObjectProc(FUNC) \ ++ (NPN_CreateObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_CreateObjectProcInfo, GetCurrentArchitecture()) ++#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_CreateObjectProcInfo, (ARG1), (ARG2)) ++ ++#else ++ ++typedef NPObject* (* NP_LOADDS NPN_CreateObjectUPP)(NPP npp, NPClass *aClass); ++#define NewNPN_CreateObjectProc(FUNC) \ ++ ((NPN_CreateObjectUPP) (FUNC)) ++#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) ++ ++#endif ++ ++/* NPN_RetainObject */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_RetainObjectUPP; ++enum { ++ uppNPN_RetainObjectProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPObject*))) ++}; ++ ++#define NewNPN_RetainObjectProc(FUNC) \ ++ (NPN_RetainObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RetainObjectProcInfo, GetCurrentArchitecture()) ++#define CallNPN_RetainObjectProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RetainObjectProcInfo, (ARG1)) ++ ++#else ++ ++typedef NPObject* (* NP_LOADDS NPN_RetainObjectUPP)(NPObject *obj); ++#define NewNPN_RetainObjectProc(FUNC) \ ++ ((NPN_RetainObjectUPP) (FUNC)) ++#define CallNPN_RetainObjectProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++/* NPN_ReleaseObject */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_ReleaseObjectUPP; ++enum { ++ uppNPN_ReleaseObjectProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*))) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++ ++#define NewNPN_ReleaseObjectProc(FUNC) \ ++ (NPN_ReleaseObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReleaseObjectProcInfo, GetCurrentArchitecture()) ++#define CallNPN_ReleaseObjectProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReleaseObjectProcInfo, (ARG1)) ++ ++#else ++ ++typedef void (* NP_LOADDS NPN_ReleaseObjectUPP)(NPObject *obj); ++#define NewNPN_ReleaseObjectProc(FUNC) \ ++ ((NPN_ReleaseObjectUPP) (FUNC)) ++#define CallNPN_ReleaseObjectProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++/* NPN_Invoke */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_InvokeUPP; ++enum { ++ uppNPN_InvokeProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*))) ++ | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint32_t))) ++ | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPVariant*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(bool))) ++}; ++ ++#define NewNPN_InvokeProc(FUNC) \ ++ (NPN_InvokeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvokeProcInfo, GetCurrentArchitecture()) ++#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvokeProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_InvokeUPP)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); ++#define NewNPN_InvokeProc(FUNC) \ ++ ((NPN_InvokeUPP) (FUNC)) ++#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) ++ ++#endif ++ ++/* NPN_InvokeDefault */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_InvokeDefaultUPP; ++enum { ++ uppNPN_InvokeDefaultProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*))) ++ | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint32_t))) ++ | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPVariant*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(bool))) + }; + +-#define NewNPN_ForceRedrawProc(FUNC) \ +- (NPN_ForceRedrawUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, GetCurrentArchitecture()) +-#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ +- (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, (ARG1)) ++#define NewNPN_InvokeDefaultProc(FUNC) \ ++ (NPN_InvokeDefaultUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvokeDefaultProcInfo, GetCurrentArchitecture()) ++#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvokeDefaultProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) + + #else + +-typedef void (*NPN_ForceRedrawUPP)(NPP instance); +-#define NewNPN_ForceRedrawProc(FUNC) \ +- ((NPN_ForceRedrawUPP) (FUNC)) +-#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ +- (*(FUNC))((ARG1)) ++typedef bool (* NP_LOADDS NPN_InvokeDefaultUPP)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); ++#define NewNPN_InvokeDefaultProc(FUNC) \ ++ ((NPN_InvokeDefaultUPP) (FUNC)) ++#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) + + #endif + ++/* NPN_Evaluate */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_EvaluateUPP; ++enum { ++ uppNPN_EvaluateProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPString*))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPVariant*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(bool))) ++}; ++ ++#define NewNPN_EvaluateProc(FUNC) \ ++ (NPN_EvaluateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_EvaluateProcInfo, GetCurrentArchitecture()) ++#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_EvaluateProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_EvaluateUPP)(NPP npp, NPObject *obj, NPString *script, NPVariant *result); ++#define NewNPN_EvaluateProc(FUNC) \ ++ ((NPN_EvaluateUPP) (FUNC)) ++#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) ++ ++#endif ++ ++/* NPN_GetProperty */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_GetPropertyUPP; ++enum { ++ uppNPN_GetPropertyProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPVariant*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(bool))) ++}; ++ ++#define NewNPN_GetPropertyProc(FUNC) \ ++ (NPN_GetPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetPropertyProcInfo, GetCurrentArchitecture()) ++#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetPropertyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_GetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result); ++#define NewNPN_GetPropertyProc(FUNC) \ ++ ((NPN_GetPropertyUPP) (FUNC)) ++#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) ++ ++#endif ++ ++/* NPN_SetProperty */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_SetPropertyUPP; ++enum { ++ uppNPN_SetPropertyProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) ++ | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(bool))) ++}; ++ ++#define NewNPN_SetPropertyProc(FUNC) \ ++ (NPN_SetPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetPropertyProcInfo, GetCurrentArchitecture()) ++#define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetPropertyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_SetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value); ++#define NewNPN_SetPropertyProc(FUNC) \ ++ ((NPN_SetPropertyUPP) (FUNC)) ++#define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) ++ ++#endif ++ ++/* NPN_RemoveProperty */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_RemovePropertyUPP; ++enum { ++ uppNPN_RemovePropertyProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(bool))) ++}; ++ ++#define NewNPN_RemovePropertyProc(FUNC) \ ++ (NPN_RemovePropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RemovePropertyProcInfo, GetCurrentArchitecture()) ++#define CallNPN_RemovePropertyProc(FUNC, ARG1, ARG2, ARG3) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RemovePropertyProcInfo, (ARG1), (ARG2), (ARG3)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_RemovePropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); ++#define NewNPN_RemovePropertyProc(FUNC) \ ++ ((NPN_RemovePropertyUPP) (FUNC)) ++#define CallNPN_RemovePropertyProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++#endif ++ ++/* NPN_HasProperty */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_HasPropertyUPP; ++enum { ++ uppNPN_HasPropertyProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(bool))) ++}; ++ ++#define NewNPN_HasPropertyProc(FUNC) \ ++ (NPN_HasPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_HasPropertyProcInfo, GetCurrentArchitecture()) ++#define CallNPN_HasPropertyProc(FUNC, ARG1, ARG2, ARG3) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_HasPropertyProcInfo, (ARG1), (ARG2), (ARG3)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_HasPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); ++#define NewNPN_HasPropertyProc(FUNC) \ ++ ((NPN_HasPropertyUPP) (FUNC)) ++#define CallNPN_HasPropertyProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++#endif ++ ++/* NPN_HasMethod */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_HasMethodUPP; ++enum { ++ uppNPN_HasMethodProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(bool))) ++}; ++ ++#define NewNPN_HasMethodProc(FUNC) \ ++ (NPN_HasMethodUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_HasMethodProcInfo, GetCurrentArchitecture()) ++#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_HasMethodProcInfo, (ARG1), (ARG2), (ARG3)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_HasMethodUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); ++#define NewNPN_HasMethodProc(FUNC) \ ++ ((NPN_HasMethodUPP) (FUNC)) ++#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++#endif ++ ++/* NPN_ReleaseVariantValue */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_ReleaseVariantValue; ++enum { ++ uppNPN_ReleaseVariantValueProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPVariant*))) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++ ++#define NewNPN_ReleaseVariantValueProc(FUNC) \ ++ (NPN_ReleaseVariantValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReleaseVariantValueProcInfo, GetCurrentArchitecture()) ++#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReleaseVariantValueProcInfo, (ARG1)) ++ ++#else ++ ++typedef void (* NP_LOADDS NPN_ReleaseVariantValueUPP)(NPVariant *variant); ++#define NewNPN_ReleaseVariantValueProc(FUNC) \ ++ ((NPN_ReleaseVariantValueUPP) (FUNC)) ++#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++/* NPN_SetException */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_SetExceptionUPP; ++enum { ++ uppNPN_SetExceptionProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const NPUTF8*))) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++ ++#define NewNPN_SetExceptionProc(FUNC) \ ++ (NPN_SetExceptionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetExceptionProcInfo, GetCurrentArchitecture()) ++#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetExceptionProcInfo, (ARG1), (ARG2)) ++ ++#else ++ ++typedef void (* NP_LOADDS NPN_SetExceptionUPP)(NPObject *obj, const NPUTF8 *message); ++#define NewNPN_SetExceptionProc(FUNC) \ ++ ((NPN_SetExceptionUPP) (FUNC)) ++#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) ++ ++#endif ++ ++/* NPN_PushPopupsEnabledStateUPP */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_PushPopupsEnabledStateUPP; ++enum { ++ uppNPN_PushPopupsEnabledStateProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPBool))) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++ ++#define NewNPN_PushPopupsEnabledStateProc(FUNC) \ ++ (NPN_PushPopupsEnabledStateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PushPopupsEnabledStateProcInfo, GetCurrentArchitecture()) ++#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PushPopupsEnabledStateProcInfo, (ARG1), (ARG2)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_PushPopupsEnabledStateUPP)(NPP npp, NPBool enabled); ++#define NewNPN_PushPopupsEnabledStateProc(FUNC) \ ++ ((NPN_PushPopupsEnabledStateUPP) (FUNC)) ++#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) ++ ++#endif ++ ++/* NPN_PopPopupsEnabledState */ ++ ++#if _NPUPP_USE_UPP_ ++ ++typedef UniversalProcPtr NPN_PopPopupsEnabledStateUPP; ++enum { ++ uppNPN_PopPopupsEnabledStateProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) ++ | RESULT_SIZE(SIZE_CODE(0)) ++}; ++ ++#define NewNPN_PopPopupsEnabledStateProc(FUNC) \ ++ (NPN_PopPopupsEnabledStateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PopPopupsEnabledStateProcInfo, GetCurrentArchitecture()) ++#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \ ++ (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PopPopupsEnabledStateProcInfo, (ARG1)) ++ ++#else ++ ++typedef bool (* NP_LOADDS NPN_PopPopupsEnabledStateUPP)(NPP npp); ++#define NewNPN_PopPopupsEnabledStateProc(FUNC) \ ++ ((NPN_PopPopupsEnabledStateUPP) (FUNC)) ++#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif ++ ++ + + /****************************************************************************************** + * The actual plugin function table definitions + *******************************************************************************************/ + + #ifdef XP_MAC +-#pragma align=mac68k ++#if PRAGMA_STRUCT_ALIGN ++#pragma options align=mac68k ++#endif + #endif + + typedef struct _NPPluginFuncs { +@@ -1073,14 +1693,37 @@ + NPN_InvalidateRectUPP invalidaterect; + NPN_InvalidateRegionUPP invalidateregion; + NPN_ForceRedrawUPP forceredraw; ++ NPN_GetStringIdentifierUPP getstringidentifier; ++ NPN_GetStringIdentifiersUPP getstringidentifiers; ++ NPN_GetIntIdentifierUPP getintidentifier; ++ NPN_IdentifierIsStringUPP identifierisstring; ++ NPN_UTF8FromIdentifierUPP utf8fromidentifier; ++ NPN_IntFromIdentifierUPP intfromidentifier; ++ NPN_CreateObjectUPP createobject; ++ NPN_RetainObjectUPP retainobject; ++ NPN_ReleaseObjectUPP releaseobject; ++ NPN_InvokeUPP invoke; ++ NPN_InvokeDefaultUPP invokeDefault; ++ NPN_EvaluateUPP evaluate; ++ NPN_GetPropertyUPP getproperty; ++ NPN_SetPropertyUPP setproperty; ++ NPN_RemovePropertyUPP removeproperty; ++ NPN_HasPropertyUPP hasproperty; ++ NPN_HasMethodUPP hasmethod; ++ NPN_ReleaseVariantValueUPP releasevariantvalue; ++ NPN_SetExceptionUPP setexception; ++ NPN_PushPopupsEnabledStateUPP pushpopupsenabledstate; ++ NPN_PopPopupsEnabledStateUPP poppopupsenabledstate; + } NPNetscapeFuncs; + + #ifdef XP_MAC +-#pragma align=reset ++#if PRAGMA_STRUCT_ALIGN ++#pragma options align=reset ++#endif + #endif + + +-#ifdef XP_MAC ++#if defined(XP_MAC) || defined(XP_MACOSX) + /****************************************************************************************** + * Mac platform-specific plugin glue stuff + *******************************************************************************************/ +@@ -1092,52 +1735,137 @@ + * and NPPShutdownUPP for Netscape's use. + */ + +-#if GENERATINGCFM ++#if _NPUPP_USE_UPP_ + + typedef UniversalProcPtr NPP_MainEntryUPP; + enum { +- uppNPP_MainEntryProcInfo = kThinkCStackBased +- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*))) +- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*))) +- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*))) +- | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +-}; +-#define NewNPP_MainEntryProc(FUNC) \ +- (NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture()) +-#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ +- CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP)) ++ uppNPP_MainEntryProcInfo = kThinkCStackBased ++ | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*))) ++ | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*))) ++ | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*))) ++ | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) ++}; ++#define NewNPP_MainEntryProc(FUNC) \ ++ (NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture()) ++#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ ++ CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP)) + + #else + +-typedef NPError (*NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); +-#define NewNPP_MainEntryProc(FUNC) \ +- ((NPP_MainEntryUPP) (FUNC)) +-#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ +- (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) ++typedef NPError (* NP_LOADDS NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); ++#define NewNPP_MainEntryProc(FUNC) \ ++ ((NPP_MainEntryUPP) (FUNC)) ++#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ ++ (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) ++ ++#endif ++ ++ ++/* ++ * Mac version(s) of NP_GetMIMEDescription(const char *) ++ * These can be called to retreive MIME information from the plugin dynamically ++ * ++ * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way ++ * to get mime info from the plugin only on OSX and may not be supported ++ * in furture version--use NP_GetMIMEDescription instead ++ */ ++ ++enum ++{ ++ kBPSupportedMIMETypesStructVers_1 = 1 ++}; ++ ++typedef struct _BPSupportedMIMETypes ++{ ++ SInt32 structVersion; /* struct version */ ++ Handle typeStrings; /* STR# formated handle, allocated by plug-in */ ++ Handle infoStrings; /* STR# formated handle, allocated by plug-in */ ++} BPSupportedMIMETypes; ++OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); ++ ++#if _NPUPP_USE_UPP_ ++ ++#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescriptionRD" ++typedef UniversalProcPtr NP_GetMIMEDescriptionUPP; ++enum { ++ uppNP_GetMIMEDescEntryProc = kThinkCStackBased ++ | RESULT_SIZE(SIZE_CODE(sizeof(const char *))) ++}; ++#define NewNP_GetMIMEDescEntryProc(FUNC) \ ++ (NP_GetMIMEDescriptionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNP_GetMIMEDescEntryProc, GetCurrentArchitecture()) ++#define CallNP_GetMIMEDescEntryProc(FUNC) \ ++ (const char *)CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNP_GetMIMEDescEntryProc) ++ ++ ++#else /* !_NPUPP_USE_UPP_ */ ++ ++ /* NP_GetMIMEDescription */ ++#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" ++typedef const char* (* NP_LOADDS NP_GetMIMEDescriptionUPP)(); ++#define NewNP_GetMIMEDescEntryProc(FUNC) \ ++ ((NP_GetMIMEDescriptionUPP) (FUNC)) ++#define CallNP_GetMIMEDescEntryProc(FUNC) \ ++ (*(FUNC))() ++/* BP_GetSupportedMIMETypes */ ++typedef OSErr (* NP_LOADDS BP_GetSupportedMIMETypesUPP)(BPSupportedMIMETypes*, UInt32); ++#define NewBP_GetSupportedMIMETypesEntryProc(FUNC) \ ++ ((BP_GetSupportedMIMETypesUPP) (FUNC)) ++#define CallBP_GetMIMEDescEntryProc(FUNC, mimeInfo, flags) \ ++ (*(FUNC))((mimeInfo), (flags)) + + #endif + #endif /* MAC */ + ++#if defined(_WINDOWS) ++#define OSCALL WINAPI ++#else ++#if defined(__OS2__) ++#define OSCALL _System ++#else ++#define OSCALL ++#endif ++#endif + +-#ifdef _WINDOWS ++#if defined( _WINDOWS ) || defined (__OS2__) + + #ifdef __cplusplus + extern "C" { + #endif + + /* plugin meta member functions */ ++#if defined(__OS2__) ++ ++typedef struct _NPPluginData { /* Alternate OS2 Plugin interface */ ++ char *pMimeTypes; ++ char *pFileExtents; ++ char *pFileOpenTemplate; ++ char *pProductName; ++ char *pProductDescription; ++ unsigned long dwProductVersionMS; ++ unsigned long dwProductVersionLS; ++} NPPluginData; ++ ++NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData); ++ ++#endif ++ ++NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs); + +-NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs); ++NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs); + +-NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs); ++NPError OSCALL NP_Shutdown(); + +-NPError WINAPI NP_Shutdown(); ++char* NP_GetMIMEDescription(); + + #ifdef __cplusplus + } + #endif + +-#endif /* _WINDOWS */ ++#endif /* _WINDOWS || __OS2__ */ ++ ++#if defined(__OS2__) ++#pragma pack() ++#endif + + #ifdef XP_UNIX + +@@ -1147,9 +1875,10 @@ + + /* plugin meta member functions */ + +-char* NP_GetMIMEDescription(void); +-NPError NP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*); +-NPError NP_Shutdown(void); ++char* NP_GetMIMEDescription(void); ++NPError NP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*); ++NPError NP_Shutdown(void); ++NPError NP_GetValue(void *future, NPPVariable aVariable, void *aValue); + + #ifdef __cplusplus + } +diff -urN kdebase-3.5.2/nsplugins/sdk/obsolete/protypes.h new/nsplugins/sdk/obsolete/protypes.h +--- kdebase-3.5.2/nsplugins/sdk/obsolete/protypes.h 1970-01-01 00:00:00.000000000 +0000 ++++ new/nsplugins/sdk/obsolete/protypes.h 2008-01-29 22:53:08.000000000 +0000 +@@ -0,0 +1,251 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ++ * The contents of this file are subject to the Mozilla Public ++ * License Version 1.1 (the "License"); you may not use this file ++ * except in compliance with the License. You may obtain a copy of ++ * the License at http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS ++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or ++ * implied. See the License for the specific language governing ++ * rights and limitations under the License. ++ * ++ * The Original Code is the Netscape Portable Runtime (NSPR). ++ * ++ * The Initial Developer of the Original Code is Netscape ++ * Communications Corporation. Portions created by Netscape are ++ * Copyright (C) 1998-2000 Netscape Communications Corporation. All ++ * Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 or later (the ++ * "GPL"), in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your ++ * version of this file only under the terms of the GPL and not to ++ * allow others to use your version of this file under the MPL, ++ * indicate your decision by deleting the provisions above and ++ * replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient ++ * may use your version of this file under either the MPL or the ++ * GPL. ++ */ ++ ++/* ++ * This header typedefs the old 'native' types to the new PRs. ++ * These definitions are scheduled to be eliminated at the earliest ++ * possible time. The NSPR API is implemented and documented using ++ * the new definitions. ++ */ ++ ++#if !defined(PROTYPES_H) ++#define PROTYPES_H ++ ++typedef PRUintn uintn; ++#ifndef _XP_Core_ ++typedef PRIntn intn; ++#endif ++ ++/* ++ * It is trickier to define uint, int8, uint8, int16, uint16, ++ * int32, uint32, int64, and uint64 because some of these int ++ * types are defined by standard header files on some platforms. ++ * Our strategy here is to include all such standard headers ++ * first, and then define these int types only if they are not ++ * defined by those standard headers. ++ */ ++ ++/* ++ * BeOS defines all the int types below in its standard header ++ * file SupportDefs.h. ++ */ ++#ifdef XP_BEOS ++#include ++#endif ++ ++/* ++ * OpenVMS defines all the int types below in its standard ++ * header files ints.h and types.h. ++ */ ++#ifdef VMS ++#include ++#include ++#endif ++ ++/* ++ * SVR4 typedef of uint is commonly found on UNIX machines. ++ * ++ * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h) ++ * defines the types int8, int16, int32, and int64. ++ */ ++#ifdef XP_UNIX ++#include ++#endif ++ ++/* model.h on HP-UX defines int8, int16, and int32. */ ++#ifdef HPUX ++#include ++#endif ++ ++/* ++ * uint ++ */ ++ ++#if !defined(XP_BEOS) && !defined(VMS) \ ++ && !defined(XP_UNIX) || defined(NTO) ++typedef PRUintn uint; ++#endif ++ ++/* ++ * uint64 ++ */ ++ ++#if !defined(XP_BEOS) && !defined(VMS) ++typedef PRUint64 uint64; ++#endif ++ ++/* ++ * uint32 ++ */ ++ ++#if !defined(XP_BEOS) && !defined(VMS) ++#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) ++typedef PRUint32 uint32; ++#else ++typedef unsigned long uint32; ++#endif ++#endif ++ ++/* ++ * uint16 ++ */ ++ ++#if !defined(XP_BEOS) && !defined(VMS) ++typedef PRUint16 uint16; ++#endif ++ ++/* ++ * uint8 ++ */ ++ ++#if !defined(XP_BEOS) && !defined(VMS) ++typedef PRUint8 uint8; ++#endif ++ ++/* ++ * int64 ++ */ ++ ++#if !defined(XP_BEOS) && !defined(VMS) \ ++ && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) ++typedef PRInt64 int64; ++#endif ++ ++/* ++ * int32 ++ */ ++ ++#if !defined(XP_BEOS) && !defined(VMS) \ ++ && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ ++ && !defined(HPUX) ++#if !defined(WIN32) || !defined(_WINSOCK2API_) /* defines its own "int32" */ ++#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) ++typedef PRInt32 int32; ++#else ++typedef long int32; ++#endif ++#endif ++#endif ++ ++/* ++ * int16 ++ */ ++ ++#if !defined(XP_BEOS) && !defined(VMS) \ ++ && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ ++ && !defined(HPUX) ++typedef PRInt16 int16; ++#endif ++ ++/* ++ * int8 ++ */ ++ ++#if !defined(XP_BEOS) && !defined(VMS) \ ++ && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ ++ && !defined(HPUX) ++typedef PRInt8 int8; ++#endif ++ ++typedef PRFloat64 float64; ++typedef PRUptrdiff uptrdiff_t; ++typedef PRUword uprword_t; ++typedef PRWord prword_t; ++ ++ ++/* Re: prbit.h */ ++#define TEST_BIT PR_TEST_BIT ++#define SET_BIT PR_SET_BIT ++#define CLEAR_BIT PR_CLEAR_BIT ++ ++/* Re: prarena.h->plarena.h */ ++#define PRArena PLArena ++#define PRArenaPool PLArenaPool ++#define PRArenaStats PLArenaStats ++#define PR_ARENA_ALIGN PL_ARENA_ALIGN ++#define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL ++#define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE ++#define PR_ARENA_GROW PL_ARENA_GROW ++#define PR_ARENA_MARK PL_ARENA_MARK ++#define PR_CLEAR_UNUSED PL_CLEAR_UNUSED ++#define PR_CLEAR_ARENA PL_CLEAR_ARENA ++#define PR_ARENA_RELEASE PL_ARENA_RELEASE ++#define PR_COUNT_ARENA PL_COUNT_ARENA ++#define PR_ARENA_DESTROY PL_ARENA_DESTROY ++#define PR_InitArenaPool PL_InitArenaPool ++#define PR_FreeArenaPool PL_FreeArenaPool ++#define PR_FinishArenaPool PL_FinishArenaPool ++#define PR_CompactArenaPool PL_CompactArenaPool ++#define PR_ArenaFinish PL_ArenaFinish ++#define PR_ArenaAllocate PL_ArenaAllocate ++#define PR_ArenaGrow PL_ArenaGrow ++#define PR_ArenaRelease PL_ArenaRelease ++#define PR_ArenaCountAllocation PL_ArenaCountAllocation ++#define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth ++#define PR_ArenaCountGrowth PL_ArenaCountGrowth ++#define PR_ArenaCountRelease PL_ArenaCountRelease ++#define PR_ArenaCountRetract PL_ArenaCountRetract ++ ++/* Re: prhash.h->plhash.h */ ++#define PRHashEntry PLHashEntry ++#define PRHashTable PLHashTable ++#define PRHashNumber PLHashNumber ++#define PRHashFunction PLHashFunction ++#define PRHashComparator PLHashComparator ++#define PRHashEnumerator PLHashEnumerator ++#define PRHashAllocOps PLHashAllocOps ++#define PR_NewHashTable PL_NewHashTable ++#define PR_HashTableDestroy PL_HashTableDestroy ++#define PR_HashTableRawLookup PL_HashTableRawLookup ++#define PR_HashTableRawAdd PL_HashTableRawAdd ++#define PR_HashTableRawRemove PL_HashTableRawRemove ++#define PR_HashTableAdd PL_HashTableAdd ++#define PR_HashTableRemove PL_HashTableRemove ++#define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries ++#define PR_HashTableLookup PL_HashTableLookup ++#define PR_HashTableDump PL_HashTableDump ++#define PR_HashString PL_HashString ++#define PR_CompareStrings PL_CompareStrings ++#define PR_CompareValues PL_CompareValues ++ ++#if defined(XP_MAC) ++#ifndef TRUE /* Mac standard is lower case true */ ++ #define TRUE 1 ++#endif ++#ifndef FALSE /* Mac standard is lower case false */ ++ #define FALSE 0 ++#endif ++#endif ++ ++#endif /* !defined(PROTYPES_H) */ +diff -urN kdebase-3.5.2/nsplugins/sdk/prcpucfg.h new/nsplugins/sdk/prcpucfg.h +--- kdebase-3.5.2/nsplugins/sdk/prcpucfg.h 1970-01-01 00:00:00.000000000 +0000 ++++ new/nsplugins/sdk/prcpucfg.h 2008-01-29 22:53:08.000000000 +0000 +@@ -0,0 +1,661 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is the Netscape Portable Runtime (NSPR). ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998-2000 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef nspr_cpucfg___ ++#define nspr_cpucfg___ ++ ++#ifndef XP_UNIX ++#define XP_UNIX ++#endif ++ ++#ifndef LINUX ++#define LINUX ++#endif ++ ++#define PR_AF_INET6 10 /* same as AF_INET6 */ ++ ++#ifdef __powerpc__ ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__alpha) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__ia64__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__x86_64__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__mc68000__) ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 2 ++#define PR_ALIGN_OF_LONG 2 ++#define PR_ALIGN_OF_INT64 2 ++#define PR_ALIGN_OF_FLOAT 2 ++#define PR_ALIGN_OF_DOUBLE 2 ++#define PR_ALIGN_OF_POINTER 2 ++#define PR_ALIGN_OF_WORD 2 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__sparc__) || (defined(__SUNPRO_CC) && defined(__sparc)) ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__i386__) || (defined(__SUNPRO_CC) && defined(__i386)) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__mips__) ++ ++#ifdef __MIPSEB__ ++#define IS_BIG_ENDIAN 1 ++#undef IS_LITTLE_ENDIAN ++#elif defined(__MIPSEL__) ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#else ++#error "Unknown MIPS endianness." ++#endif ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__arm__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__hppa__) ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__s390x__) ++ ++#define IS_BIG_ENDIAN 1 ++#undef IS_LITTLE_ENDIAN ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__s390__) ++ ++#define IS_BIG_ENDIAN 1 ++#undef IS_LITTLE_ENDIAN ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#else ++ ++#error "Unknown CPU architecture" ++ ++#endif ++ ++#define HAVE_LONG_LONG 1 ++#if PR_ALIGN_OF_DOUBLE == 8 ++#define HAVE_ALIGNED_DOUBLES ++#endif ++#if PR_ALIGN_OF_INT64 == 8 ++#define HAVE_ALIGNED_LONGLONGS ++#endif ++ ++#ifndef NO_NSPR_10_SUPPORT ++ ++#define BYTES_PER_BYTE PR_BYTES_PER_BYTE ++#define BYTES_PER_SHORT PR_BYTES_PER_SHORT ++#define BYTES_PER_INT PR_BYTES_PER_INT ++#define BYTES_PER_INT64 PR_BYTES_PER_INT64 ++#define BYTES_PER_LONG PR_BYTES_PER_LONG ++#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT ++#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE ++#define BYTES_PER_WORD PR_BYTES_PER_WORD ++#define BYTES_PER_DWORD PR_BYTES_PER_DWORD ++ ++#define BITS_PER_BYTE PR_BITS_PER_BYTE ++#define BITS_PER_SHORT PR_BITS_PER_SHORT ++#define BITS_PER_INT PR_BITS_PER_INT ++#define BITS_PER_INT64 PR_BITS_PER_INT64 ++#define BITS_PER_LONG PR_BITS_PER_LONG ++#define BITS_PER_FLOAT PR_BITS_PER_FLOAT ++#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE ++#define BITS_PER_WORD PR_BITS_PER_WORD ++ ++#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 ++#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 ++#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 ++#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 ++#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 ++#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 ++#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 ++#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 ++ ++#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT ++#define ALIGN_OF_INT PR_ALIGN_OF_INT ++#define ALIGN_OF_LONG PR_ALIGN_OF_LONG ++#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 ++#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT ++#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE ++#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER ++#define ALIGN_OF_WORD PR_ALIGN_OF_WORD ++ ++#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 ++#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 ++#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 ++ ++#endif /* NO_NSPR_10_SUPPORT */ ++ ++#endif /* nspr_cpucfg___ */ +diff -urN kdebase-3.5.2/nsplugins/sdk/prtypes.h new/nsplugins/sdk/prtypes.h +--- kdebase-3.5.2/nsplugins/sdk/prtypes.h 1970-01-01 00:00:00.000000000 +0000 ++++ new/nsplugins/sdk/prtypes.h 2008-01-29 22:53:08.000000000 +0000 +@@ -0,0 +1,543 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ++ * The contents of this file are subject to the Mozilla Public ++ * License Version 1.1 (the "License"); you may not use this file ++ * except in compliance with the License. You may obtain a copy of ++ * the License at http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS ++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or ++ * implied. See the License for the specific language governing ++ * rights and limitations under the License. ++ * ++ * The Original Code is the Netscape Portable Runtime (NSPR). ++ * ++ * The Initial Developer of the Original Code is Netscape ++ * Communications Corporation. Portions created by Netscape are ++ * Copyright (C) 1998-2000 Netscape Communications Corporation. All ++ * Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 or later (the ++ * "GPL"), in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your ++ * version of this file only under the terms of the GPL and not to ++ * allow others to use your version of this file under the MPL, ++ * indicate your decision by deleting the provisions above and ++ * replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient ++ * may use your version of this file under either the MPL or the ++ * GPL. ++ */ ++ ++/* ++** File: prtypes.h ++** Description: Definitions of NSPR's basic types ++** ++** Prototypes and macros used to make up for deficiencies in ANSI environments ++** that we have found. ++** ++** Since we do not wrap and all the other standard headers, authors ++** of portable code will not know in general that they need these definitions. ++** Instead of requiring these authors to find the dependent uses in their code ++** and take the following steps only in those C files, we take steps once here ++** for all C files. ++**/ ++ ++#ifndef prtypes_h___ ++#define prtypes_h___ ++ ++#ifdef MDCPUCFG ++#include MDCPUCFG ++#else ++#include "prcpucfg.h" ++#endif ++ ++#include ++ ++/*********************************************************************** ++** MACROS: PR_EXTERN ++** PR_IMPLEMENT ++** DESCRIPTION: ++** These are only for externally visible routines and globals. For ++** internal routines, just use "extern" for type checking and that ++** will not export internal cross-file or forward-declared symbols. ++** Define a macro for declaring procedures return types. We use this to ++** deal with windoze specific type hackery for DLL definitions. Use ++** PR_EXTERN when the prototype for the method is declared. Use ++** PR_IMPLEMENT for the implementation of the method. ++** ++** Example: ++** in dowhim.h ++** PR_EXTERN( void ) DoWhatIMean( void ); ++** in dowhim.c ++** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; } ++** ++** ++***********************************************************************/ ++#if defined(WIN32) ++ ++#if defined(__GNUC__) ++#undef _declspec ++#define _declspec(x) __declspec(x) ++#endif ++ ++#define PR_EXPORT(__type) extern _declspec(dllexport) __type ++#define PR_EXPORT_DATA(__type) extern _declspec(dllexport) __type ++#define PR_IMPORT(__type) _declspec(dllimport) __type ++#define PR_IMPORT_DATA(__type) _declspec(dllimport) __type ++ ++#define PR_EXTERN(__type) extern _declspec(dllexport) __type ++#define PR_IMPLEMENT(__type) _declspec(dllexport) __type ++#define PR_EXTERN_DATA(__type) extern _declspec(dllexport) __type ++#define PR_IMPLEMENT_DATA(__type) _declspec(dllexport) __type ++ ++#define PR_CALLBACK ++#define PR_CALLBACK_DECL ++#define PR_STATIC_CALLBACK(__x) static __x ++ ++#elif defined(XP_BEOS) ++ ++#define PR_EXPORT(__type) extern __declspec(dllexport) __type ++#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type ++#define PR_IMPORT(__type) extern __declspec(dllexport) __type ++#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type ++ ++#define PR_EXTERN(__type) extern __declspec(dllexport) __type ++#define PR_IMPLEMENT(__type) __declspec(dllexport) __type ++#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type ++#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type ++ ++#define PR_CALLBACK ++#define PR_CALLBACK_DECL ++#define PR_STATIC_CALLBACK(__x) static __x ++ ++#elif defined(WIN16) ++ ++#define PR_CALLBACK_DECL __cdecl ++ ++#if defined(_WINDLL) ++#define PR_EXPORT(__type) extern __type _cdecl _export _loadds ++#define PR_IMPORT(__type) extern __type _cdecl _export _loadds ++#define PR_EXPORT_DATA(__type) extern __type _export ++#define PR_IMPORT_DATA(__type) extern __type _export ++ ++#define PR_EXTERN(__type) extern __type _cdecl _export _loadds ++#define PR_IMPLEMENT(__type) __type _cdecl _export _loadds ++#define PR_EXTERN_DATA(__type) extern __type _export ++#define PR_IMPLEMENT_DATA(__type) __type _export ++ ++#define PR_CALLBACK __cdecl __loadds ++#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK ++ ++#else /* this must be .EXE */ ++#define PR_EXPORT(__type) extern __type _cdecl _export ++#define PR_IMPORT(__type) extern __type _cdecl _export ++#define PR_EXPORT_DATA(__type) extern __type _export ++#define PR_IMPORT_DATA(__type) extern __type _export ++ ++#define PR_EXTERN(__type) extern __type _cdecl _export ++#define PR_IMPLEMENT(__type) __type _cdecl _export ++#define PR_EXTERN_DATA(__type) extern __type _export ++#define PR_IMPLEMENT_DATA(__type) __type _export ++ ++#define PR_CALLBACK __cdecl __loadds ++#define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK ++#endif /* _WINDLL */ ++ ++#elif defined(XP_MAC) ++ ++#define PR_EXPORT(__type) extern __declspec(export) __type ++#define PR_EXPORT_DATA(__type) extern __declspec(export) __type ++#define PR_IMPORT(__type) extern __declspec(export) __type ++#define PR_IMPORT_DATA(__type) extern __declspec(export) __type ++ ++#define PR_EXTERN(__type) extern __declspec(export) __type ++#define PR_IMPLEMENT(__type) __declspec(export) __type ++#define PR_EXTERN_DATA(__type) extern __declspec(export) __type ++#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type ++ ++#define PR_CALLBACK ++#define PR_CALLBACK_DECL ++#define PR_STATIC_CALLBACK(__x) static __x ++ ++#elif defined(XP_OS2_VACPP) ++ ++#define PR_EXPORT(__type) extern __type ++#define PR_EXPORT_DATA(__type) extern __type ++#define PR_IMPORT(__type) extern __type ++#define PR_IMPORT_DATA(__type) extern __type ++ ++#define PR_EXTERN(__type) extern __type ++#define PR_IMPLEMENT(__type) __type ++#define PR_EXTERN_DATA(__type) extern __type ++#define PR_IMPLEMENT_DATA(__type) __type ++#define PR_CALLBACK _Optlink ++#define PR_CALLBACK_DECL ++#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK ++ ++#else /* Unix */ ++ ++#define PR_EXPORT(__type) extern __type ++#define PR_EXPORT_DATA(__type) extern __type ++#define PR_IMPORT(__type) extern __type ++#define PR_IMPORT_DATA(__type) extern __type ++ ++#define PR_EXTERN(__type) extern __type ++#define PR_IMPLEMENT(__type) __type ++#define PR_EXTERN_DATA(__type) extern __type ++#define PR_IMPLEMENT_DATA(__type) __type ++#define PR_CALLBACK ++#define PR_CALLBACK_DECL ++#define PR_STATIC_CALLBACK(__x) static __x ++ ++#endif ++ ++#if defined(_NSPR_BUILD_) ++#define NSPR_API(__type) PR_EXPORT(__type) ++#define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type) ++#else ++#define NSPR_API(__type) PR_IMPORT(__type) ++#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) ++#endif ++ ++/*********************************************************************** ++** MACROS: PR_BEGIN_MACRO ++** PR_END_MACRO ++** DESCRIPTION: ++** Macro body brackets so that macros with compound statement definitions ++** behave syntactically more like functions when called. ++***********************************************************************/ ++#define PR_BEGIN_MACRO do { ++#define PR_END_MACRO } while (0) ++ ++/*********************************************************************** ++** MACROS: PR_BEGIN_EXTERN_C ++** PR_END_EXTERN_C ++** DESCRIPTION: ++** Macro shorthands for conditional C++ extern block delimiters. ++***********************************************************************/ ++#ifdef __cplusplus ++#define PR_BEGIN_EXTERN_C extern "C" { ++#define PR_END_EXTERN_C } ++#else ++#define PR_BEGIN_EXTERN_C ++#define PR_END_EXTERN_C ++#endif ++ ++/*********************************************************************** ++** MACROS: PR_BIT ++** PR_BITMASK ++** DESCRIPTION: ++** Bit masking macros. XXX n must be <= 31 to be portable ++***********************************************************************/ ++#define PR_BIT(n) ((PRUint32)1 << (n)) ++#define PR_BITMASK(n) (PR_BIT(n) - 1) ++ ++/*********************************************************************** ++** MACROS: PR_ROUNDUP ++** PR_MIN ++** PR_MAX ++** PR_ABS ++** DESCRIPTION: ++** Commonly used macros for operations on compatible types. ++***********************************************************************/ ++#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) ++#define PR_MIN(x,y) ((x)<(y)?(x):(y)) ++#define PR_MAX(x,y) ((x)>(y)?(x):(y)) ++#define PR_ABS(x) ((x)<0?-(x):(x)) ++ ++PR_BEGIN_EXTERN_C ++ ++/************************************************************************ ++** TYPES: PRUint8 ++** PRInt8 ++** DESCRIPTION: ++** The int8 types are known to be 8 bits each. There is no type that ++** is equivalent to a plain "char". ++************************************************************************/ ++#if PR_BYTES_PER_BYTE == 1 ++typedef unsigned char PRUint8; ++/* ++** Some cfront-based C++ compilers do not like 'signed char' and ++** issue the warning message: ++** warning: "signed" not implemented (ignored) ++** For these compilers, we have to define PRInt8 as plain 'char'. ++** Make sure that plain 'char' is indeed signed under these compilers. ++*/ ++#if (defined(HPUX) && defined(__cplusplus) \ ++ && !defined(__GNUC__) && __cplusplus < 199707L) \ ++ || (defined(SCO) && defined(__cplusplus) \ ++ && !defined(__GNUC__) && __cplusplus == 1L) ++typedef char PRInt8; ++#else ++typedef signed char PRInt8; ++#endif ++#else ++#error No suitable type for PRInt8/PRUint8 ++#endif ++ ++/************************************************************************ ++ * MACROS: PR_INT8_MAX ++ * PR_INT8_MIN ++ * PR_UINT8_MAX ++ * DESCRIPTION: ++ * The maximum and minimum values of a PRInt8 or PRUint8. ++************************************************************************/ ++ ++#define PR_INT8_MAX 127 ++#define PR_INT8_MIN (-128) ++#define PR_UINT8_MAX 255U ++ ++/************************************************************************ ++** TYPES: PRUint16 ++** PRInt16 ++** DESCRIPTION: ++** The int16 types are known to be 16 bits each. ++************************************************************************/ ++#if PR_BYTES_PER_SHORT == 2 ++typedef unsigned short PRUint16; ++typedef short PRInt16; ++#else ++#error No suitable type for PRInt16/PRUint16 ++#endif ++ ++/************************************************************************ ++ * MACROS: PR_INT16_MAX ++ * PR_INT16_MIN ++ * PR_UINT16_MAX ++ * DESCRIPTION: ++ * The maximum and minimum values of a PRInt16 or PRUint16. ++************************************************************************/ ++ ++#define PR_INT16_MAX 32767 ++#define PR_INT16_MIN (-32768) ++#define PR_UINT16_MAX 65535U ++ ++/************************************************************************ ++** TYPES: PRUint32 ++** PRInt32 ++** DESCRIPTION: ++** The int32 types are known to be 32 bits each. ++************************************************************************/ ++#if PR_BYTES_PER_INT == 4 ++typedef unsigned int PRUint32; ++typedef int PRInt32; ++#define PR_INT32(x) x ++#define PR_UINT32(x) x ## U ++#elif PR_BYTES_PER_LONG == 4 ++typedef unsigned long PRUint32; ++typedef long PRInt32; ++#define PR_INT32(x) x ## L ++#define PR_UINT32(x) x ## UL ++#else ++#error No suitable type for PRInt32/PRUint32 ++#endif ++ ++/************************************************************************ ++ * MACROS: PR_INT32_MAX ++ * PR_INT32_MIN ++ * PR_UINT32_MAX ++ * DESCRIPTION: ++ * The maximum and minimum values of a PRInt32 or PRUint32. ++************************************************************************/ ++ ++#define PR_INT32_MAX PR_INT32(2147483647) ++#define PR_INT32_MIN (-PR_INT32_MAX - 1) ++#define PR_UINT32_MAX PR_UINT32(4294967295) ++ ++/************************************************************************ ++** TYPES: PRUint64 ++** PRInt64 ++** DESCRIPTION: ++** The int64 types are known to be 64 bits each. Care must be used when ++** declaring variables of type PRUint64 or PRInt64. Different hardware ++** architectures and even different compilers have varying support for ++** 64 bit values. The only guaranteed portability requires the use of ++** the LL_ macros (see prlong.h). ++************************************************************************/ ++#ifdef HAVE_LONG_LONG ++#if PR_BYTES_PER_LONG == 8 ++typedef long PRInt64; ++typedef unsigned long PRUint64; ++#elif defined(WIN16) ++typedef __int64 PRInt64; ++typedef unsigned __int64 PRUint64; ++#elif defined(WIN32) && !defined(__GNUC__) ++typedef __int64 PRInt64; ++typedef unsigned __int64 PRUint64; ++#else ++typedef long long PRInt64; ++typedef unsigned long long PRUint64; ++#endif /* PR_BYTES_PER_LONG == 8 */ ++#else /* !HAVE_LONG_LONG */ ++typedef struct { ++#ifdef IS_LITTLE_ENDIAN ++ PRUint32 lo, hi; ++#else ++ PRUint32 hi, lo; ++#endif ++} PRInt64; ++typedef PRInt64 PRUint64; ++#endif /* !HAVE_LONG_LONG */ ++ ++/************************************************************************ ++** TYPES: PRUintn ++** PRIntn ++** DESCRIPTION: ++** The PRIntn types are most appropriate for automatic variables. They are ++** guaranteed to be at least 16 bits, though various architectures may ++** define them to be wider (e.g., 32 or even 64 bits). These types are ++** never valid for fields of a structure. ++************************************************************************/ ++#if PR_BYTES_PER_INT >= 2 ++typedef int PRIntn; ++typedef unsigned int PRUintn; ++#else ++#error 'sizeof(int)' not sufficient for platform use ++#endif ++ ++/************************************************************************ ++** TYPES: PRFloat64 ++** DESCRIPTION: ++** NSPR's floating point type is always 64 bits. ++************************************************************************/ ++typedef double PRFloat64; ++ ++/************************************************************************ ++** TYPES: PRSize ++** DESCRIPTION: ++** A type for representing the size of objects. ++************************************************************************/ ++typedef size_t PRSize; ++ ++ ++/************************************************************************ ++** TYPES: PROffset32, PROffset64 ++** DESCRIPTION: ++** A type for representing byte offsets from some location. ++************************************************************************/ ++typedef PRInt32 PROffset32; ++typedef PRInt64 PROffset64; ++ ++/************************************************************************ ++** TYPES: PRPtrDiff ++** DESCRIPTION: ++** A type for pointer difference. Variables of this type are suitable ++** for storing a pointer or pointer sutraction. ++************************************************************************/ ++typedef ptrdiff_t PRPtrdiff; ++ ++/************************************************************************ ++** TYPES: PRUptrdiff ++** DESCRIPTION: ++** A type for pointer difference. Variables of this type are suitable ++** for storing a pointer or pointer sutraction. ++************************************************************************/ ++typedef unsigned long PRUptrdiff; ++ ++/************************************************************************ ++** TYPES: PRBool ++** DESCRIPTION: ++** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE ++** for clarity of target type in assignments and actual arguments. Use ++** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans ++** juast as you would C int-valued conditions. ++************************************************************************/ ++typedef PRIntn PRBool; ++#define PR_TRUE 1 ++#define PR_FALSE 0 ++ ++/************************************************************************ ++** TYPES: PRPackedBool ++** DESCRIPTION: ++** Use PRPackedBOol within structs where bitfields are not desireable ++** but minimum and consistant overhead matters. ++************************************************************************/ ++typedef PRUint8 PRPackedBool; ++ ++/* ++** Status code used by some routines that have a single point of failure or ++** special status return. ++*/ ++typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; ++ ++#ifdef MOZ_UNICODE ++/* ++ * EXPERIMENTAL: This type may be removed in a future release. ++ */ ++#ifndef __PRUNICHAR__ ++#define __PRUNICHAR__ ++#if defined(WIN32) || defined(XP_MAC) ++typedef wchar_t PRUnichar; ++#else ++typedef PRUint16 PRUnichar; ++#endif ++#endif ++#endif /* MOZ_UNICODE */ ++ ++/* ++** WARNING: The undocumented data types PRWord and PRUword are ++** only used in the garbage collection and arena code. Do not ++** use PRWord and PRUword in new code. ++** ++** A PRWord is an integer that is the same size as a void*. ++** It implements the notion of a "word" in the Java Virtual ++** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine ++** Specification, Addison-Wesley, September 1996. ++** http://java.sun.com/docs/books/vmspec/index.html.) ++*/ ++typedef long PRWord; ++typedef unsigned long PRUword; ++ ++#if defined(NO_NSPR_10_SUPPORT) ++#else ++/********* ???????????????? FIX ME ??????????????????????????? *****/ ++/********************** Some old definitions until pr=>ds transition is done ***/ ++/********************** Also, we are still using NSPR 1.0. GC ******************/ ++/* ++** Fundamental NSPR macros, used nearly everywhere. ++*/ ++ ++#define PR_PUBLIC_API PR_IMPLEMENT ++ ++/* ++** Macro body brackets so that macros with compound statement definitions ++** behave syntactically more like functions when called. ++*/ ++#define NSPR_BEGIN_MACRO do { ++#define NSPR_END_MACRO } while (0) ++ ++/* ++** Macro shorthands for conditional C++ extern block delimiters. ++*/ ++#ifdef NSPR_BEGIN_EXTERN_C ++#undef NSPR_BEGIN_EXTERN_C ++#endif ++#ifdef NSPR_END_EXTERN_C ++#undef NSPR_END_EXTERN_C ++#endif ++ ++#ifdef __cplusplus ++#define NSPR_BEGIN_EXTERN_C extern "C" { ++#define NSPR_END_EXTERN_C } ++#else ++#define NSPR_BEGIN_EXTERN_C ++#define NSPR_END_EXTERN_C ++#endif ++ ++#ifdef XP_MAC ++#include "protypes.h" ++#else ++#include "obsolete/protypes.h" ++#endif ++ ++/********* ????????????? End Fix me ?????????????????????????????? *****/ ++#endif /* NO_NSPR_10_SUPPORT */ ++ ++PR_END_EXTERN_C ++ ++#endif /* prtypes_h___ */ ++ +diff -urN kdebase-3.5.2/nsplugins/test/Makefile.in new/nsplugins/test/Makefile.in +--- kdebase-3.5.2/nsplugins/test/Makefile.in 2008-01-29 22:26:50.000000000 +0000 ++++ new/nsplugins/test/Makefile.in 2008-01-29 22:53:08.000000000 +0000 +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.9.6 from Makefile.am. ++# Makefile.in generated by automake 1.10 from Makefile.am. + # KDE tags expanded automatically by am_edit - $Revision: 483858 $ + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005 Free Software Foundation, Inc. ++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,15 +15,11 @@ + + @SET_MAKE@ + +-srcdir = @srcdir@ +-top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +-top_builddir = ../.. + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +-INSTALL = @INSTALL@ + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c +@@ -56,7 +52,14 @@ + testnsplugin_OBJECTS = testnsplugin.$(OBJEXT) + am__DEPENDENCIES_1 = + testnsplugin_DEPENDENCIES = $(am__DEPENDENCIES_1) ../libnsplugin.la +-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) ++#>- testnsplugin_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++#>- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++#>- $(CXXFLAGS) $(testnsplugin_LDFLAGS) $(LDFLAGS) -o $@ ++#>+ 3 ++testnsplugin_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++ $(CXXFLAGS) $(KDE_CXXFLAGS) $(testnsplugin_LDFLAGS) $(LDFLAGS) -o $@ ++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ + depcomp = $(SHELL) $(top_srcdir)/admin/depcomp + am__depfiles_maybe = depfiles + #>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +@@ -64,19 +67,21 @@ + #>+ 2 + CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) +-#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ +-#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ +-#>- $(AM_CXXFLAGS) $(CXXFLAGS) ++#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++#>- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + #>+ 3 +-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ +- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ +- $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) ++LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) + CXXLD = $(CXX) +-#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ +-#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-#>+ 2 +-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ +- $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++#>- CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++#>- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ ++#>- $(LDFLAGS) -o $@ ++#>+ 3 ++CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) \ ++ $(LDFLAGS) -o $@ + SOURCES = $(testnsplugin_SOURCES) + DIST_SOURCES = $(testnsplugin_SOURCES) + HEADERS = $(noinst_HEADERS) +@@ -86,8 +91,6 @@ + #>+ 1 + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST) + ACLOCAL = @ACLOCAL@ +-AMDEP_FALSE = @AMDEP_FALSE@ +-AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + AR = @AR@ + ARTSCCONFIG = @ARTSCCONFIG@ +@@ -100,8 +103,6 @@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ + CFLAGS = @CFLAGS@ +-COMPILE_GL_INFO_FALSE = @COMPILE_GL_INFO_FALSE@ +-COMPILE_GL_INFO_TRUE = @COMPILE_GL_INFO_TRUE@ + CONF_FILES = @CONF_FILES@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ +@@ -137,16 +138,18 @@ + F77 = @F77@ + FFLAGS = @FFLAGS@ + FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@ ++FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ ++FREETYPE2_LDFLAGS = @FREETYPE2_LDFLAGS@ + GLINC = @GLINC@ + GLLIB = @GLLIB@ + GMSGFMT = @GMSGFMT@ ++GREP = @GREP@ + HALBACKEND = @HALBACKEND@ + HAL_CFLAGS = @HAL_CFLAGS@ + HAL_INCS = @HAL_INCS@ + HAL_LIBS = @HAL_LIBS@ +-HAVE_DNSSD_FALSE = @HAVE_DNSSD_FALSE@ +-HAVE_DNSSD_TRUE = @HAVE_DNSSD_TRUE@ + HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@ ++INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -234,7 +237,6 @@ + LIBTOOL = @LIBTOOL@ + LIBUCB = @LIBUCB@ + LIBUSBCONFIG = @LIBUSBCONFIG@ +-LIBUTEMPTER = @LIBUTEMPTER@ + LIBUTIL = @LIBUTIL@ + LIBXDMCP = @LIBXDMCP@ + LIBXFT_LIB = @LIBXFT_LIB@ +@@ -255,6 +257,7 @@ + LIB_KFM = @LIB_KFM@ + LIB_KHTML = @LIB_KHTML@ + LIB_KIMPROXY = @LIB_KIMPROXY@ ++LIB_KINFO = @LIB_KINFO@ + LIB_KIO = @LIB_KIO@ + LIB_KJS = @LIB_KJS@ + LIB_KNEWSTUFF = @LIB_KNEWSTUFF@ +@@ -285,14 +288,13 @@ + LN_S = @LN_S@ + LTLIBOBJS = @LTLIBOBJS@ + MAINT = @MAINT@ +-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ + MAKEKDEWIDGETS = @MAKEKDEWIDGETS@ + MCOPIDL = @MCOPIDL@ + MD5SUM = @MD5SUM@ + MD5SUM_CUT = @MD5SUM_CUT@ + MEINPROC = @MEINPROC@ ++MKDIR_P = @MKDIR_P@ + MOC = @MOC@ + MSGFMT = @MSGFMT@ + NOOPT_CFLAGS = @NOOPT_CFLAGS@ +@@ -337,6 +339,7 @@ + VERSION = @VERSION@ + WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@ + XGETTEXT = @XGETTEXT@ ++XMKMF = @XMKMF@ + XMLLINT = @XMLLINT@ + XTESTLIB = @XTESTLIB@ + X_EXTRA_LIBS = @X_EXTRA_LIBS@ +@@ -344,114 +347,42 @@ + X_LDFLAGS = @X_LDFLAGS@ + X_PRE_LIBS = @X_PRE_LIBS@ + X_RPATH = @X_RPATH@ +-ac_ct_AR = @ac_ct_AR@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_CXX = @ac_ct_CXX@ + ac_ct_F77 = @ac_ct_F77@ +-ac_ct_RANLIB = @ac_ct_RANLIB@ +-ac_ct_STRIP = @ac_ct_STRIP@ + all_includes = @all_includes@ + all_libraries = @all_libraries@ +-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ + am__tar = @am__tar@ + am__untar = @am__untar@ +-applnk_SUBDIR_included_FALSE = @applnk_SUBDIR_included_FALSE@ +-applnk_SUBDIR_included_TRUE = @applnk_SUBDIR_included_TRUE@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ ++builddir = @builddir@ + datadir = @datadir@ +-doc_SUBDIR_included_FALSE = @doc_SUBDIR_included_FALSE@ +-doc_SUBDIR_included_TRUE = @doc_SUBDIR_included_TRUE@ +-drkonqi_SUBDIR_included_FALSE = @drkonqi_SUBDIR_included_FALSE@ +-drkonqi_SUBDIR_included_TRUE = @drkonqi_SUBDIR_included_TRUE@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ + exec_prefix = @exec_prefix@ +-have_xcursor_FALSE = @have_xcursor_FALSE@ +-have_xcursor_TRUE = @have_xcursor_TRUE@ + host = @host@ + host_alias = @host_alias@ + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ +-include_ARTS_FALSE = @include_ARTS_FALSE@ +-include_ARTS_TRUE = @include_ARTS_TRUE@ +-include_BZIP2_FALSE = @include_BZIP2_FALSE@ +-include_BZIP2_TRUE = @include_BZIP2_TRUE@ +-include_EXR_MODULES_FALSE = @include_EXR_MODULES_FALSE@ +-include_EXR_MODULES_TRUE = @include_EXR_MODULES_TRUE@ +-include_fontinst_tn_FALSE = @include_fontinst_tn_FALSE@ +-include_fontinst_tn_TRUE = @include_fontinst_tn_TRUE@ +-include_kcontrol_access_FALSE = @include_kcontrol_access_FALSE@ +-include_kcontrol_access_TRUE = @include_kcontrol_access_TRUE@ +-include_kcontrol_accessibility_FALSE = @include_kcontrol_accessibility_FALSE@ +-include_kcontrol_accessibility_TRUE = @include_kcontrol_accessibility_TRUE@ +-include_kcontrol_joystick_FALSE = @include_kcontrol_joystick_FALSE@ +-include_kcontrol_joystick_TRUE = @include_kcontrol_joystick_TRUE@ +-include_kcontrol_kfontinst_FALSE = @include_kcontrol_kfontinst_FALSE@ +-include_kcontrol_kfontinst_TRUE = @include_kcontrol_kfontinst_TRUE@ +-include_kcontrol_randr_FALSE = @include_kcontrol_randr_FALSE@ +-include_kcontrol_randr_TRUE = @include_kcontrol_randr_TRUE@ +-include_kcontrol_smartcard_FALSE = @include_kcontrol_smartcard_FALSE@ +-include_kcontrol_smartcard_TRUE = @include_kcontrol_smartcard_TRUE@ +-include_kcontrol_usbview_FALSE = @include_kcontrol_usbview_FALSE@ +-include_kcontrol_usbview_TRUE = @include_kcontrol_usbview_TRUE@ +-include_kcontrol_view1394_FALSE = @include_kcontrol_view1394_FALSE@ +-include_kcontrol_view1394_TRUE = @include_kcontrol_view1394_TRUE@ +-include_kioslave_ldap_FALSE = @include_kioslave_ldap_FALSE@ +-include_kioslave_ldap_TRUE = @include_kioslave_ldap_TRUE@ +-include_kioslave_smb_FALSE = @include_kioslave_smb_FALSE@ +-include_kioslave_smb_TRUE = @include_kioslave_smb_TRUE@ +-include_kompmgr_FALSE = @include_kompmgr_FALSE@ +-include_kompmgr_TRUE = @include_kompmgr_TRUE@ +-include_ksysguardd_FALSE = @include_ksysguardd_FALSE@ +-include_ksysguardd_TRUE = @include_ksysguardd_TRUE@ +-include_ksysguardd_freebsd_FALSE = @include_ksysguardd_freebsd_FALSE@ +-include_ksysguardd_freebsd_TRUE = @include_ksysguardd_freebsd_TRUE@ +-include_ksysguardd_irix_FALSE = @include_ksysguardd_irix_FALSE@ +-include_ksysguardd_irix_TRUE = @include_ksysguardd_irix_TRUE@ +-include_ksysguardd_linux_FALSE = @include_ksysguardd_linux_FALSE@ +-include_ksysguardd_linux_TRUE = @include_ksysguardd_linux_TRUE@ +-include_ksysguardd_netbsd_FALSE = @include_ksysguardd_netbsd_FALSE@ +-include_ksysguardd_netbsd_TRUE = @include_ksysguardd_netbsd_TRUE@ +-include_ksysguardd_openbsd_FALSE = @include_ksysguardd_openbsd_FALSE@ +-include_ksysguardd_openbsd_TRUE = @include_ksysguardd_openbsd_TRUE@ +-include_ksysguardd_solaris_FALSE = @include_ksysguardd_solaris_FALSE@ +-include_ksysguardd_solaris_TRUE = @include_ksysguardd_solaris_TRUE@ +-include_ksysguardd_tru64_FALSE = @include_ksysguardd_tru64_FALSE@ +-include_ksysguardd_tru64_TRUE = @include_ksysguardd_tru64_TRUE@ +-include_media_halbackend_FALSE = @include_media_halbackend_FALSE@ +-include_media_halbackend_TRUE = @include_media_halbackend_TRUE@ +-include_media_linuxcdpolling_FALSE = @include_media_linuxcdpolling_FALSE@ +-include_media_linuxcdpolling_TRUE = @include_media_linuxcdpolling_TRUE@ +-include_x11_FALSE = @include_x11_FALSE@ +-include_x11_TRUE = @include_x11_TRUE@ ++htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ +-install_usbids_FALSE = @install_usbids_FALSE@ +-install_usbids_TRUE = @install_usbids_TRUE@ + jni_includes = @jni_includes@ +-kappfinder_SUBDIR_included_FALSE = @kappfinder_SUBDIR_included_FALSE@ +-kappfinder_SUBDIR_included_TRUE = @kappfinder_SUBDIR_included_TRUE@ +-kate_SUBDIR_included_FALSE = @kate_SUBDIR_included_FALSE@ +-kate_SUBDIR_included_TRUE = @kate_SUBDIR_included_TRUE@ +-kcheckpass_SUBDIR_included_FALSE = @kcheckpass_SUBDIR_included_FALSE@ +-kcheckpass_SUBDIR_included_TRUE = @kcheckpass_SUBDIR_included_TRUE@ +-kcminit_SUBDIR_included_FALSE = @kcminit_SUBDIR_included_FALSE@ +-kcminit_SUBDIR_included_TRUE = @kcminit_SUBDIR_included_TRUE@ +-kcontrol_SUBDIR_included_FALSE = @kcontrol_SUBDIR_included_FALSE@ +-kcontrol_SUBDIR_included_TRUE = @kcontrol_SUBDIR_included_TRUE@ +-kdcop_SUBDIR_included_FALSE = @kdcop_SUBDIR_included_FALSE@ +-kdcop_SUBDIR_included_TRUE = @kdcop_SUBDIR_included_TRUE@ + kde_appsdir = @kde_appsdir@ + kde_bindir = @kde_bindir@ + kde_confdir = @kde_confdir@ +@@ -474,100 +405,32 @@ + kde_templatesdir = @kde_templatesdir@ + kde_wallpaperdir = @kde_wallpaperdir@ + kde_widgetdir = @kde_widgetdir@ +-kdebugdialog_SUBDIR_included_FALSE = @kdebugdialog_SUBDIR_included_FALSE@ +-kdebugdialog_SUBDIR_included_TRUE = @kdebugdialog_SUBDIR_included_TRUE@ +-kdeeject_SUBDIR_included_FALSE = @kdeeject_SUBDIR_included_FALSE@ +-kdeeject_SUBDIR_included_TRUE = @kdeeject_SUBDIR_included_TRUE@ + kdeinitdir = @kdeinitdir@ +-kdepasswd_SUBDIR_included_FALSE = @kdepasswd_SUBDIR_included_FALSE@ +-kdepasswd_SUBDIR_included_TRUE = @kdepasswd_SUBDIR_included_TRUE@ +-kdeprint_SUBDIR_included_FALSE = @kdeprint_SUBDIR_included_FALSE@ +-kdeprint_SUBDIR_included_TRUE = @kdeprint_SUBDIR_included_TRUE@ +-kdesktop_SUBDIR_included_FALSE = @kdesktop_SUBDIR_included_FALSE@ +-kdesktop_SUBDIR_included_TRUE = @kdesktop_SUBDIR_included_TRUE@ +-kdesu_SUBDIR_included_FALSE = @kdesu_SUBDIR_included_FALSE@ +-kdesu_SUBDIR_included_TRUE = @kdesu_SUBDIR_included_TRUE@ +-kdialog_SUBDIR_included_FALSE = @kdialog_SUBDIR_included_FALSE@ +-kdialog_SUBDIR_included_TRUE = @kdialog_SUBDIR_included_TRUE@ +-kdm_SUBDIR_included_FALSE = @kdm_SUBDIR_included_FALSE@ +-kdm_SUBDIR_included_TRUE = @kdm_SUBDIR_included_TRUE@ +-kdmlib_SUBDIR_included_FALSE = @kdmlib_SUBDIR_included_FALSE@ +-kdmlib_SUBDIR_included_TRUE = @kdmlib_SUBDIR_included_TRUE@ +-kfind_SUBDIR_included_FALSE = @kfind_SUBDIR_included_FALSE@ +-kfind_SUBDIR_included_TRUE = @kfind_SUBDIR_included_TRUE@ +-khelpcenter_SUBDIR_included_FALSE = @khelpcenter_SUBDIR_included_FALSE@ +-khelpcenter_SUBDIR_included_TRUE = @khelpcenter_SUBDIR_included_TRUE@ +-khotkeys_SUBDIR_included_FALSE = @khotkeys_SUBDIR_included_FALSE@ +-khotkeys_SUBDIR_included_TRUE = @khotkeys_SUBDIR_included_TRUE@ +-kicker_SUBDIR_included_FALSE = @kicker_SUBDIR_included_FALSE@ +-kicker_SUBDIR_included_TRUE = @kicker_SUBDIR_included_TRUE@ +-kioslave_SUBDIR_included_FALSE = @kioslave_SUBDIR_included_FALSE@ +-kioslave_SUBDIR_included_TRUE = @kioslave_SUBDIR_included_TRUE@ +-klipper_SUBDIR_included_FALSE = @klipper_SUBDIR_included_FALSE@ +-klipper_SUBDIR_included_TRUE = @klipper_SUBDIR_included_TRUE@ +-kmenuedit_SUBDIR_included_FALSE = @kmenuedit_SUBDIR_included_FALSE@ +-kmenuedit_SUBDIR_included_TRUE = @kmenuedit_SUBDIR_included_TRUE@ +-knetattach_SUBDIR_included_FALSE = @knetattach_SUBDIR_included_FALSE@ +-knetattach_SUBDIR_included_TRUE = @knetattach_SUBDIR_included_TRUE@ +-konqueror_SUBDIR_included_FALSE = @konqueror_SUBDIR_included_FALSE@ +-konqueror_SUBDIR_included_TRUE = @konqueror_SUBDIR_included_TRUE@ +-konsole_SUBDIR_included_FALSE = @konsole_SUBDIR_included_FALSE@ +-konsole_SUBDIR_included_TRUE = @konsole_SUBDIR_included_TRUE@ +-kpager_SUBDIR_included_FALSE = @kpager_SUBDIR_included_FALSE@ +-kpager_SUBDIR_included_TRUE = @kpager_SUBDIR_included_TRUE@ +-kpersonalizer_SUBDIR_included_FALSE = @kpersonalizer_SUBDIR_included_FALSE@ +-kpersonalizer_SUBDIR_included_TRUE = @kpersonalizer_SUBDIR_included_TRUE@ +-kreadconfig_SUBDIR_included_FALSE = @kreadconfig_SUBDIR_included_FALSE@ +-kreadconfig_SUBDIR_included_TRUE = @kreadconfig_SUBDIR_included_TRUE@ +-kscreensaver_SUBDIR_included_FALSE = @kscreensaver_SUBDIR_included_FALSE@ +-kscreensaver_SUBDIR_included_TRUE = @kscreensaver_SUBDIR_included_TRUE@ +-ksmserver_SUBDIR_included_FALSE = @ksmserver_SUBDIR_included_FALSE@ +-ksmserver_SUBDIR_included_TRUE = @ksmserver_SUBDIR_included_TRUE@ +-ksplashml_SUBDIR_included_FALSE = @ksplashml_SUBDIR_included_FALSE@ +-ksplashml_SUBDIR_included_TRUE = @ksplashml_SUBDIR_included_TRUE@ +-kstart_SUBDIR_included_FALSE = @kstart_SUBDIR_included_FALSE@ +-kstart_SUBDIR_included_TRUE = @kstart_SUBDIR_included_TRUE@ +-ksysguard_SUBDIR_included_FALSE = @ksysguard_SUBDIR_included_FALSE@ +-ksysguard_SUBDIR_included_TRUE = @ksysguard_SUBDIR_included_TRUE@ +-ksystraycmd_SUBDIR_included_FALSE = @ksystraycmd_SUBDIR_included_FALSE@ +-ksystraycmd_SUBDIR_included_TRUE = @ksystraycmd_SUBDIR_included_TRUE@ +-ktip_SUBDIR_included_FALSE = @ktip_SUBDIR_included_FALSE@ +-ktip_SUBDIR_included_TRUE = @ktip_SUBDIR_included_TRUE@ +-kwin_SUBDIR_included_FALSE = @kwin_SUBDIR_included_FALSE@ +-kwin_SUBDIR_included_TRUE = @kwin_SUBDIR_included_TRUE@ +-kxkb_SUBDIR_included_FALSE = @kxkb_SUBDIR_included_FALSE@ +-kxkb_SUBDIR_included_TRUE = @kxkb_SUBDIR_included_TRUE@ +-l10n_SUBDIR_included_FALSE = @l10n_SUBDIR_included_FALSE@ +-l10n_SUBDIR_included_TRUE = @l10n_SUBDIR_included_TRUE@ + libdir = @libdir@ + libexecdir = @libexecdir@ +-libkonq_SUBDIR_included_FALSE = @libkonq_SUBDIR_included_FALSE@ +-libkonq_SUBDIR_included_TRUE = @libkonq_SUBDIR_included_TRUE@ ++localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + nogroup = @nogroup@ +-nsplugins_SUBDIR_included_FALSE = @nsplugins_SUBDIR_included_FALSE@ +-nsplugins_SUBDIR_included_TRUE = @nsplugins_SUBDIR_included_TRUE@ + oldincludedir = @oldincludedir@ +-pics_SUBDIR_included_FALSE = @pics_SUBDIR_included_FALSE@ +-pics_SUBDIR_included_TRUE = @pics_SUBDIR_included_TRUE@ ++pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ ++psdir = @psdir@ + qt_includes = @qt_includes@ + qt_libraries = @qt_libraries@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ +-supports_i8k_FALSE = @supports_i8k_FALSE@ +-supports_i8k_TRUE = @supports_i8k_TRUE@ ++srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target = @target@ + target_alias = @target_alias@ + target_cpu = @target_cpu@ + target_os = @target_os@ + target_vendor = @target_vendor@ +-unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@ +-unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@ ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ + x_includes = @x_includes@ + x_libraries = @x_libraries@ + xdg_appsdir = @xdg_appsdir@ +@@ -636,7 +499,7 @@ + done + testnsplugin$(EXEEXT): $(testnsplugin_OBJECTS) $(testnsplugin_DEPENDENCIES) + @rm -f testnsplugin$(EXEEXT) +- $(CXXLINK) $(testnsplugin_LDFLAGS) $(testnsplugin_OBJECTS) $(testnsplugin_LDADD) $(LIBS) ++ $(testnsplugin_LINK) $(testnsplugin_OBJECTS) $(testnsplugin_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -647,22 +510,22 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testnsplugin.Po@am__quote@ + + .cpp.o: +-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + + .cpp.obj: +-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + + .cpp.lo: +-@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@@ -673,10 +536,6 @@ + clean-libtool: + -rm -rf .libs _libs + +-distclean-libtool: +- -rm -f libtool +-uninstall-info-am: +- + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ +@@ -726,22 +585,21 @@ + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + + distdir: $(DISTFILES) +- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ +- list='$(DISTFILES)'; for file in $$list; do \ +- case $$file in \ +- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ +- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ +- esac; \ ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ +- if test "$$dir" != "$$file" && test "$$dir" != "."; then \ +- dir="/$$dir"; \ +- $(mkdir_p) "$(distdir)$$dir"; \ +- else \ +- dir=''; \ +- fi; \ + if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ +@@ -795,7 +653,7 @@ + -rm -rf ./$(DEPDIR) + -rm -f Makefile + distclean-am: clean-am distclean-compile distclean-generic \ +- distclean-libtool distclean-tags ++ distclean-tags + + dvi: dvi-am + +@@ -809,12 +667,20 @@ + + install-data-am: + ++install-dvi: install-dvi-am ++ + install-exec-am: + ++install-html: install-html-am ++ + install-info: install-info-am + + install-man: + ++install-pdf: install-pdf-am ++ ++install-ps: install-ps-am ++ + installcheck-am: + + maintainer-clean: maintainer-clean-am +@@ -835,19 +701,23 @@ + + ps-am: + +-uninstall-am: uninstall-info-am ++uninstall-am: ++ ++.MAKE: install-am install-strip + + .PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ +- install-data-am install-exec install-exec-am install-info \ +- install-info-am install-man install-strip installcheck \ ++ install-data-am install-dvi install-dvi-am install-exec \ ++ install-exec-am install-html install-html-am install-info \ ++ install-info-am install-man install-pdf install-pdf-am \ ++ install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ +- tags uninstall uninstall-am uninstall-info-am ++ tags uninstall uninstall-am + + + $(srcdir)/testnsplugin.cpp: ../NSPluginClassIface_stub.h +diff -urN kdebase-3.5.2/nsplugins/viewer/Makefile.am new/nsplugins/viewer/Makefile.am +--- kdebase-3.5.2/nsplugins/viewer/Makefile.am 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/viewer/Makefile.am 2008-01-29 22:53:08.000000000 +0000 +@@ -1,12 +1,11 @@ +-INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) ++INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) `pkg-config --cflags glib-2.0` + METASOURCES = AUTO + + bin_PROGRAMS = nspluginviewer + + nspluginviewer_SOURCES = NSPluginCallbackIface.stub NSPluginClassIface.skel \ +- nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp +-nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic ++ nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp ++nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic `pkg-config --libs glib-2.0` + nspluginviewer_LDADD = $(LIB_KIO) $(LIB_KPARTS) -lXt + + NSPluginCallbackIface_DIR = $(srcdir)/.. +- +diff -urN kdebase-3.5.2/nsplugins/viewer/Makefile.in new/nsplugins/viewer/Makefile.in +--- kdebase-3.5.2/nsplugins/viewer/Makefile.in 2008-01-29 22:26:50.000000000 +0000 ++++ new/nsplugins/viewer/Makefile.in 2008-01-29 22:53:08.000000000 +0000 +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.9.6 from Makefile.am. ++# Makefile.in generated by automake 1.10 from Makefile.am. + # KDE tags expanded automatically by am_edit - $Revision: 483858 $ + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005 Free Software Foundation, Inc. ++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,15 +15,11 @@ + + @SET_MAKE@ + +-srcdir = @srcdir@ +-top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +-top_builddir = ../.. + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +-INSTALL = @INSTALL@ + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c +@@ -53,18 +49,25 @@ + binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(bin_PROGRAMS) + am_nspluginviewer_OBJECTS = nsplugin.$(OBJEXT) viewer.$(OBJEXT) \ +- kxt.$(OBJEXT) qxteventloop.$(OBJEXT) ++ kxt.$(OBJEXT) qxteventloop.$(OBJEXT) glibevents.$(OBJEXT) + #>- nspluginviewer_OBJECTS = $(am_nspluginviewer_OBJECTS) + #>+ 5 + nspluginviewer_final_OBJECTS = nspluginviewer.all_cpp.o + nspluginviewer_nofinal_OBJECTS = nsplugin.$(OBJEXT) viewer.$(OBJEXT) \ +- kxt.$(OBJEXT) qxteventloop.$(OBJEXT) NSPluginCallbackIface_stub.$(OBJEXT) NSPluginClassIface_skel.$(OBJEXT) ++ kxt.$(OBJEXT) qxteventloop.$(OBJEXT) glibevents.$(OBJEXT) NSPluginCallbackIface_stub.$(OBJEXT) NSPluginClassIface_skel.$(OBJEXT) + @KDE_USE_FINAL_FALSE@nspluginviewer_OBJECTS = $(nspluginviewer_nofinal_OBJECTS) + @KDE_USE_FINAL_TRUE@nspluginviewer_OBJECTS = $(nspluginviewer_final_OBJECTS) + am__DEPENDENCIES_1 = + nspluginviewer_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) ++#>- nspluginviewer_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++#>- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++#>- $(CXXFLAGS) $(nspluginviewer_LDFLAGS) $(LDFLAGS) -o $@ ++#>+ 3 ++nspluginviewer_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ ++ $(CXXFLAGS) $(KDE_CXXFLAGS) $(nspluginviewer_LDFLAGS) $(LDFLAGS) -o $@ ++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ + depcomp = $(SHELL) $(top_srcdir)/admin/depcomp + am__depfiles_maybe = depfiles + #>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +@@ -72,19 +75,21 @@ + #>+ 2 + CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) +-#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ +-#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ +-#>- $(AM_CXXFLAGS) $(CXXFLAGS) ++#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++#>- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + #>+ 3 +-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ +- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ +- $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) ++LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) + CXXLD = $(CXX) +-#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ +-#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-#>+ 2 +-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ +- $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++#>- CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++#>- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ ++#>- $(LDFLAGS) -o $@ ++#>+ 3 ++CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) \ ++ $(LDFLAGS) -o $@ + SOURCES = $(nspluginviewer_SOURCES) + DIST_SOURCES = $(nspluginviewer_SOURCES) + ETAGS = etags +@@ -93,8 +98,6 @@ + #>+ 1 + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST) + ACLOCAL = @ACLOCAL@ +-AMDEP_FALSE = @AMDEP_FALSE@ +-AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + AR = @AR@ + ARTSCCONFIG = @ARTSCCONFIG@ +@@ -107,8 +110,6 @@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ + CFLAGS = @CFLAGS@ +-COMPILE_GL_INFO_FALSE = @COMPILE_GL_INFO_FALSE@ +-COMPILE_GL_INFO_TRUE = @COMPILE_GL_INFO_TRUE@ + CONF_FILES = @CONF_FILES@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ +@@ -144,16 +145,18 @@ + F77 = @F77@ + FFLAGS = @FFLAGS@ + FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@ ++FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ ++FREETYPE2_LDFLAGS = @FREETYPE2_LDFLAGS@ + GLINC = @GLINC@ + GLLIB = @GLLIB@ + GMSGFMT = @GMSGFMT@ ++GREP = @GREP@ + HALBACKEND = @HALBACKEND@ + HAL_CFLAGS = @HAL_CFLAGS@ + HAL_INCS = @HAL_INCS@ + HAL_LIBS = @HAL_LIBS@ +-HAVE_DNSSD_FALSE = @HAVE_DNSSD_FALSE@ +-HAVE_DNSSD_TRUE = @HAVE_DNSSD_TRUE@ + HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@ ++INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -241,7 +244,6 @@ + LIBTOOL = @LIBTOOL@ + LIBUCB = @LIBUCB@ + LIBUSBCONFIG = @LIBUSBCONFIG@ +-LIBUTEMPTER = @LIBUTEMPTER@ + LIBUTIL = @LIBUTIL@ + LIBXDMCP = @LIBXDMCP@ + LIBXFT_LIB = @LIBXFT_LIB@ +@@ -262,6 +264,7 @@ + LIB_KFM = @LIB_KFM@ + LIB_KHTML = @LIB_KHTML@ + LIB_KIMPROXY = @LIB_KIMPROXY@ ++LIB_KINFO = @LIB_KINFO@ + LIB_KIO = @LIB_KIO@ + LIB_KJS = @LIB_KJS@ + LIB_KNEWSTUFF = @LIB_KNEWSTUFF@ +@@ -292,14 +295,13 @@ + LN_S = @LN_S@ + LTLIBOBJS = @LTLIBOBJS@ + MAINT = @MAINT@ +-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ + MAKEKDEWIDGETS = @MAKEKDEWIDGETS@ + MCOPIDL = @MCOPIDL@ + MD5SUM = @MD5SUM@ + MD5SUM_CUT = @MD5SUM_CUT@ + MEINPROC = @MEINPROC@ ++MKDIR_P = @MKDIR_P@ + MOC = @MOC@ + MSGFMT = @MSGFMT@ + NOOPT_CFLAGS = @NOOPT_CFLAGS@ +@@ -344,6 +346,7 @@ + VERSION = @VERSION@ + WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@ + XGETTEXT = @XGETTEXT@ ++XMKMF = @XMKMF@ + XMLLINT = @XMLLINT@ + XTESTLIB = @XTESTLIB@ + X_EXTRA_LIBS = @X_EXTRA_LIBS@ +@@ -351,114 +354,42 @@ + X_LDFLAGS = @X_LDFLAGS@ + X_PRE_LIBS = @X_PRE_LIBS@ + X_RPATH = @X_RPATH@ +-ac_ct_AR = @ac_ct_AR@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_CXX = @ac_ct_CXX@ + ac_ct_F77 = @ac_ct_F77@ +-ac_ct_RANLIB = @ac_ct_RANLIB@ +-ac_ct_STRIP = @ac_ct_STRIP@ + all_includes = @all_includes@ + all_libraries = @all_libraries@ +-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ + am__tar = @am__tar@ + am__untar = @am__untar@ +-applnk_SUBDIR_included_FALSE = @applnk_SUBDIR_included_FALSE@ +-applnk_SUBDIR_included_TRUE = @applnk_SUBDIR_included_TRUE@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ ++builddir = @builddir@ + datadir = @datadir@ +-doc_SUBDIR_included_FALSE = @doc_SUBDIR_included_FALSE@ +-doc_SUBDIR_included_TRUE = @doc_SUBDIR_included_TRUE@ +-drkonqi_SUBDIR_included_FALSE = @drkonqi_SUBDIR_included_FALSE@ +-drkonqi_SUBDIR_included_TRUE = @drkonqi_SUBDIR_included_TRUE@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ + exec_prefix = @exec_prefix@ +-have_xcursor_FALSE = @have_xcursor_FALSE@ +-have_xcursor_TRUE = @have_xcursor_TRUE@ + host = @host@ + host_alias = @host_alias@ + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ +-include_ARTS_FALSE = @include_ARTS_FALSE@ +-include_ARTS_TRUE = @include_ARTS_TRUE@ +-include_BZIP2_FALSE = @include_BZIP2_FALSE@ +-include_BZIP2_TRUE = @include_BZIP2_TRUE@ +-include_EXR_MODULES_FALSE = @include_EXR_MODULES_FALSE@ +-include_EXR_MODULES_TRUE = @include_EXR_MODULES_TRUE@ +-include_fontinst_tn_FALSE = @include_fontinst_tn_FALSE@ +-include_fontinst_tn_TRUE = @include_fontinst_tn_TRUE@ +-include_kcontrol_access_FALSE = @include_kcontrol_access_FALSE@ +-include_kcontrol_access_TRUE = @include_kcontrol_access_TRUE@ +-include_kcontrol_accessibility_FALSE = @include_kcontrol_accessibility_FALSE@ +-include_kcontrol_accessibility_TRUE = @include_kcontrol_accessibility_TRUE@ +-include_kcontrol_joystick_FALSE = @include_kcontrol_joystick_FALSE@ +-include_kcontrol_joystick_TRUE = @include_kcontrol_joystick_TRUE@ +-include_kcontrol_kfontinst_FALSE = @include_kcontrol_kfontinst_FALSE@ +-include_kcontrol_kfontinst_TRUE = @include_kcontrol_kfontinst_TRUE@ +-include_kcontrol_randr_FALSE = @include_kcontrol_randr_FALSE@ +-include_kcontrol_randr_TRUE = @include_kcontrol_randr_TRUE@ +-include_kcontrol_smartcard_FALSE = @include_kcontrol_smartcard_FALSE@ +-include_kcontrol_smartcard_TRUE = @include_kcontrol_smartcard_TRUE@ +-include_kcontrol_usbview_FALSE = @include_kcontrol_usbview_FALSE@ +-include_kcontrol_usbview_TRUE = @include_kcontrol_usbview_TRUE@ +-include_kcontrol_view1394_FALSE = @include_kcontrol_view1394_FALSE@ +-include_kcontrol_view1394_TRUE = @include_kcontrol_view1394_TRUE@ +-include_kioslave_ldap_FALSE = @include_kioslave_ldap_FALSE@ +-include_kioslave_ldap_TRUE = @include_kioslave_ldap_TRUE@ +-include_kioslave_smb_FALSE = @include_kioslave_smb_FALSE@ +-include_kioslave_smb_TRUE = @include_kioslave_smb_TRUE@ +-include_kompmgr_FALSE = @include_kompmgr_FALSE@ +-include_kompmgr_TRUE = @include_kompmgr_TRUE@ +-include_ksysguardd_FALSE = @include_ksysguardd_FALSE@ +-include_ksysguardd_TRUE = @include_ksysguardd_TRUE@ +-include_ksysguardd_freebsd_FALSE = @include_ksysguardd_freebsd_FALSE@ +-include_ksysguardd_freebsd_TRUE = @include_ksysguardd_freebsd_TRUE@ +-include_ksysguardd_irix_FALSE = @include_ksysguardd_irix_FALSE@ +-include_ksysguardd_irix_TRUE = @include_ksysguardd_irix_TRUE@ +-include_ksysguardd_linux_FALSE = @include_ksysguardd_linux_FALSE@ +-include_ksysguardd_linux_TRUE = @include_ksysguardd_linux_TRUE@ +-include_ksysguardd_netbsd_FALSE = @include_ksysguardd_netbsd_FALSE@ +-include_ksysguardd_netbsd_TRUE = @include_ksysguardd_netbsd_TRUE@ +-include_ksysguardd_openbsd_FALSE = @include_ksysguardd_openbsd_FALSE@ +-include_ksysguardd_openbsd_TRUE = @include_ksysguardd_openbsd_TRUE@ +-include_ksysguardd_solaris_FALSE = @include_ksysguardd_solaris_FALSE@ +-include_ksysguardd_solaris_TRUE = @include_ksysguardd_solaris_TRUE@ +-include_ksysguardd_tru64_FALSE = @include_ksysguardd_tru64_FALSE@ +-include_ksysguardd_tru64_TRUE = @include_ksysguardd_tru64_TRUE@ +-include_media_halbackend_FALSE = @include_media_halbackend_FALSE@ +-include_media_halbackend_TRUE = @include_media_halbackend_TRUE@ +-include_media_linuxcdpolling_FALSE = @include_media_linuxcdpolling_FALSE@ +-include_media_linuxcdpolling_TRUE = @include_media_linuxcdpolling_TRUE@ +-include_x11_FALSE = @include_x11_FALSE@ +-include_x11_TRUE = @include_x11_TRUE@ ++htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ +-install_usbids_FALSE = @install_usbids_FALSE@ +-install_usbids_TRUE = @install_usbids_TRUE@ + jni_includes = @jni_includes@ +-kappfinder_SUBDIR_included_FALSE = @kappfinder_SUBDIR_included_FALSE@ +-kappfinder_SUBDIR_included_TRUE = @kappfinder_SUBDIR_included_TRUE@ +-kate_SUBDIR_included_FALSE = @kate_SUBDIR_included_FALSE@ +-kate_SUBDIR_included_TRUE = @kate_SUBDIR_included_TRUE@ +-kcheckpass_SUBDIR_included_FALSE = @kcheckpass_SUBDIR_included_FALSE@ +-kcheckpass_SUBDIR_included_TRUE = @kcheckpass_SUBDIR_included_TRUE@ +-kcminit_SUBDIR_included_FALSE = @kcminit_SUBDIR_included_FALSE@ +-kcminit_SUBDIR_included_TRUE = @kcminit_SUBDIR_included_TRUE@ +-kcontrol_SUBDIR_included_FALSE = @kcontrol_SUBDIR_included_FALSE@ +-kcontrol_SUBDIR_included_TRUE = @kcontrol_SUBDIR_included_TRUE@ +-kdcop_SUBDIR_included_FALSE = @kdcop_SUBDIR_included_FALSE@ +-kdcop_SUBDIR_included_TRUE = @kdcop_SUBDIR_included_TRUE@ + kde_appsdir = @kde_appsdir@ + kde_bindir = @kde_bindir@ + kde_confdir = @kde_confdir@ +@@ -481,114 +412,46 @@ + kde_templatesdir = @kde_templatesdir@ + kde_wallpaperdir = @kde_wallpaperdir@ + kde_widgetdir = @kde_widgetdir@ +-kdebugdialog_SUBDIR_included_FALSE = @kdebugdialog_SUBDIR_included_FALSE@ +-kdebugdialog_SUBDIR_included_TRUE = @kdebugdialog_SUBDIR_included_TRUE@ +-kdeeject_SUBDIR_included_FALSE = @kdeeject_SUBDIR_included_FALSE@ +-kdeeject_SUBDIR_included_TRUE = @kdeeject_SUBDIR_included_TRUE@ + kdeinitdir = @kdeinitdir@ +-kdepasswd_SUBDIR_included_FALSE = @kdepasswd_SUBDIR_included_FALSE@ +-kdepasswd_SUBDIR_included_TRUE = @kdepasswd_SUBDIR_included_TRUE@ +-kdeprint_SUBDIR_included_FALSE = @kdeprint_SUBDIR_included_FALSE@ +-kdeprint_SUBDIR_included_TRUE = @kdeprint_SUBDIR_included_TRUE@ +-kdesktop_SUBDIR_included_FALSE = @kdesktop_SUBDIR_included_FALSE@ +-kdesktop_SUBDIR_included_TRUE = @kdesktop_SUBDIR_included_TRUE@ +-kdesu_SUBDIR_included_FALSE = @kdesu_SUBDIR_included_FALSE@ +-kdesu_SUBDIR_included_TRUE = @kdesu_SUBDIR_included_TRUE@ +-kdialog_SUBDIR_included_FALSE = @kdialog_SUBDIR_included_FALSE@ +-kdialog_SUBDIR_included_TRUE = @kdialog_SUBDIR_included_TRUE@ +-kdm_SUBDIR_included_FALSE = @kdm_SUBDIR_included_FALSE@ +-kdm_SUBDIR_included_TRUE = @kdm_SUBDIR_included_TRUE@ +-kdmlib_SUBDIR_included_FALSE = @kdmlib_SUBDIR_included_FALSE@ +-kdmlib_SUBDIR_included_TRUE = @kdmlib_SUBDIR_included_TRUE@ +-kfind_SUBDIR_included_FALSE = @kfind_SUBDIR_included_FALSE@ +-kfind_SUBDIR_included_TRUE = @kfind_SUBDIR_included_TRUE@ +-khelpcenter_SUBDIR_included_FALSE = @khelpcenter_SUBDIR_included_FALSE@ +-khelpcenter_SUBDIR_included_TRUE = @khelpcenter_SUBDIR_included_TRUE@ +-khotkeys_SUBDIR_included_FALSE = @khotkeys_SUBDIR_included_FALSE@ +-khotkeys_SUBDIR_included_TRUE = @khotkeys_SUBDIR_included_TRUE@ +-kicker_SUBDIR_included_FALSE = @kicker_SUBDIR_included_FALSE@ +-kicker_SUBDIR_included_TRUE = @kicker_SUBDIR_included_TRUE@ +-kioslave_SUBDIR_included_FALSE = @kioslave_SUBDIR_included_FALSE@ +-kioslave_SUBDIR_included_TRUE = @kioslave_SUBDIR_included_TRUE@ +-klipper_SUBDIR_included_FALSE = @klipper_SUBDIR_included_FALSE@ +-klipper_SUBDIR_included_TRUE = @klipper_SUBDIR_included_TRUE@ +-kmenuedit_SUBDIR_included_FALSE = @kmenuedit_SUBDIR_included_FALSE@ +-kmenuedit_SUBDIR_included_TRUE = @kmenuedit_SUBDIR_included_TRUE@ +-knetattach_SUBDIR_included_FALSE = @knetattach_SUBDIR_included_FALSE@ +-knetattach_SUBDIR_included_TRUE = @knetattach_SUBDIR_included_TRUE@ +-konqueror_SUBDIR_included_FALSE = @konqueror_SUBDIR_included_FALSE@ +-konqueror_SUBDIR_included_TRUE = @konqueror_SUBDIR_included_TRUE@ +-konsole_SUBDIR_included_FALSE = @konsole_SUBDIR_included_FALSE@ +-konsole_SUBDIR_included_TRUE = @konsole_SUBDIR_included_TRUE@ +-kpager_SUBDIR_included_FALSE = @kpager_SUBDIR_included_FALSE@ +-kpager_SUBDIR_included_TRUE = @kpager_SUBDIR_included_TRUE@ +-kpersonalizer_SUBDIR_included_FALSE = @kpersonalizer_SUBDIR_included_FALSE@ +-kpersonalizer_SUBDIR_included_TRUE = @kpersonalizer_SUBDIR_included_TRUE@ +-kreadconfig_SUBDIR_included_FALSE = @kreadconfig_SUBDIR_included_FALSE@ +-kreadconfig_SUBDIR_included_TRUE = @kreadconfig_SUBDIR_included_TRUE@ +-kscreensaver_SUBDIR_included_FALSE = @kscreensaver_SUBDIR_included_FALSE@ +-kscreensaver_SUBDIR_included_TRUE = @kscreensaver_SUBDIR_included_TRUE@ +-ksmserver_SUBDIR_included_FALSE = @ksmserver_SUBDIR_included_FALSE@ +-ksmserver_SUBDIR_included_TRUE = @ksmserver_SUBDIR_included_TRUE@ +-ksplashml_SUBDIR_included_FALSE = @ksplashml_SUBDIR_included_FALSE@ +-ksplashml_SUBDIR_included_TRUE = @ksplashml_SUBDIR_included_TRUE@ +-kstart_SUBDIR_included_FALSE = @kstart_SUBDIR_included_FALSE@ +-kstart_SUBDIR_included_TRUE = @kstart_SUBDIR_included_TRUE@ +-ksysguard_SUBDIR_included_FALSE = @ksysguard_SUBDIR_included_FALSE@ +-ksysguard_SUBDIR_included_TRUE = @ksysguard_SUBDIR_included_TRUE@ +-ksystraycmd_SUBDIR_included_FALSE = @ksystraycmd_SUBDIR_included_FALSE@ +-ksystraycmd_SUBDIR_included_TRUE = @ksystraycmd_SUBDIR_included_TRUE@ +-ktip_SUBDIR_included_FALSE = @ktip_SUBDIR_included_FALSE@ +-ktip_SUBDIR_included_TRUE = @ktip_SUBDIR_included_TRUE@ +-kwin_SUBDIR_included_FALSE = @kwin_SUBDIR_included_FALSE@ +-kwin_SUBDIR_included_TRUE = @kwin_SUBDIR_included_TRUE@ +-kxkb_SUBDIR_included_FALSE = @kxkb_SUBDIR_included_FALSE@ +-kxkb_SUBDIR_included_TRUE = @kxkb_SUBDIR_included_TRUE@ +-l10n_SUBDIR_included_FALSE = @l10n_SUBDIR_included_FALSE@ +-l10n_SUBDIR_included_TRUE = @l10n_SUBDIR_included_TRUE@ + libdir = @libdir@ + libexecdir = @libexecdir@ +-libkonq_SUBDIR_included_FALSE = @libkonq_SUBDIR_included_FALSE@ +-libkonq_SUBDIR_included_TRUE = @libkonq_SUBDIR_included_TRUE@ ++localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + nogroup = @nogroup@ +-nsplugins_SUBDIR_included_FALSE = @nsplugins_SUBDIR_included_FALSE@ +-nsplugins_SUBDIR_included_TRUE = @nsplugins_SUBDIR_included_TRUE@ + oldincludedir = @oldincludedir@ +-pics_SUBDIR_included_FALSE = @pics_SUBDIR_included_FALSE@ +-pics_SUBDIR_included_TRUE = @pics_SUBDIR_included_TRUE@ ++pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ ++psdir = @psdir@ + qt_includes = @qt_includes@ + qt_libraries = @qt_libraries@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ +-supports_i8k_FALSE = @supports_i8k_FALSE@ +-supports_i8k_TRUE = @supports_i8k_TRUE@ ++srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target = @target@ + target_alias = @target_alias@ + target_cpu = @target_cpu@ + target_os = @target_os@ + target_vendor = @target_vendor@ +-unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@ +-unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@ ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ + x_includes = @x_includes@ + x_libraries = @x_libraries@ + xdg_appsdir = @xdg_appsdir@ + xdg_directorydir = @xdg_directorydir@ + xdg_menudir = @xdg_menudir@ +-INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) ++INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) `pkg-config --cflags glib-2.0` + #>- METASOURCES = AUTO + #>- nspluginviewer_SOURCES = NSPluginCallbackIface.stub NSPluginClassIface.skel \ +-#>- nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp ++#>- nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp + #>+ 2 + nspluginviewer_SOURCES= \ +- nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp ++ nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp + +-nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic ++nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic `pkg-config --libs glib-2.0` + nspluginviewer_LDADD = $(LIB_KIO) $(LIB_KPARTS) -lXt + NSPluginCallbackIface_DIR = $(srcdir)/.. + #>- all: all-am +@@ -641,7 +504,7 @@ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" ++ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ +@@ -669,7 +532,7 @@ + done + nspluginviewer$(EXEEXT): $(nspluginviewer_OBJECTS) $(nspluginviewer_DEPENDENCIES) + @rm -f nspluginviewer$(EXEEXT) +- $(CXXLINK) $(nspluginviewer_LDFLAGS) $(nspluginviewer_OBJECTS) $(nspluginviewer_LDADD) $(LIBS) ++ $(nspluginviewer_LINK) $(nspluginviewer_OBJECTS) $(nspluginviewer_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -677,28 +540,29 @@ + distclean-compile: + -rm -f *.tab.c + ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glibevents.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kxt.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsplugin.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qxteventloop.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/viewer.Po@am__quote@ + + .cpp.o: +-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + + .cpp.obj: +-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + + .cpp.lo: +-@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@@ -709,10 +573,6 @@ + clean-libtool: + -rm -rf .libs _libs + +-distclean-libtool: +- -rm -f libtool +-uninstall-info-am: +- + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ +@@ -762,22 +622,21 @@ + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + + distdir: $(DISTFILES) +- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ +- list='$(DISTFILES)'; for file in $$list; do \ +- case $$file in \ +- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ +- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ +- esac; \ ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ +- if test "$$dir" != "$$file" && test "$$dir" != "."; then \ +- dir="/$$dir"; \ +- $(mkdir_p) "$(distdir)$$dir"; \ +- else \ +- dir=''; \ +- fi; \ + if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ +@@ -793,7 +652,7 @@ + all-am: Makefile $(PROGRAMS) + installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ +- test -z "$$dir" || $(mkdir_p) "$$dir"; \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done + install: install-am + install-exec: install-exec-am +@@ -831,7 +690,7 @@ + -rm -rf ./$(DEPDIR) + -rm -f Makefile + distclean-am: clean-am distclean-compile distclean-generic \ +- distclean-libtool distclean-tags ++ distclean-tags + + dvi: dvi-am + +@@ -845,12 +704,20 @@ + + install-data-am: + ++install-dvi: install-dvi-am ++ + install-exec-am: install-binPROGRAMS + ++install-html: install-html-am ++ + install-info: install-info-am + + install-man: + ++install-pdf: install-pdf-am ++ ++install-ps: install-ps-am ++ + installcheck-am: + + maintainer-clean: maintainer-clean-am +@@ -871,19 +738,23 @@ + + ps-am: + +-uninstall-am: uninstall-binPROGRAMS uninstall-info-am ++uninstall-am: uninstall-binPROGRAMS ++ ++.MAKE: install-am install-strip + + .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ +- install-binPROGRAMS install-data install-data-am install-exec \ +- install-exec-am install-info install-info-am install-man \ ++ install-binPROGRAMS install-data install-data-am install-dvi \ ++ install-dvi-am install-exec install-exec-am install-html \ ++ install-html-am install-info install-info-am install-man \ ++ install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ +- uninstall-binPROGRAMS uninstall-info-am ++ uninstall-binPROGRAMS + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +@@ -914,6 +785,13 @@ + mocs: qxteventloop.moc + + #>+ 3 ++glibevents.moc: $(srcdir)/glibevents.h ++ $(MOC) $(srcdir)/glibevents.h -o glibevents.moc ++ ++#>+ 2 ++mocs: glibevents.moc ++ ++#>+ 3 + nsplugin.moc: $(srcdir)/nsplugin.h + $(MOC) $(srcdir)/nsplugin.h -o nsplugin.moc + +@@ -922,10 +800,10 @@ + + #>+ 3 + clean-metasources: +- -rm -f kxt.moc qxteventloop.moc nsplugin.moc ++ -rm -f kxt.moc qxteventloop.moc glibevents.moc nsplugin.moc + + #>+ 2 +-KDE_DIST=resolve.h Makefile.in nsplugin.h NSPluginClassIface.h qxteventloop.h kxt.h Makefile.am ++KDE_DIST=resolve.h Makefile.in nsplugin.h NSPluginClassIface.h qxteventloop.h kxt.h glibevents.h Makefile.am + + #>+ 5 + clean-idl: +@@ -975,11 +853,11 @@ + + + #>+ 11 +-nspluginviewer.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/nsplugin.cpp $(srcdir)/viewer.cpp $(srcdir)/kxt.cpp $(srcdir)/qxteventloop.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp kxt.moc qxteventloop.moc nsplugin.moc ++nspluginviewer.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/nsplugin.cpp $(srcdir)/viewer.cpp $(srcdir)/kxt.cpp $(srcdir)/qxteventloop.cpp $(srcdir)/glibevents.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp kxt.moc qxteventloop.moc glibevents.moc nsplugin.moc + @echo 'creating nspluginviewer.all_cpp.cpp ...'; \ + rm -f nspluginviewer.all_cpp.files nspluginviewer.all_cpp.final; \ + echo "#define KDE_USE_FINAL 1" >> nspluginviewer.all_cpp.final; \ +- for file in nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp ; do \ ++ for file in nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp ; do \ + echo "#include \"$$file\"" >> nspluginviewer.all_cpp.files; \ + test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> nspluginviewer.all_cpp.final; \ + done; \ +@@ -1010,17 +888,20 @@ + kde-rpo-clean: + -rm -f *.rpo + +-#>+ 14 ++#>+ 17 + NSPluginCallbackIface_stub.cpp: NSPluginCallbackIface_stub.h + kxt.o: kxt.moc + $(srcdir)/viewer.cpp: NSPluginCallbackIface_stub.h + $(srcdir)/nsplugin.cpp: NSPluginCallbackIface_stub.h ++$(srcdir)/glibevents.cpp: NSPluginCallbackIface_stub.h + qxteventloop.o: qxteventloop.moc +-$(srcdir)/qxteventloop.cpp: NSPluginCallbackIface_stub.h + nmcheck: +-kxt.lo: kxt.moc ++$(srcdir)/qxteventloop.cpp: NSPluginCallbackIface_stub.h + nmcheck-am: nmcheck ++kxt.lo: kxt.moc ++glibevents.o: glibevents.moc + nsplugin.lo: nsplugin.moc + nsplugin.o: nsplugin.moc ++glibevents.lo: glibevents.moc + qxteventloop.lo: qxteventloop.moc + $(srcdir)/kxt.cpp: NSPluginCallbackIface_stub.h +diff -urN kdebase-3.5.2/nsplugins/viewer/NSPluginClassIface.h new/nsplugins/viewer/NSPluginClassIface.h +--- kdebase-3.5.2/nsplugins/viewer/NSPluginClassIface.h 2005-11-19 11:08:29.000000000 +0000 ++++ new/nsplugins/viewer/NSPluginClassIface.h 2008-01-29 22:53:08.000000000 +0000 +@@ -47,10 +47,10 @@ + + k_dcop: + +- virtual DCOPRef newInstance(QString url, QString mimeType, bool embed, ++ virtual DCOPRef newInstance(QString url, QString mimeType, Q_INT8 embed, + QStringList argn, QStringList argv, +- QString appId, QString callbackId, bool reload, +- bool doPost, QByteArray postData) = 0; ++ QString appId, QString callbackId, Q_INT8 reload, ++ Q_INT8 doPost, QByteArray postData, Q_UINT32 xembed) = 0; + virtual QString getMIMEDescription() = 0; + + }; +@@ -66,11 +66,11 @@ + + virtual int winId() = 0; + +- virtual int setWindow(int remove=0) = 0; ++ virtual int setWindow(Q_INT8 remove=0) = 0; + +- virtual void resizePlugin(int w, int h) = 0; ++ virtual void resizePlugin(Q_INT32 w, Q_INT32 h) = 0; + +- virtual void javascriptResult(int id, QString result) = 0; ++ virtual void javascriptResult(Q_INT32 id, QString result) = 0; + + virtual void displayPlugin() = 0; + }; +diff -urN kdebase-3.5.2/nsplugins/viewer/glibevents.cpp new/nsplugins/viewer/glibevents.cpp +--- kdebase-3.5.2/nsplugins/viewer/glibevents.cpp 1970-01-01 00:00:00.000000000 +0000 ++++ new/nsplugins/viewer/glibevents.cpp 2008-01-29 22:53:08.000000000 +0000 +@@ -0,0 +1,43 @@ ++/* ++ Copyright (c) 2007 Lubos Lunak ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ ++*/ ++ ++#include "glibevents.h" ++ ++#include ++ ++GlibEvents::GlibEvents() ++ { ++ g_main_context_ref( g_main_context_default()); ++ connect( &timer, SIGNAL( timeout()), SLOT( process())); ++ // TODO Poll for now ++ timer.start( 10 ); ++ } ++ ++GlibEvents::~GlibEvents() ++ { ++ g_main_context_unref( g_main_context_default()); ++ } ++ ++void GlibEvents::process() ++ { ++ while( g_main_context_pending( g_main_context_default())) ++ g_main_context_iteration( g_main_context_default(), false ); ++ } ++ ++#include "glibevents.moc" +diff -urN kdebase-3.5.2/nsplugins/viewer/glibevents.h new/nsplugins/viewer/glibevents.h +--- kdebase-3.5.2/nsplugins/viewer/glibevents.h 1970-01-01 00:00:00.000000000 +0000 ++++ new/nsplugins/viewer/glibevents.h 2008-01-29 22:53:08.000000000 +0000 +@@ -0,0 +1,41 @@ ++/* ++ Copyright (c) 2007 Lubos Lunak ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ ++*/ ++ ++#ifndef GLIBEVENTS_H ++#define GLIBEVENTS_H ++ ++#include ++#include ++ ++#include ++ ++class GlibEvents ++ : public QWidget ++ { ++ Q_OBJECT ++ public: ++ GlibEvents(); ++ virtual ~GlibEvents(); ++ private slots: ++ void process(); ++ private: ++ QTimer timer; ++ }; ++ ++#endif +diff -urN kdebase-3.5.2/nsplugins/viewer/nsplugin.cpp new/nsplugins/viewer/nsplugin.cpp +--- kdebase-3.5.2/nsplugins/viewer/nsplugin.cpp 2006-03-17 10:17:36.000000000 +0000 ++++ new/nsplugins/viewer/nsplugin.cpp 2008-01-29 22:53:08.000000000 +0000 +@@ -180,6 +180,12 @@ + // Offline browsing - no thanks + *(bool*)value = false; + return NPERR_NO_ERROR; ++ case NPNVToolkit: ++ *(NPNToolkitType*)value = NPNVGtk2; ++ return NPERR_NO_ERROR; ++ case NPNVSupportsXEmbedBool: ++ *(bool*)value = true; ++ return NPERR_NO_ERROR; + default: + return NPERR_INVALID_PARAM; + } +@@ -484,6 +490,8 @@ + KProtocolManager kpm; + QString agent = kpm.userAgentForHost("nspluginviewer"); + kdDebug(1431) << "g_NPN_UserAgent() = " << agent << endl; ++ // flash crashes without Firefox UA ++ agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/2007101500 Firefox/2.0.0.10"; + return agent.latin1(); + } + +@@ -583,12 +591,11 @@ + KLibrary *handle, int width, int height, + QString src, QString /*mime*/, + QString appId, QString callbackId, +- bool embed, ++ bool embed, WId xembed, + QObject *parent, const char* name ) + : DCOPObject(), QObject( parent, name ) + { + Q_UNUSED(embed); +- _firstResize = true; + _visible = false; + _npp = privateData; + _npp->ndata = this; +@@ -600,6 +607,8 @@ + _streams.setAutoDelete( true ); + _waitingRequests.setAutoDelete( true ); + _callback = new NSPluginCallbackIface_stub( appId.latin1(), callbackId.latin1() ); ++ _xembed_window = xembed; ++ _toplevel = _form = 0; + + KURL base(src); + base.setFileName( QString::null ); +@@ -620,51 +629,53 @@ + if (height == 0) + height = 1200; + +- // create drawing area +- Arg args[7]; +- Cardinal nargs = 0; +- XtSetArg(args[nargs], XtNwidth, width); nargs++; +- XtSetArg(args[nargs], XtNheight, height); nargs++; +- XtSetArg(args[nargs], XtNborderWidth, 0); nargs++; +- +- String n, c; +- XtGetApplicationNameAndClass(qt_xdisplay(), &n, &c); +- +- _toplevel = XtAppCreateShell("drawingArea", c, applicationShellWidgetClass, +- qt_xdisplay(), args, nargs); +- +- // What exactly does widget mapping mean? Without this call the widget isn't +- // embedded correctly. With it the viewer doesn't show anything in standalone mode. +- //if (embed) +- XtSetMappedWhenManaged(_toplevel, False); +- XtRealizeWidget(_toplevel); +- +- // Create form window that is searched for by flash plugin +- _form = XtVaCreateWidget("form", compositeWidgetClass, _toplevel, NULL); +- XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++; +- XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++; +- XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++; +- XtSetValues(_form, args, nargs); +- XSync(qt_xdisplay(), false); ++ if( _xembed_window == 0 ) { ++ // create drawing area ++ Arg args[7]; ++ Cardinal nargs = 0; ++ XtSetArg(args[nargs], XtNwidth, width); nargs++; ++ XtSetArg(args[nargs], XtNheight, height); nargs++; ++ XtSetArg(args[nargs], XtNborderWidth, 0); nargs++; ++ ++ String n, c; ++ XtGetApplicationNameAndClass(qt_xdisplay(), &n, &c); ++ ++ _toplevel = XtAppCreateShell("drawingArea", c, applicationShellWidgetClass, ++ qt_xdisplay(), args, nargs); ++ ++ // What exactly does widget mapping mean? Without this call the widget isn't ++ // embedded correctly. With it the viewer doesn't show anything in standalone mode. ++ //if (embed) ++ XtSetMappedWhenManaged(_toplevel, False); ++ XtRealizeWidget(_toplevel); ++ ++ // Create form window that is searched for by flash plugin ++ _form = XtVaCreateWidget("form", compositeWidgetClass, _toplevel, NULL); ++ XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++; ++ XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++; ++ XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++; ++ XtSetValues(_form, args, nargs); ++ XSync(qt_xdisplay(), false); + +- // From mozilla - not sure if it's needed yet, nor what to use for embedder ++ // From mozilla - not sure if it's needed yet, nor what to use for embedder + #if 0 +- /* this little trick seems to finish initializing the widget */ ++ /* this little trick seems to finish initializing the widget */ + #if XlibSpecificationRelease >= 6 +- XtRegisterDrawable(qt_xdisplay(), embedderid, _toplevel); ++ XtRegisterDrawable(qt_xdisplay(), embedderid, _toplevel); + #else +- _XtRegisterWindow(embedderid, _toplevel); ++ _XtRegisterWindow(embedderid, _toplevel); + #endif + #endif +- XtRealizeWidget(_form); +- XtManageChild(_form); ++ XtRealizeWidget(_form); ++ XtManageChild(_form); + +- // Register forwarder +- XtAddEventHandler(_toplevel, (KeyPressMask|KeyReleaseMask), +- False, forwarder, (XtPointer)this ); +- XtAddEventHandler(_form, (KeyPressMask|KeyReleaseMask), +- False, forwarder, (XtPointer)this ); +- XSync(qt_xdisplay(), false); ++ // Register forwarder ++ XtAddEventHandler(_toplevel, (KeyPressMask|KeyReleaseMask), ++ False, forwarder, (XtPointer)this ); ++ XtAddEventHandler(_form, (KeyPressMask|KeyReleaseMask), ++ False, forwarder, (XtPointer)this ); ++ XSync(qt_xdisplay(), false); ++ } + } + + NSPluginInstance::~NSPluginInstance() +@@ -715,14 +726,16 @@ + if (saved) + g_NPN_MemFree(saved); + +- XtRemoveEventHandler(_form, (KeyPressMask|KeyReleaseMask), +- False, forwarder, (XtPointer)this); +- XtRemoveEventHandler(_toplevel, (KeyPressMask|KeyReleaseMask), +- False, forwarder, (XtPointer)this); +- XtDestroyWidget(_form); +- _form = 0; +- XtDestroyWidget(_toplevel); +- _toplevel = 0; ++ if( _form != 0 ) { ++ XtRemoveEventHandler(_form, (KeyPressMask|KeyReleaseMask), ++ False, forwarder, (XtPointer)this); ++ XtRemoveEventHandler(_toplevel, (KeyPressMask|KeyReleaseMask), ++ False, forwarder, (XtPointer)this); ++ XtDestroyWidget(_form); ++ _form = 0; ++ XtDestroyWidget(_toplevel); ++ _toplevel = 0; ++ } + + if (_npp) { + ::free(_npp); // matched with malloc() in newInstance +@@ -807,7 +820,7 @@ + s->post( url, req.data, req.mime, req.notify, req.args ); + } else if (url.lower().startsWith("javascript:")){ + if (_callback) { +- static int _jsrequestid = 0; ++ static Q_INT32 _jsrequestid = 0; + _jsrequests.insert(_jsrequestid, new Request(req)); + _callback->evalJavaScript(_jsrequestid++, url.mid(11)); + } else { +@@ -903,8 +916,7 @@ + _timer->start( 100, true ); + } + +- +-int NSPluginInstance::setWindow(int remove) ++int NSPluginInstance::setWindow(Q_INT8 remove) + { + if (remove) + { +@@ -927,14 +939,24 @@ + _win.clipRect.bottom = _height; + _win.clipRect.right = _width; + +- _win.window = (void*) XtWindow(_form); +- kdDebug(1431) << "Window ID = " << _win.window << endl; ++ if( _xembed_window ) { ++ _win.window = (void*) _xembed_window; ++ _win_info.type = NP_SETWINDOW; ++ _win_info.display = qt_xdisplay(); ++ _win_info.visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(qt_xdisplay())); ++ _win_info.colormap = DefaultColormapOfScreen(DefaultScreenOfDisplay(qt_xdisplay())); ++ _win_info.depth = DefaultDepthOfScreen(DefaultScreenOfDisplay(qt_xdisplay())); ++ } else { ++ _win.window = (void*) XtWindow(_form); + +- _win_info.type = NP_SETWINDOW; +- _win_info.display = XtDisplay(_form); +- _win_info.visual = DefaultVisualOfScreen(XtScreen(_form)); +- _win_info.colormap = DefaultColormapOfScreen(XtScreen(_form)); +- _win_info.depth = DefaultDepthOfScreen(XtScreen(_form)); ++ _win_info.type = NP_SETWINDOW; ++ _win_info.display = XtDisplay(_form); ++ _win_info.visual = DefaultVisualOfScreen(XtScreen(_form)); ++ _win_info.colormap = DefaultColormapOfScreen(XtScreen(_form)); ++ _win_info.depth = DefaultDepthOfScreen(XtScreen(_form)); ++ } ++ ++ kdDebug(1431) << "Window ID = " << _win.window << endl; + + _win.ws_info = &_win_info; + +@@ -958,11 +980,8 @@ + } + + +-void NSPluginInstance::resizePlugin(int w, int h) ++void NSPluginInstance::resizePlugin(Q_INT32 w, Q_INT32 h) + { +- if (!_visible) +- return; +- + if (w == _width && h == _height) + return; + +@@ -971,33 +990,38 @@ + _width = w; + _height = h; + +- XResizeWindow(qt_xdisplay(), XtWindow(_form), w, h); +- XResizeWindow(qt_xdisplay(), XtWindow(_toplevel), w, h); ++ if( _form != 0 ) { ++ XResizeWindow(qt_xdisplay(), XtWindow(_form), w, h); ++ XResizeWindow(qt_xdisplay(), XtWindow(_toplevel), w, h); ++ ++ Arg args[7]; ++ Cardinal nargs = 0; ++ XtSetArg(args[nargs], XtNwidth, _width); nargs++; ++ XtSetArg(args[nargs], XtNheight, _height); nargs++; ++ XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++; ++ XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++; ++ XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++; ++ XtSetArg(args[nargs], XtNborderWidth, 0); nargs++; ++ ++ XtSetValues(_toplevel, args, nargs); ++ XtSetValues(_form, args, nargs); ++ ++ resizeWidgets(XtWindow(_form), _width, _height); ++ } ++ ++ // If not visible yet, displayWindow() will call setWindow() again anyway, so avoid this. ++ // This also handled plugins that are broken and cannot handle repeated setWindow() calls ++ // very well. ++ if (!_visible) ++ return; + +- Arg args[7]; +- Cardinal nargs = 0; +- XtSetArg(args[nargs], XtNwidth, _width); nargs++; +- XtSetArg(args[nargs], XtNheight, _height); nargs++; +- XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++; +- XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++; +- XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++; +- XtSetArg(args[nargs], XtNborderWidth, 0); nargs++; +- +- XtSetValues(_toplevel, args, nargs); +- XtSetValues(_form, args, nargs); +- +- resizeWidgets(XtWindow(_form), _width, _height); +- +- if (_firstResize) { +- _firstResize = false; +- setWindow(); +- } ++ setWindow(); + + kdDebug(1431) << "<- NSPluginInstance::resizePlugin" << endl; + } + + +-void NSPluginInstance::javascriptResult(int id, QString result) { ++void NSPluginInstance::javascriptResult(Q_INT32 id, QString result) { + QMap::iterator i = _jsrequests.find( id ); + if (i != _jsrequests.end()) { + Request *req = i.data(); +@@ -1406,10 +1430,10 @@ + } + + +-DCOPRef NSPluginClass::newInstance( QString url, QString mimeType, bool embed, ++DCOPRef NSPluginClass::newInstance( QString url, QString mimeType, Q_INT8 embed, + QStringList argn, QStringList argv, + QString appId, QString callbackId, +- bool reload, bool doPost, QByteArray postData ) ++ Q_INT8 reload, Q_INT8 doPost, QByteArray postData, Q_UINT32 xembed ) + { + kdDebug(1431) << "-> NSPluginClass::NewInstance" << endl; + +@@ -1453,16 +1477,25 @@ + memset(npp, 0, sizeof(NPP_t)); + npp->ndata = NULL; + +- // Create plugin instance object +- NSPluginInstance *inst = new NSPluginInstance( npp, &_pluginFuncs, _handle, +- width, height, baseURL, mimeType, +- appId, callbackId, embed, this ); +- + // create plugin instance + NPError error = _pluginFuncs.newp(mime, npp, embed ? NP_EMBED : NP_FULL, + argc, _argn, _argv, 0); + kdDebug(1431) << "NPP_New = " << (int)error << endl; + ++ // don't use bool here, it can be 1 byte, but some plugins write it as int, and I can't find what the spec says ++ int wants_xembed = false; ++ if (_pluginFuncs.getvalue) { ++ NPError error = _pluginFuncs.getvalue(npp, (NPPVariable)14/*NPPVpluginNeedsXEmbed*/, &wants_xembed ); ++ if( error != NPERR_NO_ERROR ) ++ wants_xembed = false; ++ } ++ kdDebug(1431) << "Plugin requires XEmbed:" << (bool)wants_xembed << endl; ++ ++ // Create plugin instance object ++ NSPluginInstance *inst = new NSPluginInstance( npp, &_pluginFuncs, _handle, ++ width, height, baseURL, mimeType, ++ appId, callbackId, embed, wants_xembed ? xembed : 0, this ); ++ + // free arrays with arguments + delete [] _argn; + delete [] _argv; +@@ -1497,7 +1530,6 @@ + timer(); //_timer->start( 0, TRUE ); + } + +- + /****************************************************************************/ + + NSPluginStreamBase::NSPluginStreamBase( NSPluginInstance *instance ) +@@ -1520,8 +1552,6 @@ + + delete _tempFile; + _tempFile = 0; +- delete _queue; +- _queue = 0; + } + + +@@ -1602,6 +1632,12 @@ + return true; + } + ++void NSPluginStreamBase::updateURL( const KURL& newURL ) ++{ ++ _url = newURL; ++ free(const_cast(_stream->url)); ++ _stream->url = strdup(_url.url().ascii()); ++} + + int NSPluginStreamBase::process( const QByteArray &data, int start ) + { +@@ -1824,6 +1860,8 @@ + SLOT(totalSize(KIO::Job *, KIO::filesize_t))); + connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)), + SLOT(mimetype(KIO::Job *, const QString &))); ++ connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)), ++ SLOT(redirection(KIO::Job *, const KURL&))); + } + + return false; +@@ -1847,6 +1885,8 @@ + SLOT(totalSize(KIO::Job *, KIO::filesize_t))); + connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)), + SLOT(mimetype(KIO::Job *, const QString &))); ++ connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)), ++ SLOT(redirection(KIO::Job *, const KURL&))); + } + + return false; +@@ -1863,6 +1903,11 @@ + } + } + ++void NSPluginStream::redirection(KIO::Job * /*job*/, const KURL& url) ++{ ++ updateURL( url ); ++} ++ + void NSPluginStream::totalSize(KIO::Job * job, KIO::filesize_t size) + { + kdDebug(1431) << "NSPluginStream::totalSize - job=" << (void*)job << " size=" << KIO::number(size) << endl; +diff -urN kdebase-3.5.2/nsplugins/viewer/nsplugin.h new/nsplugins/viewer/nsplugin.h +--- kdebase-3.5.2/nsplugins/viewer/nsplugin.h 2005-11-19 11:08:29.000000000 +0000 ++++ new/nsplugins/viewer/nsplugin.h 2008-01-29 22:53:08.000000000 +0000 +@@ -46,6 +46,7 @@ + + + #define XP_UNIX ++#define MOZ_X11 + #include "sdk/npupp.h" + + typedef char* NP_GetMIMEDescriptionUPP(void); +@@ -85,6 +86,7 @@ + bool create( const QString& url, const QString& mimeType, void *notify, bool forceNotify = false ); + int tries() { return _tries; } + void inform( ); ++ void updateURL( const KURL& newURL ); + + class NSPluginInstance *_instance; + uint16 _streamType; +@@ -126,6 +128,7 @@ + void totalSize(KIO::Job *job, KIO::filesize_t size); + void mimetype(KIO::Job * job, const QString &mimeType); + void result(KIO::Job *job); ++ void redirection(KIO::Job *job, const KURL& url); + void resume(); + + protected: +@@ -162,16 +165,16 @@ + // constructor, destructor + NSPluginInstance( NPP privateData, NPPluginFuncs *pluginFuncs, KLibrary *handle, + int width, int height, QString src, QString mime, +- QString appId, QString callbackId, bool embed, ++ QString appId, QString callbackId, bool embed, WId xembed, + QObject *parent, const char* name=0 ); + ~NSPluginInstance(); + + // DCOP functions + void shutdown(); +- int winId() { return XtWindow(_form); } +- int setWindow(int remove=0); +- void resizePlugin(int w, int h); +- void javascriptResult(int id, QString result); ++ int winId() { return _form != 0 ? XtWindow(_form) : 0; } ++ int setWindow(Q_INT8 remove=0); ++ void resizePlugin(Q_INT32 w, Q_INT32 h); ++ void javascriptResult(Q_INT32 id, QString result); + void displayPlugin(); + + // value handling +@@ -218,7 +221,6 @@ + + bool _destroyed; + bool _visible; +- bool _firstResize; + void addTempFile(KTempFile *tmpFile); + QPtrList _tempFiles; + NSPluginCallbackIface_stub *_callback; +@@ -230,6 +232,7 @@ + NPPluginFuncs _pluginFuncs; + + Widget _area, _form, _toplevel; ++ WId _xembed_window; + QString _baseURL; + int _width, _height; + +@@ -276,10 +279,10 @@ + ~NSPluginClass(); + + QString getMIMEDescription(); +- DCOPRef newInstance(QString url, QString mimeType, bool embed, ++ DCOPRef newInstance(QString url, QString mimeType, Q_INT8 embed, + QStringList argn, QStringList argv, +- QString appId, QString callbackId, bool reload, bool post, +- QByteArray postData ); ++ QString appId, QString callbackId, Q_INT8 reload, Q_INT8 post, ++ QByteArray postData, Q_UINT32 xembed ); + void destroyInstance( NSPluginInstance* inst ); + bool error() { return _error; } + +diff -urN kdebase-3.5.2/nsplugins/viewer/qxteventloop.cpp new/nsplugins/viewer/qxteventloop.cpp +--- kdebase-3.5.2/nsplugins/viewer/qxteventloop.cpp 2005-09-10 08:25:39.000000000 +0000 ++++ new/nsplugins/viewer/qxteventloop.cpp 2008-01-29 22:53:08.000000000 +0000 +@@ -32,12 +32,16 @@ + ** not clear to you. + ** + **********************************************************************/ ++ ++#include ++ + #include "qxteventloop.h" + + #if QT_VERSION >= 0x030100 + + #include + #include ++#include + + // resolve the conflict between X11's FocusIn and QEvent::FocusIn + const int XFocusOut = FocusOut; +@@ -52,6 +56,8 @@ + + Boolean qmotif_event_dispatcher( XEvent *event ); + ++static void handle_xquerykeymap( Display* dpy, XEvent* event ); ++ + class QXtEventLoopPrivate + { + public: +@@ -147,6 +153,7 @@ + extern bool qt_try_modal( QWidget *, XEvent * ); // defined in qapplication_x11.cpp + Boolean qmotif_event_dispatcher( XEvent *event ) + { ++ handle_xquerykeymap( qt_xdisplay(), event ); + QApplication::sendPostedEvents(); + + QWidgetIntDict *mapper = &static_d->mapper; +@@ -462,6 +469,29 @@ + return ( (flags & WaitForMore) || ( pendingmask != 0 ) || nevents > 0 ); + } + ++#include ++ ++static char xquerykeymap_data[ 32 ]; ++static int (*real_xquerykeymap)( Display*, char[32] ) = NULL; ++ ++static void handle_xquerykeymap( Display* dpy, XEvent* event ) ++{ ++ if( real_xquerykeymap == NULL ) ++ real_xquerykeymap = (int (*)( Display*, char[32] )) dlsym( RTLD_NEXT, "XQueryKeymap" ); ++ if( event->type == XFocusIn || event->type == XKeyPress || event->type == XKeyRelease ) ++ real_xquerykeymap( dpy, xquerykeymap_data ); ++ if( event->type == XFocusOut ) ++ memset( xquerykeymap_data, 0, 32 ); ++} ++ ++extern "C" KDE_EXPORT ++int XQueryKeymap( Display* , char k[32] ) ++{ ++ memcpy( k, xquerykeymap_data, 32 ); ++ return 1; ++} ++ ++ + #include "qxteventloop.moc" + + #endif +diff -urN kdebase-3.5.2/nsplugins/viewer/viewer.cpp new/nsplugins/viewer/viewer.cpp +--- kdebase-3.5.2/nsplugins/viewer/viewer.cpp 2006-01-19 17:01:49.000000000 +0000 ++++ new/nsplugins/viewer/viewer.cpp 2008-01-29 22:53:08.000000000 +0000 +@@ -52,6 +52,7 @@ + #include + #else + #include "qxteventloop.h" ++#include "glibevents.h" + #endif + + /** +@@ -249,6 +250,7 @@ + + kdDebug(1430) << "4 - create KApplication" << endl; + KApplication app( argc, argv, "nspluginviewer" ); ++ GlibEvents glibevents; + #endif + + { +diff -urN kdebase-3.5.2/nsplugins/wrapper/Makefile.in new/nsplugins/wrapper/Makefile.in +--- kdebase-3.5.2/nsplugins/wrapper/Makefile.in 2008-01-29 22:26:50.000000000 +0000 ++++ new/nsplugins/wrapper/Makefile.in 2008-01-29 22:53:08.000000000 +0000 +@@ -1,9 +1,9 @@ +-# Makefile.in generated by automake 1.9.6 from Makefile.am. ++# Makefile.in generated by automake 1.10 from Makefile.am. + # KDE tags expanded automatically by am_edit - $Revision: 483858 $ + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005 Free Software Foundation, Inc. ++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,15 +15,11 @@ + + @SET_MAKE@ + +-srcdir = @srcdir@ +-top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +-top_builddir = ../.. + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +-INSTALL = @INSTALL@ + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c +@@ -62,17 +58,18 @@ + #>- libnswrapper_la_OBJECTS = $(am_libnswrapper_la_OBJECTS) + #>+ 1 + libnswrapper_la_OBJECTS = wrapper.lo +-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) ++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ + depcomp = $(SHELL) $(top_srcdir)/admin/depcomp + am__depfiles_maybe = depfiles + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ +- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ +- $(AM_CFLAGS) $(CFLAGS) ++LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) +-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ ++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ ++ $(LDFLAGS) -o $@ + SOURCES = $(libnswrapper_la_SOURCES) + DIST_SOURCES = $(libnswrapper_la_SOURCES) + ETAGS = etags +@@ -81,8 +78,6 @@ + #>+ 1 + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST) + ACLOCAL = @ACLOCAL@ +-AMDEP_FALSE = @AMDEP_FALSE@ +-AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + AR = @AR@ + ARTSCCONFIG = @ARTSCCONFIG@ +@@ -95,8 +90,6 @@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ + CFLAGS = @CFLAGS@ +-COMPILE_GL_INFO_FALSE = @COMPILE_GL_INFO_FALSE@ +-COMPILE_GL_INFO_TRUE = @COMPILE_GL_INFO_TRUE@ + CONF_FILES = @CONF_FILES@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ +@@ -132,16 +125,18 @@ + F77 = @F77@ + FFLAGS = @FFLAGS@ + FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@ ++FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ ++FREETYPE2_LDFLAGS = @FREETYPE2_LDFLAGS@ + GLINC = @GLINC@ + GLLIB = @GLLIB@ + GMSGFMT = @GMSGFMT@ ++GREP = @GREP@ + HALBACKEND = @HALBACKEND@ + HAL_CFLAGS = @HAL_CFLAGS@ + HAL_INCS = @HAL_INCS@ + HAL_LIBS = @HAL_LIBS@ +-HAVE_DNSSD_FALSE = @HAVE_DNSSD_FALSE@ +-HAVE_DNSSD_TRUE = @HAVE_DNSSD_TRUE@ + HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@ ++INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -229,7 +224,6 @@ + LIBTOOL = @LIBTOOL@ + LIBUCB = @LIBUCB@ + LIBUSBCONFIG = @LIBUSBCONFIG@ +-LIBUTEMPTER = @LIBUTEMPTER@ + LIBUTIL = @LIBUTIL@ + LIBXDMCP = @LIBXDMCP@ + LIBXFT_LIB = @LIBXFT_LIB@ +@@ -250,6 +244,7 @@ + LIB_KFM = @LIB_KFM@ + LIB_KHTML = @LIB_KHTML@ + LIB_KIMPROXY = @LIB_KIMPROXY@ ++LIB_KINFO = @LIB_KINFO@ + LIB_KIO = @LIB_KIO@ + LIB_KJS = @LIB_KJS@ + LIB_KNEWSTUFF = @LIB_KNEWSTUFF@ +@@ -280,14 +275,13 @@ + LN_S = @LN_S@ + LTLIBOBJS = @LTLIBOBJS@ + MAINT = @MAINT@ +-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ + MAKEKDEWIDGETS = @MAKEKDEWIDGETS@ + MCOPIDL = @MCOPIDL@ + MD5SUM = @MD5SUM@ + MD5SUM_CUT = @MD5SUM_CUT@ + MEINPROC = @MEINPROC@ ++MKDIR_P = @MKDIR_P@ + MOC = @MOC@ + MSGFMT = @MSGFMT@ + NOOPT_CFLAGS = @NOOPT_CFLAGS@ +@@ -332,6 +326,7 @@ + VERSION = @VERSION@ + WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@ + XGETTEXT = @XGETTEXT@ ++XMKMF = @XMKMF@ + XMLLINT = @XMLLINT@ + XTESTLIB = @XTESTLIB@ + X_EXTRA_LIBS = @X_EXTRA_LIBS@ +@@ -339,114 +334,42 @@ + X_LDFLAGS = @X_LDFLAGS@ + X_PRE_LIBS = @X_PRE_LIBS@ + X_RPATH = @X_RPATH@ +-ac_ct_AR = @ac_ct_AR@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_CXX = @ac_ct_CXX@ + ac_ct_F77 = @ac_ct_F77@ +-ac_ct_RANLIB = @ac_ct_RANLIB@ +-ac_ct_STRIP = @ac_ct_STRIP@ + all_includes = @all_includes@ + all_libraries = @all_libraries@ +-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ + am__tar = @am__tar@ + am__untar = @am__untar@ +-applnk_SUBDIR_included_FALSE = @applnk_SUBDIR_included_FALSE@ +-applnk_SUBDIR_included_TRUE = @applnk_SUBDIR_included_TRUE@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ ++builddir = @builddir@ + datadir = @datadir@ +-doc_SUBDIR_included_FALSE = @doc_SUBDIR_included_FALSE@ +-doc_SUBDIR_included_TRUE = @doc_SUBDIR_included_TRUE@ +-drkonqi_SUBDIR_included_FALSE = @drkonqi_SUBDIR_included_FALSE@ +-drkonqi_SUBDIR_included_TRUE = @drkonqi_SUBDIR_included_TRUE@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ + exec_prefix = @exec_prefix@ +-have_xcursor_FALSE = @have_xcursor_FALSE@ +-have_xcursor_TRUE = @have_xcursor_TRUE@ + host = @host@ + host_alias = @host_alias@ + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ +-include_ARTS_FALSE = @include_ARTS_FALSE@ +-include_ARTS_TRUE = @include_ARTS_TRUE@ +-include_BZIP2_FALSE = @include_BZIP2_FALSE@ +-include_BZIP2_TRUE = @include_BZIP2_TRUE@ +-include_EXR_MODULES_FALSE = @include_EXR_MODULES_FALSE@ +-include_EXR_MODULES_TRUE = @include_EXR_MODULES_TRUE@ +-include_fontinst_tn_FALSE = @include_fontinst_tn_FALSE@ +-include_fontinst_tn_TRUE = @include_fontinst_tn_TRUE@ +-include_kcontrol_access_FALSE = @include_kcontrol_access_FALSE@ +-include_kcontrol_access_TRUE = @include_kcontrol_access_TRUE@ +-include_kcontrol_accessibility_FALSE = @include_kcontrol_accessibility_FALSE@ +-include_kcontrol_accessibility_TRUE = @include_kcontrol_accessibility_TRUE@ +-include_kcontrol_joystick_FALSE = @include_kcontrol_joystick_FALSE@ +-include_kcontrol_joystick_TRUE = @include_kcontrol_joystick_TRUE@ +-include_kcontrol_kfontinst_FALSE = @include_kcontrol_kfontinst_FALSE@ +-include_kcontrol_kfontinst_TRUE = @include_kcontrol_kfontinst_TRUE@ +-include_kcontrol_randr_FALSE = @include_kcontrol_randr_FALSE@ +-include_kcontrol_randr_TRUE = @include_kcontrol_randr_TRUE@ +-include_kcontrol_smartcard_FALSE = @include_kcontrol_smartcard_FALSE@ +-include_kcontrol_smartcard_TRUE = @include_kcontrol_smartcard_TRUE@ +-include_kcontrol_usbview_FALSE = @include_kcontrol_usbview_FALSE@ +-include_kcontrol_usbview_TRUE = @include_kcontrol_usbview_TRUE@ +-include_kcontrol_view1394_FALSE = @include_kcontrol_view1394_FALSE@ +-include_kcontrol_view1394_TRUE = @include_kcontrol_view1394_TRUE@ +-include_kioslave_ldap_FALSE = @include_kioslave_ldap_FALSE@ +-include_kioslave_ldap_TRUE = @include_kioslave_ldap_TRUE@ +-include_kioslave_smb_FALSE = @include_kioslave_smb_FALSE@ +-include_kioslave_smb_TRUE = @include_kioslave_smb_TRUE@ +-include_kompmgr_FALSE = @include_kompmgr_FALSE@ +-include_kompmgr_TRUE = @include_kompmgr_TRUE@ +-include_ksysguardd_FALSE = @include_ksysguardd_FALSE@ +-include_ksysguardd_TRUE = @include_ksysguardd_TRUE@ +-include_ksysguardd_freebsd_FALSE = @include_ksysguardd_freebsd_FALSE@ +-include_ksysguardd_freebsd_TRUE = @include_ksysguardd_freebsd_TRUE@ +-include_ksysguardd_irix_FALSE = @include_ksysguardd_irix_FALSE@ +-include_ksysguardd_irix_TRUE = @include_ksysguardd_irix_TRUE@ +-include_ksysguardd_linux_FALSE = @include_ksysguardd_linux_FALSE@ +-include_ksysguardd_linux_TRUE = @include_ksysguardd_linux_TRUE@ +-include_ksysguardd_netbsd_FALSE = @include_ksysguardd_netbsd_FALSE@ +-include_ksysguardd_netbsd_TRUE = @include_ksysguardd_netbsd_TRUE@ +-include_ksysguardd_openbsd_FALSE = @include_ksysguardd_openbsd_FALSE@ +-include_ksysguardd_openbsd_TRUE = @include_ksysguardd_openbsd_TRUE@ +-include_ksysguardd_solaris_FALSE = @include_ksysguardd_solaris_FALSE@ +-include_ksysguardd_solaris_TRUE = @include_ksysguardd_solaris_TRUE@ +-include_ksysguardd_tru64_FALSE = @include_ksysguardd_tru64_FALSE@ +-include_ksysguardd_tru64_TRUE = @include_ksysguardd_tru64_TRUE@ +-include_media_halbackend_FALSE = @include_media_halbackend_FALSE@ +-include_media_halbackend_TRUE = @include_media_halbackend_TRUE@ +-include_media_linuxcdpolling_FALSE = @include_media_linuxcdpolling_FALSE@ +-include_media_linuxcdpolling_TRUE = @include_media_linuxcdpolling_TRUE@ +-include_x11_FALSE = @include_x11_FALSE@ +-include_x11_TRUE = @include_x11_TRUE@ ++htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ +-install_usbids_FALSE = @install_usbids_FALSE@ +-install_usbids_TRUE = @install_usbids_TRUE@ + jni_includes = @jni_includes@ +-kappfinder_SUBDIR_included_FALSE = @kappfinder_SUBDIR_included_FALSE@ +-kappfinder_SUBDIR_included_TRUE = @kappfinder_SUBDIR_included_TRUE@ +-kate_SUBDIR_included_FALSE = @kate_SUBDIR_included_FALSE@ +-kate_SUBDIR_included_TRUE = @kate_SUBDIR_included_TRUE@ +-kcheckpass_SUBDIR_included_FALSE = @kcheckpass_SUBDIR_included_FALSE@ +-kcheckpass_SUBDIR_included_TRUE = @kcheckpass_SUBDIR_included_TRUE@ +-kcminit_SUBDIR_included_FALSE = @kcminit_SUBDIR_included_FALSE@ +-kcminit_SUBDIR_included_TRUE = @kcminit_SUBDIR_included_TRUE@ +-kcontrol_SUBDIR_included_FALSE = @kcontrol_SUBDIR_included_FALSE@ +-kcontrol_SUBDIR_included_TRUE = @kcontrol_SUBDIR_included_TRUE@ +-kdcop_SUBDIR_included_FALSE = @kdcop_SUBDIR_included_FALSE@ +-kdcop_SUBDIR_included_TRUE = @kdcop_SUBDIR_included_TRUE@ + kde_appsdir = @kde_appsdir@ + kde_bindir = @kde_bindir@ + kde_confdir = @kde_confdir@ +@@ -469,100 +392,32 @@ + kde_templatesdir = @kde_templatesdir@ + kde_wallpaperdir = @kde_wallpaperdir@ + kde_widgetdir = @kde_widgetdir@ +-kdebugdialog_SUBDIR_included_FALSE = @kdebugdialog_SUBDIR_included_FALSE@ +-kdebugdialog_SUBDIR_included_TRUE = @kdebugdialog_SUBDIR_included_TRUE@ +-kdeeject_SUBDIR_included_FALSE = @kdeeject_SUBDIR_included_FALSE@ +-kdeeject_SUBDIR_included_TRUE = @kdeeject_SUBDIR_included_TRUE@ + kdeinitdir = @kdeinitdir@ +-kdepasswd_SUBDIR_included_FALSE = @kdepasswd_SUBDIR_included_FALSE@ +-kdepasswd_SUBDIR_included_TRUE = @kdepasswd_SUBDIR_included_TRUE@ +-kdeprint_SUBDIR_included_FALSE = @kdeprint_SUBDIR_included_FALSE@ +-kdeprint_SUBDIR_included_TRUE = @kdeprint_SUBDIR_included_TRUE@ +-kdesktop_SUBDIR_included_FALSE = @kdesktop_SUBDIR_included_FALSE@ +-kdesktop_SUBDIR_included_TRUE = @kdesktop_SUBDIR_included_TRUE@ +-kdesu_SUBDIR_included_FALSE = @kdesu_SUBDIR_included_FALSE@ +-kdesu_SUBDIR_included_TRUE = @kdesu_SUBDIR_included_TRUE@ +-kdialog_SUBDIR_included_FALSE = @kdialog_SUBDIR_included_FALSE@ +-kdialog_SUBDIR_included_TRUE = @kdialog_SUBDIR_included_TRUE@ +-kdm_SUBDIR_included_FALSE = @kdm_SUBDIR_included_FALSE@ +-kdm_SUBDIR_included_TRUE = @kdm_SUBDIR_included_TRUE@ +-kdmlib_SUBDIR_included_FALSE = @kdmlib_SUBDIR_included_FALSE@ +-kdmlib_SUBDIR_included_TRUE = @kdmlib_SUBDIR_included_TRUE@ +-kfind_SUBDIR_included_FALSE = @kfind_SUBDIR_included_FALSE@ +-kfind_SUBDIR_included_TRUE = @kfind_SUBDIR_included_TRUE@ +-khelpcenter_SUBDIR_included_FALSE = @khelpcenter_SUBDIR_included_FALSE@ +-khelpcenter_SUBDIR_included_TRUE = @khelpcenter_SUBDIR_included_TRUE@ +-khotkeys_SUBDIR_included_FALSE = @khotkeys_SUBDIR_included_FALSE@ +-khotkeys_SUBDIR_included_TRUE = @khotkeys_SUBDIR_included_TRUE@ +-kicker_SUBDIR_included_FALSE = @kicker_SUBDIR_included_FALSE@ +-kicker_SUBDIR_included_TRUE = @kicker_SUBDIR_included_TRUE@ +-kioslave_SUBDIR_included_FALSE = @kioslave_SUBDIR_included_FALSE@ +-kioslave_SUBDIR_included_TRUE = @kioslave_SUBDIR_included_TRUE@ +-klipper_SUBDIR_included_FALSE = @klipper_SUBDIR_included_FALSE@ +-klipper_SUBDIR_included_TRUE = @klipper_SUBDIR_included_TRUE@ +-kmenuedit_SUBDIR_included_FALSE = @kmenuedit_SUBDIR_included_FALSE@ +-kmenuedit_SUBDIR_included_TRUE = @kmenuedit_SUBDIR_included_TRUE@ +-knetattach_SUBDIR_included_FALSE = @knetattach_SUBDIR_included_FALSE@ +-knetattach_SUBDIR_included_TRUE = @knetattach_SUBDIR_included_TRUE@ +-konqueror_SUBDIR_included_FALSE = @konqueror_SUBDIR_included_FALSE@ +-konqueror_SUBDIR_included_TRUE = @konqueror_SUBDIR_included_TRUE@ +-konsole_SUBDIR_included_FALSE = @konsole_SUBDIR_included_FALSE@ +-konsole_SUBDIR_included_TRUE = @konsole_SUBDIR_included_TRUE@ +-kpager_SUBDIR_included_FALSE = @kpager_SUBDIR_included_FALSE@ +-kpager_SUBDIR_included_TRUE = @kpager_SUBDIR_included_TRUE@ +-kpersonalizer_SUBDIR_included_FALSE = @kpersonalizer_SUBDIR_included_FALSE@ +-kpersonalizer_SUBDIR_included_TRUE = @kpersonalizer_SUBDIR_included_TRUE@ +-kreadconfig_SUBDIR_included_FALSE = @kreadconfig_SUBDIR_included_FALSE@ +-kreadconfig_SUBDIR_included_TRUE = @kreadconfig_SUBDIR_included_TRUE@ +-kscreensaver_SUBDIR_included_FALSE = @kscreensaver_SUBDIR_included_FALSE@ +-kscreensaver_SUBDIR_included_TRUE = @kscreensaver_SUBDIR_included_TRUE@ +-ksmserver_SUBDIR_included_FALSE = @ksmserver_SUBDIR_included_FALSE@ +-ksmserver_SUBDIR_included_TRUE = @ksmserver_SUBDIR_included_TRUE@ +-ksplashml_SUBDIR_included_FALSE = @ksplashml_SUBDIR_included_FALSE@ +-ksplashml_SUBDIR_included_TRUE = @ksplashml_SUBDIR_included_TRUE@ +-kstart_SUBDIR_included_FALSE = @kstart_SUBDIR_included_FALSE@ +-kstart_SUBDIR_included_TRUE = @kstart_SUBDIR_included_TRUE@ +-ksysguard_SUBDIR_included_FALSE = @ksysguard_SUBDIR_included_FALSE@ +-ksysguard_SUBDIR_included_TRUE = @ksysguard_SUBDIR_included_TRUE@ +-ksystraycmd_SUBDIR_included_FALSE = @ksystraycmd_SUBDIR_included_FALSE@ +-ksystraycmd_SUBDIR_included_TRUE = @ksystraycmd_SUBDIR_included_TRUE@ +-ktip_SUBDIR_included_FALSE = @ktip_SUBDIR_included_FALSE@ +-ktip_SUBDIR_included_TRUE = @ktip_SUBDIR_included_TRUE@ +-kwin_SUBDIR_included_FALSE = @kwin_SUBDIR_included_FALSE@ +-kwin_SUBDIR_included_TRUE = @kwin_SUBDIR_included_TRUE@ +-kxkb_SUBDIR_included_FALSE = @kxkb_SUBDIR_included_FALSE@ +-kxkb_SUBDIR_included_TRUE = @kxkb_SUBDIR_included_TRUE@ +-l10n_SUBDIR_included_FALSE = @l10n_SUBDIR_included_FALSE@ +-l10n_SUBDIR_included_TRUE = @l10n_SUBDIR_included_TRUE@ + libdir = @libdir@ + libexecdir = @libexecdir@ +-libkonq_SUBDIR_included_FALSE = @libkonq_SUBDIR_included_FALSE@ +-libkonq_SUBDIR_included_TRUE = @libkonq_SUBDIR_included_TRUE@ ++localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + nogroup = @nogroup@ +-nsplugins_SUBDIR_included_FALSE = @nsplugins_SUBDIR_included_FALSE@ +-nsplugins_SUBDIR_included_TRUE = @nsplugins_SUBDIR_included_TRUE@ + oldincludedir = @oldincludedir@ +-pics_SUBDIR_included_FALSE = @pics_SUBDIR_included_FALSE@ +-pics_SUBDIR_included_TRUE = @pics_SUBDIR_included_TRUE@ ++pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ ++psdir = @psdir@ + qt_includes = @qt_includes@ + qt_libraries = @qt_libraries@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ +-supports_i8k_FALSE = @supports_i8k_FALSE@ +-supports_i8k_TRUE = @supports_i8k_TRUE@ ++srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target = @target@ + target_alias = @target_alias@ + target_cpu = @target_cpu@ + target_os = @target_os@ + target_vendor = @target_vendor@ +-unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@ +-unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@ ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ + x_includes = @x_includes@ + x_libraries = @x_libraries@ + xdg_appsdir = @xdg_appsdir@ +@@ -621,7 +476,7 @@ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" ++ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ +@@ -632,7 +487,7 @@ + + uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) +- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ ++ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ +@@ -647,7 +502,7 @@ + rm -f "$${dir}/so_locations"; \ + done + libnswrapper.la: $(libnswrapper_la_OBJECTS) $(libnswrapper_la_DEPENDENCIES) +- $(LINK) -rpath $(libdir) $(libnswrapper_la_LDFLAGS) $(libnswrapper_la_OBJECTS) $(libnswrapper_la_LIBADD) $(LIBS) ++ $(LINK) -rpath $(libdir) $(libnswrapper_la_OBJECTS) $(libnswrapper_la_LIBADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -658,22 +513,22 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrapper.Plo@am__quote@ + + .c.o: +-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c $< + + .c.obj: +-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + + .c.lo: +-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi ++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@@ -684,10 +539,6 @@ + clean-libtool: + -rm -rf .libs _libs + +-distclean-libtool: +- -rm -f libtool +-uninstall-info-am: +- + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ +@@ -737,22 +588,21 @@ + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + + distdir: $(DISTFILES) +- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ +- list='$(DISTFILES)'; for file in $$list; do \ +- case $$file in \ +- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ +- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ +- esac; \ ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ +- if test "$$dir" != "$$file" && test "$$dir" != "."; then \ +- dir="/$$dir"; \ +- $(mkdir_p) "$(distdir)$$dir"; \ +- else \ +- dir=''; \ +- fi; \ + if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ +@@ -768,7 +618,7 @@ + all-am: Makefile $(LTLIBRARIES) + installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ +- test -z "$$dir" || $(mkdir_p) "$$dir"; \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done + install: install-am + install-exec: install-exec-am +@@ -808,7 +658,7 @@ + -rm -rf ./$(DEPDIR) + -rm -f Makefile + distclean-am: clean-am distclean-compile distclean-generic \ +- distclean-libtool distclean-tags ++ distclean-tags + + dvi: dvi-am + +@@ -822,12 +672,20 @@ + + install-data-am: + ++install-dvi: install-dvi-am ++ + install-exec-am: install-libLTLIBRARIES + ++install-html: install-html-am ++ + install-info: install-info-am + + install-man: + ++install-pdf: install-pdf-am ++ ++install-ps: install-ps-am ++ + installcheck-am: + + maintainer-clean: maintainer-clean-am +@@ -848,20 +706,23 @@ + + ps-am: + +-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES ++uninstall-am: uninstall-libLTLIBRARIES ++ ++.MAKE: install-am install-strip + + .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ +- install install-am install-data install-data-am install-exec \ +- install-exec-am install-info install-info-am \ +- install-libLTLIBRARIES install-man install-strip installcheck \ ++ install install-am install-data install-data-am install-dvi \ ++ install-dvi-am install-exec install-exec-am install-html \ ++ install-html-am install-info install-info-am \ ++ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ ++ install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ +- tags uninstall uninstall-am uninstall-info-am \ +- uninstall-libLTLIBRARIES ++ tags uninstall uninstall-am uninstall-libLTLIBRARIES + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +--- kdebase-3.5.2/kcontrol/kcontrol/modules.cpp 2005-10-10 15:03:43.000000000 +0000 ++++ new/kcontrol/kcontrol/modules.cpp 2008-01-29 22:53:14.000000000 +0000 +@@ -48,7 +48,7 @@ + + ConfigModule::ConfigModule(const KService::Ptr &s) + : KCModuleInfo(s), _changed(false), _module(0), _embedWidget(0), +- _rootProcess(0), _embedLayout(0), _embedFrame(0) ++ _rootProcess(0), _embedLayout(0), _embedFrame(0), _embedStack(0) + { + } + +@@ -97,6 +97,8 @@ + + delete _embedWidget; + _embedWidget = 0; ++ delete _embedStack; ++ _embedStack = 0; + delete _embedFrame; + _embedFrame = 0; + kapp->syncX(); +@@ -136,6 +138,7 @@ + delete _rootProcess; + delete _embedWidget; + delete _embedLayout; ++ delete _embedStack; + + // create an embed widget that will embed the + // kcmshell running as root +@@ -149,14 +152,18 @@ + _embedFrame->setLineWidth( 2 ); + _embedFrame->setMidLineWidth( 2 ); + _embedLayout->addWidget(_embedFrame,1); +- _embedWidget = new QXEmbed(_embedFrame ); ++ // cannot reparent anything else inside QXEmbed, so put the busy label separately ++ _embedStack = new QWidgetStack(_embedFrame); ++ _embedWidget = new KControlEmbed(_embedStack); + _module->hide(); + _embedFrame->show(); +- QLabel *_busy = new QLabel(i18n("Loading..."), _embedWidget); ++ QLabel *_busy = new QLabel(i18n("Loading..."), _embedStack); + _busy->setAlignment(AlignCenter); + _busy->setTextFormat(RichText); + _busy->setGeometry(0,0, _module->width(), _module->height()); + _busy->show(); ++ _embedStack->raiseWidget(_busy); ++ connect(_embedWidget, SIGNAL( windowEmbedded(WId)), SLOT( embedded())); + + // prepare the process to run the kcmshell + QString cmd = service()->exec().stripWhiteSpace(); +@@ -191,7 +198,7 @@ + // We also don't have a way to close the module in that case. + *_rootProcess << "--n"; // Don't keep password. + if (kdeshell) { +- *_rootProcess << QString("kcmshell %1 --embed %2 --lang %3").arg(cmd).arg(_embedWidget->winId()).arg(KGlobal::locale()->language()); ++ *_rootProcess << QString("%1 %2 --embed %3 --lang %4").arg(locate("exe", "kcmshell")).arg(cmd).arg(_embedWidget->winId()).arg(KGlobal::locale()->language()); + } + else { + *_rootProcess << QString("%1 --embed %2 --lang %3").arg(cmd).arg(_embedWidget->winId()).arg( KGlobal::locale()->language() ); +@@ -209,6 +216,8 @@ + } + + // clean up in case of failure ++ delete _embedStack; ++ _embedStack = 0; + delete _embedFrame; + _embedWidget = 0; + delete _embedLayout; +@@ -239,6 +248,11 @@ + emit childClosed(); + } + ++void ConfigModule::embedded() ++{ ++ _embedStack->raiseWidget(_embedWidget); // put it above the busy label ++} ++ + const KAboutData *ConfigModule::aboutData() const + { + if (!_module) return 0; +--- kdebase-3.5.2/kcontrol/kcontrol/modules.h 2005-10-10 15:03:43.000000000 +0000 ++++ new/kcontrol/kcontrol/modules.h 2008-01-29 22:53:14.000000000 +0000 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + template class QPtrList; + class QStringList; +@@ -33,6 +34,7 @@ + class QXEmbed; + class QVBoxLayout; + class QVBox; ++class QWidgetStack; + + class ConfigModule : public QObject, public KCModuleInfo + { +@@ -62,6 +64,7 @@ + void clientChanged(bool state); + void runAsRoot(); + void rootExited(KProcess *proc); ++ void embedded(); + + + signals: +@@ -80,6 +83,7 @@ + KProcess *_rootProcess; + QVBoxLayout *_embedLayout; + QVBox *_embedFrame; ++ QWidgetStack *_embedStack; + + }; + +@@ -119,4 +123,14 @@ + QDict subMenus; + }; + ++class KControlEmbed : public QXEmbed ++ { ++ Q_OBJECT ++ public: ++ KControlEmbed( QWidget* w ) : QXEmbed( w ) {} ++ virtual void windowChanged( WId w ) { if( w ) emit windowEmbedded( w ); } ++ signals: ++ void windowEmbedded( WId w ); ++ }; ++ + #endif diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/kcontrol/kcontrol/modules.cpp /tmp/GWJuRwoDpG/kdebase-3.5.2/kcontrol/kcontrol/modules.cpp --- /tmp/onSlcgKOuX/kdebase-3.5.2/kcontrol/kcontrol/modules.cpp 2005-10-10 15:03:43.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/kcontrol/kcontrol/modules.cpp 2008-01-29 23:56:52.000000000 +0000 @@ -48,7 +48,7 @@ ConfigModule::ConfigModule(const KService::Ptr &s) : KCModuleInfo(s), _changed(false), _module(0), _embedWidget(0), - _rootProcess(0), _embedLayout(0), _embedFrame(0) + _rootProcess(0), _embedLayout(0), _embedFrame(0), _embedStack(0) { } @@ -97,6 +97,8 @@ delete _embedWidget; _embedWidget = 0; + delete _embedStack; + _embedStack = 0; delete _embedFrame; _embedFrame = 0; kapp->syncX(); @@ -136,6 +138,7 @@ delete _rootProcess; delete _embedWidget; delete _embedLayout; + delete _embedStack; // create an embed widget that will embed the // kcmshell running as root @@ -149,14 +152,18 @@ _embedFrame->setLineWidth( 2 ); _embedFrame->setMidLineWidth( 2 ); _embedLayout->addWidget(_embedFrame,1); - _embedWidget = new QXEmbed(_embedFrame ); + // cannot reparent anything else inside QXEmbed, so put the busy label separately + _embedStack = new QWidgetStack(_embedFrame); + _embedWidget = new KControlEmbed(_embedStack); _module->hide(); _embedFrame->show(); - QLabel *_busy = new QLabel(i18n("Loading..."), _embedWidget); + QLabel *_busy = new QLabel(i18n("Loading..."), _embedStack); _busy->setAlignment(AlignCenter); _busy->setTextFormat(RichText); _busy->setGeometry(0,0, _module->width(), _module->height()); _busy->show(); + _embedStack->raiseWidget(_busy); + connect(_embedWidget, SIGNAL( windowEmbedded(WId)), SLOT( embedded())); // prepare the process to run the kcmshell QString cmd = service()->exec().stripWhiteSpace(); @@ -191,7 +198,7 @@ // We also don't have a way to close the module in that case. *_rootProcess << "--n"; // Don't keep password. if (kdeshell) { - *_rootProcess << QString("kcmshell %1 --embed %2 --lang %3").arg(cmd).arg(_embedWidget->winId()).arg(KGlobal::locale()->language()); + *_rootProcess << QString("%1 %2 --embed %3 --lang %4").arg(locate("exe", "kcmshell")).arg(cmd).arg(_embedWidget->winId()).arg(KGlobal::locale()->language()); } else { *_rootProcess << QString("%1 --embed %2 --lang %3").arg(cmd).arg(_embedWidget->winId()).arg( KGlobal::locale()->language() ); @@ -209,6 +216,8 @@ } // clean up in case of failure + delete _embedStack; + _embedStack = 0; delete _embedFrame; _embedWidget = 0; delete _embedLayout; @@ -239,6 +248,11 @@ emit childClosed(); } +void ConfigModule::embedded() +{ + _embedStack->raiseWidget(_embedWidget); // put it above the busy label +} + const KAboutData *ConfigModule::aboutData() const { if (!_module) return 0; diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/kcontrol/kcontrol/modules.h /tmp/GWJuRwoDpG/kdebase-3.5.2/kcontrol/kcontrol/modules.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/kcontrol/kcontrol/modules.h 2005-10-10 15:03:43.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/kcontrol/kcontrol/modules.h 2008-01-29 23:56:52.000000000 +0000 @@ -23,6 +23,7 @@ #include #include #include +#include template class QPtrList; class QStringList; @@ -33,6 +34,7 @@ class QXEmbed; class QVBoxLayout; class QVBox; +class QWidgetStack; class ConfigModule : public QObject, public KCModuleInfo { @@ -62,6 +64,7 @@ void clientChanged(bool state); void runAsRoot(); void rootExited(KProcess *proc); + void embedded(); signals: @@ -80,6 +83,7 @@ KProcess *_rootProcess; QVBoxLayout *_embedLayout; QVBox *_embedFrame; + QWidgetStack *_embedStack; }; @@ -119,4 +123,14 @@ QDict subMenus; }; +class KControlEmbed : public QXEmbed + { + Q_OBJECT + public: + KControlEmbed( QWidget* w ) : QXEmbed( w ) {} + virtual void windowChanged( WId w ) { if( w ) emit windowEmbedded( w ); } + signals: + void windowEmbedded( WId w ); + }; + #endif diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/Makefile.am /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/Makefile.am --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/Makefile.am 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/Makefile.am 2008-01-29 23:56:53.000000000 +0000 @@ -14,13 +14,16 @@ libnsplugin_la_LIBADD = -lkparts bin_PROGRAMS = nspluginscan -nspluginscan_SOURCES = pluginscan.cpp +nspluginscan_SOURCES = pluginscan.cpp nspluginscan_LDFLAGS = $(KDE_RPATH) $(all_libraries) -export-dynamic -nspluginscan_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt +nspluginscan_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt libpluginpaths.la -kcm_nsplugins_la_SOURCES = kcm_nsplugins.cpp +kcm_nsplugins_la_SOURCES = kcm_nsplugins.cpp kcm_nsplugins_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -kcm_nsplugins_la_LIBADD = $(LIB_KDECORE) +kcm_nsplugins_la_LIBADD = $(LIB_KDECORE) libpluginpaths.la + +noinst_LTLIBRARIES = libpluginpaths.la +libpluginpaths_la_SOURCES = plugin_paths.cpp xdg_apps_DATA = khtml_plugins.desktop diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/Makefile.in /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/Makefile.in --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/Makefile.in 2008-01-29 23:56:31.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/Makefile.in 2008-01-29 23:56:53.000000000 +0000 @@ -62,9 +62,10 @@ am__installdirs = "$(DESTDIR)$(kde_moduledir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(partrcdir)" "$(DESTDIR)$(xdg_appsdir)" kde_moduleLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(kde_module_LTLIBRARIES) +LTLIBRARIES = $(kde_module_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -kcm_nsplugins_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +kcm_nsplugins_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + libpluginpaths.la am_kcm_nsplugins_la_OBJECTS = kcm_nsplugins.lo #>- kcm_nsplugins_la_OBJECTS = $(am_kcm_nsplugins_la_OBJECTS) #>+ 1 @@ -77,6 +78,11 @@ libnsplugin_la_nofinal_OBJECTS = plugin_part.lo nspluginloader.lo NSPluginClassIface_stub.lo NSPluginCallbackIface_skel.lo @KDE_USE_FINAL_FALSE@libnsplugin_la_OBJECTS = $(libnsplugin_la_nofinal_OBJECTS) @KDE_USE_FINAL_TRUE@libnsplugin_la_OBJECTS = $(libnsplugin_la_final_OBJECTS) +libpluginpaths_la_LIBADD = +am_libpluginpaths_la_OBJECTS = plugin_paths.lo +#>- libpluginpaths_la_OBJECTS = $(am_libpluginpaths_la_OBJECTS) +#>+ 1 +libpluginpaths_la_OBJECTS = plugin_paths.lo binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_nspluginscan_OBJECTS = pluginscan.$(OBJEXT) @@ -84,7 +90,7 @@ #>+ 1 nspluginscan_OBJECTS = pluginscan.$(OBJEXT) nspluginscan_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) libpluginpaths.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles @@ -107,9 +113,9 @@ CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(kcm_nsplugins_la_SOURCES) $(libnsplugin_la_SOURCES) \ - $(nspluginscan_SOURCES) + $(libpluginpaths_la_SOURCES) $(nspluginscan_SOURCES) DIST_SOURCES = $(kcm_nsplugins_la_SOURCES) $(libnsplugin_la_SOURCES) \ - $(nspluginscan_SOURCES) + $(libpluginpaths_la_SOURCES) $(nspluginscan_SOURCES) #>- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ #>- html-recursive info-recursive install-data-recursive \ #>- install-exec-recursive install-info-recursive \ @@ -639,14 +645,16 @@ #>+ 1 libnsplugin_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_PLUGIN) -no-undefined $(KDE_NO_UNDEFINED) libnsplugin_la_LIBADD = -lkparts -nspluginscan_SOURCES = pluginscan.cpp +nspluginscan_SOURCES = pluginscan.cpp nspluginscan_LDFLAGS = $(KDE_RPATH) $(all_libraries) -export-dynamic -nspluginscan_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt -kcm_nsplugins_la_SOURCES = kcm_nsplugins.cpp +nspluginscan_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt libpluginpaths.la +kcm_nsplugins_la_SOURCES = kcm_nsplugins.cpp #>- kcm_nsplugins_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined #>+ 1 kcm_nsplugins_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED) -kcm_nsplugins_la_LIBADD = $(LIB_KDECORE) +kcm_nsplugins_la_LIBADD = $(LIB_KDECORE) libpluginpaths.la +noinst_LTLIBRARIES = libpluginpaths.la +libpluginpaths_la_SOURCES = plugin_paths.cpp xdg_apps_DATA = khtml_plugins.desktop partrcdir = $(kde_datadir)/plugin partrc_DATA = nspluginpart.rc @@ -725,6 +733,15 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done #>- kcm_nsplugins.la: $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_DEPENDENCIES) #>+ 2 @KDE_USE_CLOSURE_TRUE@kcm_nsplugins.la: kcm_nsplugins.la.closure $(kcm_nsplugins_la_OBJECTS) $(kcm_nsplugins_la_DEPENDENCIES) @@ -735,6 +752,8 @@ @KDE_USE_CLOSURE_TRUE@libnsplugin.la: libnsplugin.la.closure $(libnsplugin_la_OBJECTS) $(libnsplugin_la_DEPENDENCIES) @KDE_USE_CLOSURE_FALSE@libnsplugin.la: $(libnsplugin_la_OBJECTS) $(libnsplugin_la_DEPENDENCIES) $(CXXLINK) -rpath $(kde_moduledir) $(libnsplugin_la_LDFLAGS) $(libnsplugin_la_OBJECTS) $(libnsplugin_la_LIBADD) $(LIBS) +libpluginpaths.la: $(libpluginpaths_la_OBJECTS) $(libpluginpaths_la_DEPENDENCIES) + $(CXXLINK) $(libpluginpaths_la_LDFLAGS) $(libpluginpaths_la_OBJECTS) $(libpluginpaths_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @@ -776,6 +795,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcm_nsplugins.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nspluginloader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_part.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_paths.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pluginscan.Po@am__quote@ .cpp.o: @@ -1054,10 +1074,10 @@ clean: kde-rpo-clean clean-recursive #>- clean-am: clean-binPROGRAMS clean-generic clean-kde_moduleLTLIBRARIES \ -#>- clean-libtool mostlyclean-am +#>- clean-libtool clean-noinstLTLIBRARIES mostlyclean-am #>+ 2 clean-am: clean-metasources clean-idl clean-closures clean-bcheck clean-final clean-binPROGRAMS clean-generic clean-kde_moduleLTLIBRARIES \ - clean-libtool mostlyclean-am + clean-libtool clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -1117,19 +1137,20 @@ .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-binPROGRAMS clean-generic \ - clean-kde_moduleLTLIBRARIES clean-libtool clean-recursive \ - ctags ctags-recursive distclean distclean-compile \ - distclean-generic distclean-libtool distclean-recursive \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-kde_moduleLTLIBRARIES install-man \ - install-partrcDATA install-strip install-xdg_appsDATA \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + clean-kde_moduleLTLIBRARIES clean-libtool \ + clean-noinstLTLIBRARIES clean-recursive ctags ctags-recursive \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-recursive distclean-tags distdir \ + dvi dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-exec \ + install-exec-am install-info install-info-am \ + install-kde_moduleLTLIBRARIES install-man install-partrcDATA \ + install-strip install-xdg_appsDATA installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am \ uninstall-kde_moduleLTLIBRARIES uninstall-partrcDATA \ uninstall-xdg_appsDATA @@ -1190,7 +1211,7 @@ -rm -f nspluginloader.moc plugin_part.moc #>+ 2 -KDE_DIST=khtml_plugins.desktop TESTCASES Makefile.in plugin_part.h NSPluginCallbackIface.h nspluginpart.rc HOWTO.DEBUG Makefile.am +KDE_DIST=khtml_plugins.desktop TESTCASES Makefile.in plugin_part.h NSPluginCallbackIface.h nspluginpart.rc HOWTO.DEBUG plugin_paths.h Makefile.am #>+ 5 clean-idl: diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/NSPluginCallbackIface.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/NSPluginCallbackIface.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/NSPluginCallbackIface.h 2005-10-10 15:04:05.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/NSPluginCallbackIface.h 2008-01-29 23:56:53.000000000 +0000 @@ -37,7 +37,7 @@ virtual ASYNC requestURL(QString url, QString target) = 0; virtual ASYNC postURL(QString url, QString target, QByteArray data, QString mime) = 0; virtual ASYNC statusMessage( QString msg ) = 0; - virtual ASYNC evalJavaScript( int id, QString script ) = 0; + virtual ASYNC evalJavaScript( Q_INT32 id, QString script ) = 0; }; diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/kcm_nsplugins.cpp /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/kcm_nsplugins.cpp --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/kcm_nsplugins.cpp 2005-10-10 15:04:05.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/kcm_nsplugins.cpp 2008-01-29 23:56:53.000000000 +0000 @@ -36,6 +36,54 @@ #include #include +#include "plugin_paths.h" + +static QDateTime lastChanged( QString dir ) +{ + QDateTime t = QFileInfo( dir ).lastModified(); + if( t.isNull()) + return t; + QStringList subdirs = QDir( dir ).entryList(); + for( QStringList::ConstIterator it = subdirs.begin(); + it != subdirs.end(); + ++it ) + { + if( *it == "." || *it == ".." ) + continue; + QDateTime t2 = lastChanged( *it ); + if( !t2.isNull() && t2 > t ) + t = t2; + } + return t; +} + +static bool checkSearchPathTimestamps( QStringList paths, QStringList timestamps ) +{ + QStringList currentTimestamps; + bool changed = false; + QStringList::ConstIterator t = timestamps.begin(); + for( QStringList::ConstIterator it = paths.begin(); + it != paths.end(); + ++it, ++t ) + { + QDateTime current = lastChanged( *it ); + // store non-existent directory as "N" string rather than empty string, KConfig + // has a bug with storing a list of empty items + if( *t == "N" ? !current.isNull() : current != QDateTime::fromString( *t, Qt::ISODate )) + changed = true; + currentTimestamps.append( current.isNull() ? "N" : current.toString( Qt::ISODate )); + } + if( changed ) + { + KConfig config("kcmnspluginrc"); + config.setGroup("Misc"); + config.writeEntry( "lastSearchPaths", paths ); + config.writeEntry( "lastSearchTimestamps", currentTimestamps ); + return true; + } + return false; +} + extern "C" { KDE_EXPORT void init_nsplugin() @@ -44,6 +92,26 @@ config->setGroup("Misc"); bool scan = config->readBoolEntry( "startkdeScan", false ); bool firstTime = config->readBoolEntry( "firstTime", true ); + + if( !scan ) + { + // check if plugins have changed, as just ignoring everything and requiring the user + // to trigger the check manually is not reasonable - that probably actually obsoletes + // both options + QStringList searchPaths = getSearchPaths(); + QStringList lastSearchPaths = config->readListEntry( "lastSearchPaths" ); + QStringList lastTimestamps = config->readListEntry ( "lastSearchTimestamps" ); + if( searchPaths != lastSearchPaths || lastTimestamps.count() != lastSearchPaths.count()) + { // count changed, set empty timestamps, still call checkSearchPathTimestamps() + // in order to save the current timestamps for the next time + lastSearchPaths = searchPaths; + lastTimestamps.clear(); + lastTimestamps.insert( lastTimestamps.end(), searchPaths.count(), "N" ); + scan = true; + } + if( checkSearchPathTimestamps( lastSearchPaths, lastTimestamps )) + scan = true; + } delete config; if ( scan || firstTime ) diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/khtml_plugins.desktop /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/khtml_plugins.desktop --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/khtml_plugins.desktop 2006-03-17 10:17:36.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/khtml_plugins.desktop 2008-01-29 23:56:53.000000000 +0000 @@ -14,32 +14,34 @@ Name=Plugins Name[af]=Inprop modules -Name[ar]=الملحقات Name[az]=Əlavələr -Name[be]=Дапаўненьні +Name[be]=Утулкі Name[bg]=Приставки Name[bn]=প্লাগ-ইন Name[br]=Lugantoù Name[bs]=Dodaci Name[ca]=Connectors Name[cs]=Moduly +Name[csb]=Pluginsë Name[cy]=Ategion Name[da]=Plugin Name[el]=Πρόσθετα Name[eo]=Kromaĵoj +Name[es]=Complementos Name[et]=Pluginad Name[eu]=Pluginak -Name[fa]=متصل‌کننده +Name[fa]=وصله‌ها Name[fi]=Liitännäiset Name[fr]=Modules externes Name[ga]=Breiseáin Name[he]=תוספים Name[hi]=प्लगइन्स -Name[hr]=Umetci +Name[hr]=Dodaci Name[hu]=Bővítőmodulok Name[is]=Íforrit Name[it]=Plugin Name[ja]=プラグイン +Name[kk]=Модульдер Name[km]=កម្មវិធី​ជំនួយ Name[ko]=플러그인 Name[lo]=ລງບ @@ -50,9 +52,10 @@ Name[ms]=Plugin Name[mt]=Plagins Name[nb]=Programtillegg +Name[ne]=प्लगइन Name[nn]=Programtillegg Name[nso]=Ditsenyo -Name[pa]=ਪਲੱਗਿੰਨ +Name[pa]=ਪਲੱਗਇਨ Name[pl]=Wtyczki Name[pt]='Plugins' Name[pt_BR]=Plug-ins @@ -67,12 +70,14 @@ Name[ss]=Ema- Plugin Name[sv]=Insticksprogram Name[ta]=செருகல்கள் +Name[te]=ప్లగిన్లు Name[tg]=Мутассалкунандаҳо Name[th]=ปลั๊กอิน Name[tr]=Eklentiler Name[tt]=Quşımta Name[uk]=Втулки Name[uz]=Плагинлар +Name[vi]=Các trình bổ sung Name[wa]=Tchôke-divins Name[xh]=Iiplagi ezingaphakathi Name[zh_CN]=插件 @@ -80,23 +85,24 @@ Name[zu]=Ama-Plugin Comment=Configure the browser plugins Comment[af]=Konfigureer die blaaier inprop modules -Comment[ar]=إعداد ملحقات المتصفح Comment[az]=Səyyah əlavələrini quraşdırın -Comment[bg]=Настройки на приставките на браузъра +Comment[be]=Настаўленні модуляў вандроўніка +Comment[bg]=Настройване приставките на браузъра Comment[bn]=বিভিন্ন ব্রাউজার প্লাগ-ইন কনফিগার করুন Comment[br]=Kefluniañ lugantoù ar furcher Comment[bs]=Podesite dodatke preglednika (browser plugins) Comment[ca]=Aquí podeu configurar els connectors del navegador Comment[cs]=Nastavení modulů prohlížeče (pluginy) +Comment[csb]=Kònfigùracëjô pluginsów przezérnika Comment[cy]=Ffurfweddu ategion y porydd Comment[da]=Indstil browserens plugin -Comment[de]=Plugins für Web-Browser einrichten +Comment[de]=Plugins für Webbrowser einrichten Comment[el]=Ρυθμίστε τα πρόσθετα του περιηγητή Comment[eo]=Agordu la foliumilajn kromaĵojn -Comment[es]=Configuración de los plugins del navegador +Comment[es]=Configurar los complementos del navegador Comment[et]=Veebilehitseja pluginate seadistamine Comment[eu]=Konfiguratu arakatzailearen pluginak -Comment[fa]=تنظیم متصل‌کننده‌های مرورگر +Comment[fa]=پیکربندی وصله‌های مرورگر Comment[fi]=Muokkaa selaimen liitännäisasetuksia Comment[fr]=Configuration des modules externes du navigateur Comment[fy]=Hjir kinne jo de blêder-plugins ynstelle @@ -104,26 +110,28 @@ Comment[gl]=Configurar os plugins do navegador Comment[he]=שינוי הגדרות התוספים של הדפדפן Comment[hi]=ब्राउज़र प्लगइन कॉन्फ़िगर करें -Comment[hr]=Podešavanje pretraživačevih umetaka +Comment[hr]=Konfiguriranje dodataka preglednika Comment[hu]=A böngésző bővítőmoduljainak beállításai Comment[is]=Stilla íforrit vafra Comment[it]=Configura i plugin del browser Comment[ja]=ブラウザのプラグインの設定 +Comment[kk]=Браузер модульдерінің баптауы Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​កម្មវិធី​ជំនួយ​របស់​កម្មវិធី​រុករក Comment[ko]=탐색기 플러그인을 설정합니다 Comment[lo]=ປັກອິນສອດສອ່ງຊີພີຍູ Comment[lt]=Konfigūruoti naršyklės priedus Comment[lv]=Konfigurēt pārlūka spaudņus -Comment[mk]=Конфигурирај ги приклучоците на прелистувачот +Comment[mk]=Конфигурација на приклучоците на прелистувачот Comment[mn]=Вэб хөтөчийн плугин тохируулга Comment[ms]=Tetapkan plugin pelayar Comment[mt]=Ikkonfigura l-plugins tal-browser Comment[nb]=Sett opp programtillegg for nettleseren Comment[nds]=Kiekerplugins instellen +Comment[ne]=प्लगइन ब्राउजर कन्फिगर गर्नुहोस् Comment[nl]=Hier kunt u de browser-plugins instellen Comment[nn]=Set opp programtillegg for nettlesaren Comment[nso]=Beakanya ditsenyo tsa seinyakisi -Comment[pa]=ਝਲਕਾਰਾ ਪਲੱਗਿੰਨ ਸੰਰਚਨਾ +Comment[pa]=ਝਲਕਾਰਾ ਪਲੱਗਇਨ ਸੰਰਚਨਾ Comment[pl]=Konfiguracja wtyczek przeglądarki Comment[pt]=Configurar os 'plugins' do navegador Comment[pt_BR]=Configura os plug-ins do navegador @@ -144,7 +152,7 @@ Comment[uk]=Налаштування втулків навігатора Comment[uz]=Браузернинг плагинларини мослаш Comment[ven]=Dzudzanyani plugins ya burausa -Comment[vi]=Cấu hình plugin cho trình duyệt +Comment[vi]=Cấu hình trình bổ sung cho trình duyệt Comment[wa]=Apontyî les tchôke-divins do betchteu Comment[xh]=Qwalasela umkhangheli zincwadi zeplagi ezingaphakathi Comment[zh_CN]=配置浏览器插件 @@ -152,19 +160,21 @@ Comment[zu]=Hlanganisela ama-plugin omcingi Keywords=konqueror,kfm,browser,html,web,www,fonts,plugins Keywords[az]=konqueror,kfm,browser,html,web,www,fonts,plugins,konqueror,kfm,səyyah,html,şəbəkə,www,yazı növləri,rənglər,java,javascript,hərf,hərf dəstəsi,kodlama,bağlantılar,rəsmlər,ox -Keywords[bg]=приставки, конфигуриране, браузър, уеб, шрифтове, Интернет, приставка, модул, konqueror, kfm, browser, html, web, www, fonts, plugins +Keywords[be]=Вандроўнік,Сеціва,Шрыфты,Утулкі,konqueror,kfm,browser,html,web,www,fonts,plugins +Keywords[bg]=приставки, настройване, браузър, уеб, шрифтове, Интернет, приставка, модул, konqueror, kfm, browser, html, web, www, fonts, plugins Keywords[br]=konqueror,kfm,furcher,html,web,gwiad,livioù,java,javascript -Keywords[ca]=konqueror,kfm,navegador,html,web,www,fonts,connectors +Keywords[ca]=konqueror,kfm,navegador,html,web,www,lletres,connectors Keywords[cs]=Konqueror,Kfm,Prohlížeč,HTML,Web,WWW,Písma,Moduly +Keywords[csb]=konqueror,kfm,przezérnik,html,séc,www,fòntë,pluginsë Keywords[cy]=konqueror,kfm,porwr,porydd,html,gwe,www,wynebfathau,ffontiau,ategion Keywords[da]=konqueror,kfm,browser,html,net,www,skrifttyper,plugin Keywords[de]=Konqueror,kfm,Browser,HTML,Web,WWW,Schriften,Plugins Keywords[el]=konqueror,kfm,περιηγητής,html,ιστός,www,γραμματοσειρές,πρόσθετα Keywords[eo]=Konkeranto,Kfm,TTT,HTML,WWW,tiparo,koloro,Javo,Javoskripto,kursoro, kursilo,ligo,referenco,bildo,signaro,kodo -Keywords[es]=konqueror,kfm,navegador,html,web,www,fuentes,plugins +Keywords[es]=konqueror,kfm,navegador,html,web,www,tipos de letra,complementos Keywords[et]=konqueror,kfm,veebilehitseja,html,veeb,www,fondid,pluginad Keywords[eu]=konqueror,kfm,arakatzailea,html,web,www,letra-tipoak,pluginak -Keywords[fa]=konqueror,kfm,browser,html,web,www,fonts,plugins,متصل,کانکرر,قلم,خط +Keywords[fa]=konqueror، kfm، مرورگر، html، وب، www، قلمها، وصله‌ها Keywords[fi]=konqueror,kfm,selain,html,web,www,kirjasimet,liitännäiset Keywords[fr]=konqueror,kfm,navigateur,html,web,www,polices,plugins,modules externes Keywords[fy]=konqueror,kfm,browser,blêder,html,web,www,fonts,lettertypen,plugins,internet,ynternet,netscape plugins @@ -172,11 +182,11 @@ Keywords[gl]=konqueror,kfm,navegador,html,web,www,fontes,plugins Keywords[he]=konqueror,kfm,דפדפן,html,web,www,אינטרנט,גופנים,תוספים, fonts,plugins Keywords[hi]=कॉन्करर केएफएम,ब्राउजर,एचटीएमएल,वेब,डब्ल्यूडब्ल्यूडब्ल्यू,फ़ॉन्ट्स,प्लगइन्स -Keywords[hr]=konqueror,kfm,pretraživač,html,web,www,pismavi,dodaci +Keywords[hr]=konqueror,kfm,preglednik,html,web,www,fontovi,dodaci,mreža Keywords[hu]=Konqueror,kfm,böngésző,HTML,web,WWW,betűtípusok,bővítőmodulok Keywords[is]=konqueror,kfm,flakkari,html,web,www,letur,íforrit,vefur Keywords[it]=konqueror,kfm,browser,html,web,www,caratteri,plugin -Keywords[ja]=konqueror,kfm,ブラウザ,html,web,www,フォント,プラグイン +Keywords[ja]=konqueror,kfm,ブラウザ,html,web,ウェブ,www,フォント,プラグイン Keywords[km]=konqueror,kfm,កម្មវិធី​រុករក,html,បណ្ដាញ,វើលវ៉ាយវិប,ពុម្ពអក្សរ,កម្មវិធី​ជំនួយ Keywords[lt]=konqueror,kfm,browser,html,web,www,fonts,plugins. naršyklė,tinklalapiai,šriftai,priedai Keywords[lv]=iekarotājs,kfm,pārlūks,html,web,www,fonti,spraudņi @@ -186,10 +196,11 @@ Keywords[mt]=konqueror,kfm,browser,html,web,www,fonts,plugins,plagins Keywords[nb]=Konqueror,KFM,nettleser,HTML,verdensveven,WWW,Internett,skrifter,programtillegg Keywords[nds]=Konqueror,kfm,Nettkieker,HTML,web,www,Schriftoorden,Plugins +Keywords[ne]=कन्क्वेरर,kfm, ब्राउजर,html, वेब,www, फन्ट, प्लगइन Keywords[nl]=konqueror,kfm,browser,html,web,www,fonts,lettertypen,plugins,internet,netscape plugins Keywords[nn]=Konqueror,KFM,nettlesar,HTML,verdsveven,WWW,skrifter,programtillegg Keywords[nso]=konqueror,kfm,senyakisi,html,web,www,difonto,ditsenyo -Keywords[pa]=konqueror,kfm,browser,html,web,www,ਫੋਂਟ,ਪਲੱਗਿੰਨ,ਕੋਨਕਿਉਰਰ,ਝਲਕਾਰਾ,ਵੈਬ +Keywords[pa]=konqueror,kfm,browser,html,web,www,ਫੋਂਟ,ਪਲੱਗਇਨ,ਕੋਨਕਿਉਰਰ,ਝਲਕਾਰਾ,ਵੈਬ Keywords[pl]=konqueror,kfm,przeglądarka,html,sieć,www,czcionki,wtyczki Keywords[pt]=konqueror,kfm,navegador,HTML,web,WWW,tipos de letra,'plugins' Keywords[pt_BR]=konqueror,kfm,navegador,html,web,www,fontes,plug-ins @@ -208,7 +219,7 @@ Keywords[tt]=konqueror,kfm,browser,html,web,www,fonts,plugins,quşımta,şäkel,päräwez,çeltär Keywords[uk]=konqueror,kfm,навігатор,html,тенета,www,шрифти,втулки Keywords[uz]=konqueror,kfm,html,www,браузер,веб,шрифтлар,плагинлар -Keywords[vi]=konqueror,kfm,trình duyệt,html,web;www,phông,plugin +Keywords[vi]=konqueror,kfm,trình duyệt,html,web;www,phông chữ,trình bổ sung Keywords[wa]=konqueror,kfm,foyteuse,betchteu,html,waibe,www,fontes,tchôke-divins Keywords[xh]=konqueror,kfm,umkhangeli zincwadi,html,web, www,imigca,iplagi ezingaphakathi Keywords[zh_CN]=konqueror,kfm,browser,html,web,www,fonts,plugins,浏览器,字体,插件 diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/nspluginloader.cpp /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/nspluginloader.cpp --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/nspluginloader.cpp 2005-11-19 11:08:29.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/nspluginloader.cpp 2008-01-29 23:56:53.000000000 +0000 @@ -41,6 +41,7 @@ #include #include #include +#include #include #include "nspluginloader.h" @@ -54,11 +55,14 @@ int NSPluginLoader::s_refCount = 0; -NSPluginInstance::NSPluginInstance(QWidget *parent, const QCString& app, const QCString& id) - : DCOPStub(app, id), NSPluginInstanceIface_stub(app, id), EMBEDCLASS(parent) +NSPluginInstance::NSPluginInstance(QWidget *parent) + : EMBEDCLASS(parent), _loader( NULL ), shown( false ), inited( false ), resize_count( 0 ), stub( NULL ) { - _loader = 0L; - shown = false; +} + +void NSPluginInstance::init(const QCString& app, const QCString& obj) +{ + stub = new NSPluginInstanceIface_stub( app, obj ); QGridLayout *_layout = new QGridLayout(this, 1, 1); KConfig cfg("kcmnspluginrc", false); cfg.setGroup("Misc"); @@ -69,22 +73,37 @@ show(); } else { _button = 0L; - doLoadPlugin(); + // Protection against repeated NPSetWindow() - Flash v9,0,115,0 doesn't handle + // repeated NPSetWindow() calls properly, which happens when NSPluginInstance is first + // shown and then resized. Which is what happens with KHTML. Therefore use 'shown' + // to detect whether the widget is shown and drop all resize events before that, + // and use 'resize_count' to wait for that one more resize to come (plus a timer + // for a possible timeout). Only then flash is actually initialized ('inited' is true). + resize_count = 1; + QTimer::singleShot( 1000, this, SLOT( doLoadPlugin())); } } void NSPluginInstance::doLoadPlugin() { - if (!_loader) { + if (!inited) { delete _button; _button = 0L; _loader = NSPluginLoader::instance(); setBackgroundMode(QWidget::NoBackground); - setProtocol(QXEmbed::XPLAIN); - embed( NSPluginInstanceIface_stub::winId() ); + WId winid = stub->winId(); + if( winid != 0 ) { + setProtocol(QXEmbed::XPLAIN); + embed( winid ); + } else { + setProtocol(QXEmbed::XEMBED); + } + // resize before showing, some plugins are stupid and can't handle repeated + // NPSetWindow() calls very well (viewer will avoid the call if not shown yet) + resizePlugin(width(), height()); displayPlugin(); show(); - shown = true; + inited = true; } } @@ -92,10 +111,13 @@ NSPluginInstance::~NSPluginInstance() { kdDebug() << "-> NSPluginInstance::~NSPluginInstance" << endl; - shutdown(); + if( inited ) + shutdown(); kdDebug() << "release" << endl; - _loader->release(); + if(_loader) + _loader->release(); kdDebug() << "<- NSPluginInstance::~NSPluginInstance" << endl; + delete stub; } @@ -111,8 +133,14 @@ void NSPluginInstance::resizeEvent(QResizeEvent *event) { - if (shown == false) + if (shown == false) // ignore all resizes before being shown return; + if( !inited && resize_count > 0 ) { + if( --resize_count == 0 ) + doLoadPlugin(); + else + return; + } EMBEDCLASS::resizeEvent(event); if (isVisible()) { resizePlugin(width(), height()); @@ -120,6 +148,33 @@ kdDebug() << "NSPluginInstance(client)::resizeEvent" << endl; } +void NSPluginInstance::showEvent(QShowEvent *event) +{ + EMBEDCLASS::showEvent(event); + shown = true; + if(!inited && resize_count == 0 ) + doLoadPlugin(); + if(inited) + resizePlugin(width(), height()); +} + +void NSPluginInstance::displayPlugin() +{ + qApp->syncX(); // process pending X commands + stub->displayPlugin(); +} + +void NSPluginInstance::resizePlugin( int w, int h ) +{ + qApp->syncX(); + stub->resizePlugin( w, h ); +} + +void NSPluginInstance::shutdown() +{ + if( stub ) + stub->shutdown(); +} /*******************************************************************************/ @@ -439,19 +494,19 @@ if ( mime=="application/x-shockwave-flash" ) embed = true; // flash doesn't work in full mode :( + NSPluginInstance *plugin = new NSPluginInstance( parent ); + kdDebug() << "<- NSPluginLoader::NewInstance = " << (void*)plugin << endl; // get plugin instance - DCOPRef inst_ref = cls->newInstance( url, mime, embed, argn, argv, appId, callbackId, reload, doPost, postData); + DCOPRef inst_ref = cls->newInstance( url, mime, embed, argn, argv, appId, callbackId, reload, doPost, postData, plugin->winId()); if ( inst_ref.isNull() ) { kdDebug() << "Couldn't create plugin instance" << endl; + delete plugin; return 0; } - NSPluginInstance *plugin = new NSPluginInstance( parent, inst_ref.app(), - inst_ref.object() ); - - kdDebug() << "<- NSPluginLoader::NewInstance = " << (void*)plugin << endl; + plugin->init( inst_ref.app(), inst_ref.object() ); return plugin; } diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/nspluginloader.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/nspluginloader.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/nspluginloader.h 2005-11-19 11:08:29.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/nspluginloader.h 2008-01-29 23:56:53.000000000 +0000 @@ -43,24 +43,35 @@ class QPushButton; class QGridLayout; -class NSPluginInstance : public EMBEDCLASS, virtual public NSPluginInstanceIface_stub +class NSPluginInstance : public EMBEDCLASS { Q_OBJECT public: - NSPluginInstance(QWidget *parent, const QCString& app, const QCString& id); + NSPluginInstance(QWidget *parent); + void init( const QCString& app, const QCString& obj ); ~NSPluginInstance(); +public: // wrappers + void javascriptResult( int id, QString result ) { stub->javascriptResult( id, result ); } private slots: void doLoadPlugin(); protected: void resizeEvent(QResizeEvent *event); + void showEvent (QShowEvent *); void windowChanged(WId w); class NSPluginLoader *_loader; bool shown; + bool inited; + int resize_count; QPushButton *_button; QGridLayout *_layout; + NSPluginInstanceIface_stub* stub; +private: // wrappers + void displayPlugin(); + void resizePlugin( int w, int h ); + void shutdown(); }; diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/plugin_paths.cpp /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/plugin_paths.cpp --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/plugin_paths.cpp 1970-01-01 00:00:00.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/plugin_paths.cpp 2008-01-29 23:56:53.000000000 +0000 @@ -0,0 +1,74 @@ +/* + + This application scans for Netscape plugins and create a cache and + the necessary mimelnk and service files. + + + Copyright (c) 2000 Matthias Hoelzer-Kluepfel + Stefan Schimanski <1Stein@gmx.de> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +*/ + +#include "plugin_paths.h" + +#include +#include + +QStringList getSearchPaths() +{ + QStringList searchPaths; + + KConfig *config = new KConfig("kcmnspluginrc", false); + config->setGroup("Misc"); + + // setup default paths + if ( !config->hasKey("scanPaths") ) { + QStringList paths; + // keep sync with kdebase/kcontrol/konqhtml + paths.append("$HOME/.mozilla/plugins"); + paths.append("$HOME/.netscape/plugins"); + paths.append("/usr/lib/firefox/plugins"); + paths.append("/usr/lib64/browser-plugins"); + paths.append("/usr/lib/browser-plugins"); + paths.append("/usr/local/netscape/plugins"); + paths.append("/opt/mozilla/plugins"); + paths.append("/opt/mozilla/lib/plugins"); + paths.append("/opt/netscape/plugins"); + paths.append("/opt/netscape/communicator/plugins"); + paths.append("/usr/lib/netscape/plugins"); + paths.append("/usr/lib/netscape/plugins-libc5"); + paths.append("/usr/lib/netscape/plugins-libc6"); + paths.append("/usr/lib/mozilla/plugins"); + paths.append("/usr/lib64/netscape/plugins"); + paths.append("/usr/lib64/mozilla/plugins"); + paths.append("$MOZILLA_HOME/plugins"); + config->writeEntry( "scanPaths", paths ); + } + + // read paths + config->setDollarExpansion( true ); + searchPaths = config->readListEntry( "scanPaths" ); + delete config; + + // append environment variable NPX_PLUGIN_PATH + QStringList envs = QStringList::split(':', getenv("NPX_PLUGIN_PATH")); + QStringList::Iterator it; + for (it = envs.begin(); it != envs.end(); ++it) + searchPaths.append(*it); + + return searchPaths; +} diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/plugin_paths.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/plugin_paths.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/plugin_paths.h 1970-01-01 00:00:00.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/plugin_paths.h 2008-01-29 23:56:53.000000000 +0000 @@ -0,0 +1,8 @@ +#ifndef PLUGIN_PATHS_H +#define PLUGIN_PATHS_H + +#include + +extern QStringList getSearchPaths(); + +#endif diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/pluginscan.cpp /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/pluginscan.cpp --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/pluginscan.cpp 2006-01-19 17:01:49.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/pluginscan.cpp 2008-01-29 23:56:53.000000000 +0000 @@ -54,6 +54,9 @@ #include #include "sdk/npupp.h" +#include + +#include "plugin_paths.h" static int showProgress=0; @@ -93,6 +96,16 @@ } #endif +// The only purpose of this function is just to pull in libXt. +// Using --enable-new-ldflags makes the linker use --as-needed and since +// otherwise nspluginscan wouldn't actually use libXt it wouldn't be really +// linked against it. However some plugins are not linked against libXt +// yet expect to have it available in the hosting application. +void pullInXt() +{ + XtFree( NULL ); +} + KConfig *infoConfig = 0; @@ -433,51 +446,6 @@ } -QStringList getSearchPaths() -{ - QStringList searchPaths; - - KConfig *config = new KConfig("kcmnspluginrc", false); - config->setGroup("Misc"); - - // setup default paths - if ( !config->hasKey("scanPaths") ) { - QStringList paths; - paths.append("$HOME/.mozilla/plugins"); - paths.append("$HOME/.netscape/plugins"); - paths.append("/usr/lib/firefox/plugins"); - paths.append("/usr/lib64/browser-plugins"); - paths.append("/usr/lib/browser-plugins"); - paths.append("/usr/local/netscape/plugins"); - paths.append("/opt/mozilla/plugins"); - paths.append("/opt/mozilla/lib/plugins"); - paths.append("/opt/netscape/plugins"); - paths.append("/opt/netscape/communicator/plugins"); - paths.append("/usr/lib/netscape/plugins"); - paths.append("/usr/lib/netscape/plugins-libc5"); - paths.append("/usr/lib/netscape/plugins-libc6"); - paths.append("/usr/lib/mozilla/plugins"); - paths.append("/usr/lib64/netscape/plugins"); - paths.append("/usr/lib64/mozilla/plugins"); - paths.append("$MOZILLA_HOME/plugins"); - config->writeEntry( "scanPaths", paths ); - } - - // read paths - config->setDollarExpansion( true ); - searchPaths = config->readListEntry( "scanPaths" ); - delete config; - - // append environment variable NPX_PLUGIN_PATH - QStringList envs = QStringList::split(':', getenv("NPX_PLUGIN_PATH")); - QStringList::Iterator it; - for (it = envs.begin(); it != envs.end(); ++it) - searchPaths.append(*it); - - return searchPaths; -} - - void writeServicesFile( QStringList mimeTypes ) { QString fname = KGlobal::dirs()->saveLocation("services", "") @@ -585,6 +553,7 @@ sigaction( SIGCHLD, &act, 0 ); + pullInXt(); // set up the paths used to look for plugins QStringList searchPaths = getSearchPaths(); diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jni.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jni.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jni.h 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jni.h 2008-01-29 23:56:53.000000000 +0000 @@ -1,36 +1,38 @@ -/* - * @(#)jni.h 1.26 97/01/27 +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * Copyright (c) 1993-1996 Sun Microsystems, Inc. All Rights Reserved. + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ * - * Permission to use, copy, modify, and distribute this software - * and its documentation for NON-COMMERCIAL purposes and without - * fee is hereby granted provided that this copyright notice - * appears in all copies. + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. * - * The Java source code is the confidential and proprietary information - * of Sun Microsystems, Inc. ("Confidential Information"). You shall - * not disclose such Confidential Information and shall use it only in - * accordance with the terms of the license agreement you entered into - * with Sun. + * The Original Code is the Java Runtime Interface. * - * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF - * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. - */ - -/* - * We used part of Netscape's Java Runtime Interface (JRI) as the starting - * point of our design and implementation. - */ - -/****************************************************************************** - * Java Runtime Interface - * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. - *****************************************************************************/ + * The Initial Developer of the Original Code is + * Netscape Communications Corporation and Sun Microsystems, Inc. + * Portions created by the Initial Developer are Copyright (C) 1993-1996 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ #ifndef JNI_H #define JNI_H @@ -112,8 +114,10 @@ #endif +#if 0 /* moved to jri_md.h */ typedef jobject jref; /* For transition---not meant to be part of public API anymore.*/ +#endif typedef union jvalue { jboolean z; @@ -199,508 +203,508 @@ void *reserved2; void *reserved3; - jint (*GetVersion)(JNIEnv *env); + jint (JNICALL *GetVersion)(JNIEnv *env); - jclass (*DefineClass) + jclass (JNICALL *DefineClass) (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len); - jclass (*FindClass) + jclass (JNICALL *FindClass) (JNIEnv *env, const char *name); void *reserved4; void *reserved5; void *reserved6; - jclass (*GetSuperclass) + jclass (JNICALL *GetSuperclass) (JNIEnv *env, jclass sub); - jboolean (*IsAssignableFrom) + jboolean (JNICALL *IsAssignableFrom) (JNIEnv *env, jclass sub, jclass sup); void *reserved7; - jint (*_Throw) + jint (JNICALL *Throw) (JNIEnv *env, jthrowable obj); - jint (*ThrowNew) + jint (JNICALL *ThrowNew) (JNIEnv *env, jclass clazz, const char *msg); - jthrowable (*ExceptionOccurred) + jthrowable (JNICALL *ExceptionOccurred) (JNIEnv *env); - void (*ExceptionDescribe) + void (JNICALL *ExceptionDescribe) (JNIEnv *env); - void (*ExceptionClear) + void (JNICALL *ExceptionClear) (JNIEnv *env); - void (*FatalError) + void (JNICALL *FatalError) (JNIEnv *env, const char *msg); void *reserved8; void *reserved9; - jobject (*NewGlobalRef) + jobject (JNICALL *NewGlobalRef) (JNIEnv *env, jobject lobj); - void (*DeleteGlobalRef) + void (JNICALL *DeleteGlobalRef) (JNIEnv *env, jobject gref); - void (*DeleteLocalRef) + void (JNICALL *DeleteLocalRef) (JNIEnv *env, jobject obj); - jboolean (*IsSameObject) + jboolean (JNICALL *IsSameObject) (JNIEnv *env, jobject obj1, jobject obj2); void *reserved10; void *reserved11; - jobject (*AllocObject) + jobject (JNICALL *AllocObject) (JNIEnv *env, jclass clazz); - jobject (*NewObject) + jobject (JNICALL *NewObject) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (*NewObjectV) + jobject (JNICALL *NewObjectV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (*NewObjectA) + jobject (JNICALL *NewObjectA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - jclass (*GetObjectClass) + jclass (JNICALL *GetObjectClass) (JNIEnv *env, jobject obj); - jboolean (*IsInstanceOf) + jboolean (JNICALL *IsInstanceOf) (JNIEnv *env, jobject obj, jclass clazz); - jmethodID (*GetMethodID) + jmethodID (JNICALL *GetMethodID) (JNIEnv *env, jclass clazz, const char *name, const char *sig); - jobject (*CallObjectMethod) + jobject (JNICALL *CallObjectMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jobject (*CallObjectMethodV) + jobject (JNICALL *CallObjectMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jobject (*CallObjectMethodA) + jobject (JNICALL *CallObjectMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); - jboolean (*CallBooleanMethod) + jboolean (JNICALL *CallBooleanMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jboolean (*CallBooleanMethodV) + jboolean (JNICALL *CallBooleanMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jboolean (*CallBooleanMethodA) + jboolean (JNICALL *CallBooleanMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); - jbyte (*CallByteMethod) + jbyte (JNICALL *CallByteMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jbyte (*CallByteMethodV) + jbyte (JNICALL *CallByteMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jbyte (*CallByteMethodA) + jbyte (JNICALL *CallByteMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - jchar (*CallCharMethod) + jchar (JNICALL *CallCharMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jchar (*CallCharMethodV) + jchar (JNICALL *CallCharMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jchar (*CallCharMethodA) + jchar (JNICALL *CallCharMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - jshort (*CallShortMethod) + jshort (JNICALL *CallShortMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jshort (*CallShortMethodV) + jshort (JNICALL *CallShortMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jshort (*CallShortMethodA) + jshort (JNICALL *CallShortMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - jint (*CallIntMethod) + jint (JNICALL *CallIntMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jint (*CallIntMethodV) + jint (JNICALL *CallIntMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jint (*CallIntMethodA) + jint (JNICALL *CallIntMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - jlong (*CallLongMethod) + jlong (JNICALL *CallLongMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jlong (*CallLongMethodV) + jlong (JNICALL *CallLongMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jlong (*CallLongMethodA) + jlong (JNICALL *CallLongMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - jfloat (*CallFloatMethod) + jfloat (JNICALL *CallFloatMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jfloat (*CallFloatMethodV) + jfloat (JNICALL *CallFloatMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jfloat (*CallFloatMethodA) + jfloat (JNICALL *CallFloatMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - jdouble (*CallDoubleMethod) + jdouble (JNICALL *CallDoubleMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jdouble (*CallDoubleMethodV) + jdouble (JNICALL *CallDoubleMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jdouble (*CallDoubleMethodA) + jdouble (JNICALL *CallDoubleMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - void (*CallVoidMethod) + void (JNICALL *CallVoidMethod) (JNIEnv *env, jobject obj, jmethodID methodID, ...); - void (*CallVoidMethodV) + void (JNICALL *CallVoidMethodV) (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - void (*CallVoidMethodA) + void (JNICALL *CallVoidMethodA) (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); - jobject (*CallNonvirtualObjectMethod) + jobject (JNICALL *CallNonvirtualObjectMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jobject (*CallNonvirtualObjectMethodV) + jobject (JNICALL *CallNonvirtualObjectMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - jobject (*CallNonvirtualObjectMethodA) + jobject (JNICALL *CallNonvirtualObjectMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue * args); - jboolean (*CallNonvirtualBooleanMethod) + jboolean (JNICALL *CallNonvirtualBooleanMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jboolean (*CallNonvirtualBooleanMethodV) + jboolean (JNICALL *CallNonvirtualBooleanMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - jboolean (*CallNonvirtualBooleanMethodA) + jboolean (JNICALL *CallNonvirtualBooleanMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue * args); - jbyte (*CallNonvirtualByteMethod) + jbyte (JNICALL *CallNonvirtualByteMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jbyte (*CallNonvirtualByteMethodV) + jbyte (JNICALL *CallNonvirtualByteMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - jbyte (*CallNonvirtualByteMethodA) + jbyte (JNICALL *CallNonvirtualByteMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args); - jchar (*CallNonvirtualCharMethod) + jchar (JNICALL *CallNonvirtualCharMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jchar (*CallNonvirtualCharMethodV) + jchar (JNICALL *CallNonvirtualCharMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - jchar (*CallNonvirtualCharMethodA) + jchar (JNICALL *CallNonvirtualCharMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args); - jshort (*CallNonvirtualShortMethod) + jshort (JNICALL *CallNonvirtualShortMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jshort (*CallNonvirtualShortMethodV) + jshort (JNICALL *CallNonvirtualShortMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - jshort (*CallNonvirtualShortMethodA) + jshort (JNICALL *CallNonvirtualShortMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args); - jint (*CallNonvirtualIntMethod) + jint (JNICALL *CallNonvirtualIntMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jint (*CallNonvirtualIntMethodV) + jint (JNICALL *CallNonvirtualIntMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - jint (*CallNonvirtualIntMethodA) + jint (JNICALL *CallNonvirtualIntMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args); - jlong (*CallNonvirtualLongMethod) + jlong (JNICALL *CallNonvirtualLongMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jlong (*CallNonvirtualLongMethodV) + jlong (JNICALL *CallNonvirtualLongMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - jlong (*CallNonvirtualLongMethodA) + jlong (JNICALL *CallNonvirtualLongMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args); - jfloat (*CallNonvirtualFloatMethod) + jfloat (JNICALL *CallNonvirtualFloatMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jfloat (*CallNonvirtualFloatMethodV) + jfloat (JNICALL *CallNonvirtualFloatMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - jfloat (*CallNonvirtualFloatMethodA) + jfloat (JNICALL *CallNonvirtualFloatMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args); - jdouble (*CallNonvirtualDoubleMethod) + jdouble (JNICALL *CallNonvirtualDoubleMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jdouble (*CallNonvirtualDoubleMethodV) + jdouble (JNICALL *CallNonvirtualDoubleMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - jdouble (*CallNonvirtualDoubleMethodA) + jdouble (JNICALL *CallNonvirtualDoubleMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args); - void (*CallNonvirtualVoidMethod) + void (JNICALL *CallNonvirtualVoidMethod) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - void (*CallNonvirtualVoidMethodV) + void (JNICALL *CallNonvirtualVoidMethodV) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); - void (*CallNonvirtualVoidMethodA) + void (JNICALL *CallNonvirtualVoidMethodA) (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue * args); - jfieldID (*GetFieldID) + jfieldID (JNICALL *GetFieldID) (JNIEnv *env, jclass clazz, const char *name, const char *sig); - jobject (*GetObjectField) + jobject (JNICALL *GetObjectField) (JNIEnv *env, jobject obj, jfieldID fieldID); - jboolean (*GetBooleanField) + jboolean (JNICALL *GetBooleanField) (JNIEnv *env, jobject obj, jfieldID fieldID); - jbyte (*GetByteField) + jbyte (JNICALL *GetByteField) (JNIEnv *env, jobject obj, jfieldID fieldID); - jchar (*GetCharField) + jchar (JNICALL *GetCharField) (JNIEnv *env, jobject obj, jfieldID fieldID); - jshort (*GetShortField) + jshort (JNICALL *GetShortField) (JNIEnv *env, jobject obj, jfieldID fieldID); - jint (*GetIntField) + jint (JNICALL *GetIntField) (JNIEnv *env, jobject obj, jfieldID fieldID); - jlong (*GetLongField) + jlong (JNICALL *GetLongField) (JNIEnv *env, jobject obj, jfieldID fieldID); - jfloat (*GetFloatField) + jfloat (JNICALL *GetFloatField) (JNIEnv *env, jobject obj, jfieldID fieldID); - jdouble (*GetDoubleField) + jdouble (JNICALL *GetDoubleField) (JNIEnv *env, jobject obj, jfieldID fieldID); - void (*SetObjectField) + void (JNICALL *SetObjectField) (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); - void (*SetBooleanField) + void (JNICALL *SetBooleanField) (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); - void (*SetByteField) + void (JNICALL *SetByteField) (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); - void (*SetCharField) + void (JNICALL *SetCharField) (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); - void (*SetShortField) + void (JNICALL *SetShortField) (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); - void (*SetIntField) + void (JNICALL *SetIntField) (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); - void (*SetLongField) + void (JNICALL *SetLongField) (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); - void (*SetFloatField) + void (JNICALL *SetFloatField) (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); - void (*SetDoubleField) + void (JNICALL *SetDoubleField) (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); - jmethodID (*GetStaticMethodID) + jmethodID (JNICALL *GetStaticMethodID) (JNIEnv *env, jclass clazz, const char *name, const char *sig); - jobject (*CallStaticObjectMethod) + jobject (JNICALL *CallStaticObjectMethod) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (*CallStaticObjectMethodV) + jobject (JNICALL *CallStaticObjectMethodV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (*CallStaticObjectMethodA) + jobject (JNICALL *CallStaticObjectMethodA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - jboolean (*CallStaticBooleanMethod) + jboolean (JNICALL *CallStaticBooleanMethod) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jboolean (*CallStaticBooleanMethodV) + jboolean (JNICALL *CallStaticBooleanMethodV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jboolean (*CallStaticBooleanMethodA) + jboolean (JNICALL *CallStaticBooleanMethodA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - jbyte (*CallStaticByteMethod) + jbyte (JNICALL *CallStaticByteMethod) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jbyte (*CallStaticByteMethodV) + jbyte (JNICALL *CallStaticByteMethodV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jbyte (*CallStaticByteMethodA) + jbyte (JNICALL *CallStaticByteMethodA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - jchar (*CallStaticCharMethod) + jchar (JNICALL *CallStaticCharMethod) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jchar (*CallStaticCharMethodV) + jchar (JNICALL *CallStaticCharMethodV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jchar (*CallStaticCharMethodA) + jchar (JNICALL *CallStaticCharMethodA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - jshort (*CallStaticShortMethod) + jshort (JNICALL *CallStaticShortMethod) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jshort (*CallStaticShortMethodV) + jshort (JNICALL *CallStaticShortMethodV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jshort (*CallStaticShortMethodA) + jshort (JNICALL *CallStaticShortMethodA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - jint (*CallStaticIntMethod) + jint (JNICALL *CallStaticIntMethod) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jint (*CallStaticIntMethodV) + jint (JNICALL *CallStaticIntMethodV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jint (*CallStaticIntMethodA) + jint (JNICALL *CallStaticIntMethodA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - jlong (*CallStaticLongMethod) + jlong (JNICALL *CallStaticLongMethod) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jlong (*CallStaticLongMethodV) + jlong (JNICALL *CallStaticLongMethodV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jlong (*CallStaticLongMethodA) + jlong (JNICALL *CallStaticLongMethodA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - jfloat (*CallStaticFloatMethod) + jfloat (JNICALL *CallStaticFloatMethod) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jfloat (*CallStaticFloatMethodV) + jfloat (JNICALL *CallStaticFloatMethodV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jfloat (*CallStaticFloatMethodA) + jfloat (JNICALL *CallStaticFloatMethodA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - jdouble (*CallStaticDoubleMethod) + jdouble (JNICALL *CallStaticDoubleMethod) (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jdouble (*CallStaticDoubleMethodV) + jdouble (JNICALL *CallStaticDoubleMethodV) (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jdouble (*CallStaticDoubleMethodA) + jdouble (JNICALL *CallStaticDoubleMethodA) (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - void (*CallStaticVoidMethod) + void (JNICALL *CallStaticVoidMethod) (JNIEnv *env, jclass cls, jmethodID methodID, ...); - void (*CallStaticVoidMethodV) + void (JNICALL *CallStaticVoidMethodV) (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); - void (*CallStaticVoidMethodA) + void (JNICALL *CallStaticVoidMethodA) (JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args); - jfieldID (*GetStaticFieldID) + jfieldID (JNICALL *GetStaticFieldID) (JNIEnv *env, jclass clazz, const char *name, const char *sig); - jobject (*GetStaticObjectField) + jobject (JNICALL *GetStaticObjectField) (JNIEnv *env, jclass clazz, jfieldID fieldID); - jboolean (*GetStaticBooleanField) + jboolean (JNICALL *GetStaticBooleanField) (JNIEnv *env, jclass clazz, jfieldID fieldID); - jbyte (*GetStaticByteField) + jbyte (JNICALL *GetStaticByteField) (JNIEnv *env, jclass clazz, jfieldID fieldID); - jchar (*GetStaticCharField) + jchar (JNICALL *GetStaticCharField) (JNIEnv *env, jclass clazz, jfieldID fieldID); - jshort (*GetStaticShortField) + jshort (JNICALL *GetStaticShortField) (JNIEnv *env, jclass clazz, jfieldID fieldID); - jint (*GetStaticIntField) + jint (JNICALL *GetStaticIntField) (JNIEnv *env, jclass clazz, jfieldID fieldID); - jlong (*GetStaticLongField) + jlong (JNICALL *GetStaticLongField) (JNIEnv *env, jclass clazz, jfieldID fieldID); - jfloat (*GetStaticFloatField) + jfloat (JNICALL *GetStaticFloatField) (JNIEnv *env, jclass clazz, jfieldID fieldID); - jdouble (*GetStaticDoubleField) + jdouble (JNICALL *GetStaticDoubleField) (JNIEnv *env, jclass clazz, jfieldID fieldID); - void (*SetStaticObjectField) + void (JNICALL *SetStaticObjectField) (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); - void (*SetStaticBooleanField) + void (JNICALL *SetStaticBooleanField) (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); - void (*SetStaticByteField) + void (JNICALL *SetStaticByteField) (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); - void (*SetStaticCharField) + void (JNICALL *SetStaticCharField) (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); - void (*SetStaticShortField) + void (JNICALL *SetStaticShortField) (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); - void (*SetStaticIntField) + void (JNICALL *SetStaticIntField) (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); - void (*SetStaticLongField) + void (JNICALL *SetStaticLongField) (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); - void (*SetStaticFloatField) + void (JNICALL *SetStaticFloatField) (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); - void (*SetStaticDoubleField) + void (JNICALL *SetStaticDoubleField) (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); - jstring (*NewString) + jstring (JNICALL *NewString) (JNIEnv *env, const jchar *unicode, jsize len); - jsize (*GetStringLength) + jsize (JNICALL *GetStringLength) (JNIEnv *env, jstring str); - const jchar *(*GetStringChars) + const jchar *(JNICALL *GetStringChars) (JNIEnv *env, jstring str, jboolean *isCopy); - void (*ReleaseStringChars) + void (JNICALL *ReleaseStringChars) (JNIEnv *env, jstring str, const jchar *chars); - jstring (*NewStringUTF) + jstring (JNICALL *NewStringUTF) (JNIEnv *env, const char *utf); - jsize (*GetStringUTFLength) + jsize (JNICALL *GetStringUTFLength) (JNIEnv *env, jstring str); - const char* (*GetStringUTFChars) + const char* (JNICALL *GetStringUTFChars) (JNIEnv *env, jstring str, jboolean *isCopy); - void (*ReleaseStringUTFChars) + void (JNICALL *ReleaseStringUTFChars) (JNIEnv *env, jstring str, const char* chars); - jsize (*GetArrayLength) + jsize (JNICALL *GetArrayLength) (JNIEnv *env, jarray array); - jobjectArray (*NewObjectArray) + jobjectArray (JNICALL *NewObjectArray) (JNIEnv *env, jsize len, jclass clazz, jobject init); - jobject (*GetObjectArrayElement) + jobject (JNICALL *GetObjectArrayElement) (JNIEnv *env, jobjectArray array, jsize index); - void (*SetObjectArrayElement) + void (JNICALL *SetObjectArrayElement) (JNIEnv *env, jobjectArray array, jsize index, jobject val); - jbooleanArray (*NewBooleanArray) + jbooleanArray (JNICALL *NewBooleanArray) (JNIEnv *env, jsize len); - jbyteArray (*NewByteArray) + jbyteArray (JNICALL *NewByteArray) (JNIEnv *env, jsize len); - jcharArray (*NewCharArray) + jcharArray (JNICALL *NewCharArray) (JNIEnv *env, jsize len); - jshortArray (*NewShortArray) + jshortArray (JNICALL *NewShortArray) (JNIEnv *env, jsize len); - jintArray (*NewIntArray) + jintArray (JNICALL *NewIntArray) (JNIEnv *env, jsize len); - jlongArray (*NewLongArray) + jlongArray (JNICALL *NewLongArray) (JNIEnv *env, jsize len); - jfloatArray (*NewFloatArray) + jfloatArray (JNICALL *NewFloatArray) (JNIEnv *env, jsize len); - jdoubleArray (*NewDoubleArray) + jdoubleArray (JNICALL *NewDoubleArray) (JNIEnv *env, jsize len); - jboolean * (*GetBooleanArrayElements) + jboolean * (JNICALL *GetBooleanArrayElements) (JNIEnv *env, jbooleanArray array, jboolean *isCopy); - jbyte * (*GetByteArrayElements) + jbyte * (JNICALL *GetByteArrayElements) (JNIEnv *env, jbyteArray array, jboolean *isCopy); - jchar * (*GetCharArrayElements) + jchar * (JNICALL *GetCharArrayElements) (JNIEnv *env, jcharArray array, jboolean *isCopy); - jshort * (*GetShortArrayElements) + jshort * (JNICALL *GetShortArrayElements) (JNIEnv *env, jshortArray array, jboolean *isCopy); - jint * (*GetIntArrayElements) + jint * (JNICALL *GetIntArrayElements) (JNIEnv *env, jintArray array, jboolean *isCopy); - jlong * (*GetLongArrayElements) + jlong * (JNICALL *GetLongArrayElements) (JNIEnv *env, jlongArray array, jboolean *isCopy); - jfloat * (*GetFloatArrayElements) + jfloat * (JNICALL *GetFloatArrayElements) (JNIEnv *env, jfloatArray array, jboolean *isCopy); - jdouble * (*GetDoubleArrayElements) + jdouble * (JNICALL *GetDoubleArrayElements) (JNIEnv *env, jdoubleArray array, jboolean *isCopy); - void (*ReleaseBooleanArrayElements) + void (JNICALL *ReleaseBooleanArrayElements) (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); - void (*ReleaseByteArrayElements) + void (JNICALL *ReleaseByteArrayElements) (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); - void (*ReleaseCharArrayElements) + void (JNICALL *ReleaseCharArrayElements) (JNIEnv *env, jcharArray array, jchar *elems, jint mode); - void (*ReleaseShortArrayElements) + void (JNICALL *ReleaseShortArrayElements) (JNIEnv *env, jshortArray array, jshort *elems, jint mode); - void (*ReleaseIntArrayElements) + void (JNICALL *ReleaseIntArrayElements) (JNIEnv *env, jintArray array, jint *elems, jint mode); - void (*ReleaseLongArrayElements) + void (JNICALL *ReleaseLongArrayElements) (JNIEnv *env, jlongArray array, jlong *elems, jint mode); - void (*ReleaseFloatArrayElements) + void (JNICALL *ReleaseFloatArrayElements) (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); - void (*ReleaseDoubleArrayElements) + void (JNICALL *ReleaseDoubleArrayElements) (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); - void (*GetBooleanArrayRegion) + void (JNICALL *GetBooleanArrayRegion) (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); - void (*GetByteArrayRegion) + void (JNICALL *GetByteArrayRegion) (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); - void (*GetCharArrayRegion) + void (JNICALL *GetCharArrayRegion) (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); - void (*GetShortArrayRegion) + void (JNICALL *GetShortArrayRegion) (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); - void (*GetIntArrayRegion) + void (JNICALL *GetIntArrayRegion) (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); - void (*GetLongArrayRegion) + void (JNICALL *GetLongArrayRegion) (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); - void (*GetFloatArrayRegion) + void (JNICALL *GetFloatArrayRegion) (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); - void (*GetDoubleArrayRegion) + void (JNICALL *GetDoubleArrayRegion) (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); - void (*SetBooleanArrayRegion) + void (JNICALL *SetBooleanArrayRegion) (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); - void (*SetByteArrayRegion) + void (JNICALL *SetByteArrayRegion) (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); - void (*SetCharArrayRegion) + void (JNICALL *SetCharArrayRegion) (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); - void (*SetShortArrayRegion) + void (JNICALL *SetShortArrayRegion) (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); - void (*SetIntArrayRegion) + void (JNICALL *SetIntArrayRegion) (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); - void (*SetLongArrayRegion) + void (JNICALL *SetLongArrayRegion) (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); - void (*SetFloatArrayRegion) + void (JNICALL *SetFloatArrayRegion) (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); - void (*SetDoubleArrayRegion) + void (JNICALL *SetDoubleArrayRegion) (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); - jint (*RegisterNatives) + jint (JNICALL *RegisterNatives) (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, jint nMethods); - jint (*UnregisterNatives) + jint (JNICALL *UnregisterNatives) (JNIEnv *env, jclass clazz); - jint (*MonitorEnter) + jint (JNICALL *MonitorEnter) (JNIEnv *env, jobject obj); - jint (*MonitorExit) + jint (JNICALL *MonitorExit) (JNIEnv *env, jobject obj); - jint (*GetJavaVM) + jint (JNICALL *GetJavaVM) (JNIEnv *env, JavaVM **vm); }; @@ -739,8 +743,8 @@ return functions->IsAssignableFrom(this, sub, sup); } - jint _Throw(jthrowable obj) { - return functions->_Throw(this, obj); + jint Throw(jthrowable obj) { + return functions->Throw(this, obj); } jint ThrowNew(jclass clazz, const char *msg) { return functions->ThrowNew(this, clazz, msg); @@ -1728,9 +1732,9 @@ /* These structures will be VM-specific. */ typedef struct JDK1_1InitArgs { - jint reserved0; - void *reserved1; + jint version; + char **properties; jint checkSource; jint nativeStackSize; jint javaStackSize; @@ -1739,15 +1743,15 @@ jint verifyMode; char *classpath; - jint (*vfprintf)(FILE *fp, const char *format, va_list args); - void (*exit)(jint code); - void (*abort)(); + jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args); + void (JNICALL *exit)(jint code); + void (JNICALL *abort)(); jint enableClassGC; jint enableVerboseGC; jint disableAsyncGC; jint verbose; - jint debugAgent; + jboolean debugging; jint debugPort; } JDK1_1InitArgs; @@ -1762,12 +1766,12 @@ void *reserved1; void *reserved2; - jint (*DestroyJavaVM)(JavaVM *vm); + jint (JNICALL *DestroyJavaVM)(JavaVM *vm); - jint (*AttachCurrentThread) + jint (JNICALL *AttachCurrentThread) (JavaVM *vm, JNIEnv **penv, void *args); - jint (*DetachCurrentThread)(JavaVM *vm); + jint (JNICALL *DetachCurrentThread)(JavaVM *vm); }; struct JavaVM_ { @@ -1790,11 +1794,12 @@ #endif }; -void JNICALL JNI_GetDefaultJavaVMInitArgs(void *); +JNI_PUBLIC_API(void) JNI_GetDefaultJavaVMInitArgs(void *); -jint JNICALL JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *); +JNI_PUBLIC_API(jint) JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *); -jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); +JNI_PUBLIC_API(jint) JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); +JNI_PUBLIC_API(jref) JNI_MakeLocalRef(JNIEnv *pJNIEnv, void *pHObject); #ifdef __cplusplus } /* extern "C" */ diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jni_md.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jni_md.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jni_md.h 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jni_md.h 2008-01-29 23:56:53.000000000 +0000 @@ -1,41 +1,182 @@ -/* - * @(#)jni_md.h 1.3 97/01/10 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * - * Copyright (c) 1993-1996 Sun Microsystems, Inc. All Rights Reserved. + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ * - * Permission to use, copy, modify, and distribute this software - * and its documentation for NON-COMMERCIAL purposes and without - * fee is hereby granted provided that this copyright notice - * appears in all copies. - * - * The Java source code is the confidential and proprietary information - * of Sun Microsystems, Inc. ("Confidential Information"). You shall - * not disclose such Confidential Information and shall use it only in - * accordance with the terms of the license agreement you entered into - * with Sun. - * - * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF - * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * + * This Original Code has been modified by IBM Corporation. + * Modifications made by IBM described herein are + * Copyright (c) International Business Machines + * Corporation, 2000 + * + * Modifications to Mozilla code or documentation + * identified per MPL Section 3.3 + * + * Date Modified by Description of modification + * 03/27/2000 IBM Corp. Set JNICALL to Optlink for + * use in OS2 */ +/******************************************************************************* + * Netscape version of jni_md.h -- depends on jri_md.h + ******************************************************************************/ + #ifndef JNI_MD_H #define JNI_MD_H -#include "jri_md.h" +#include "prtypes.h" /* needed for _declspec */ -#define JNICALL JRI_CALLBACK +/******************************************************************************* + * WHAT'S UP WITH THIS FILE? + * + * This is where we define the mystical JNI_PUBLIC_API macro that works on all + * platforms. If you're running with Visual C++, Symantec C, or Borland's + * development environment on the PC, you're all set. Or if you're on the Mac + * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't + * matter. + + * Changes by sailesh on 9/26 + + * There are two symbols used in the declaration of the JNI functions + * and native code that uses the JNI: + * JNICALL - specifies the calling convention + * JNIEXPORT - specifies export status of the function + * + * The syntax to specify calling conventions is different in Win16 and + * Win32 - the brains at Micro$oft at work here. JavaSoft in their + * infinite wisdom cares for no platform other than Win32, and so they + * just define these two symbols as: + + #define JNIEXPORT __declspec(dllexport) + #define JNICALL __stdcall + + * We deal with this, in the way JRI defines the JRI_PUBLIC_API, by + * defining a macro called JNI_PUBLIC_API. Any of our developers who + * wish to use code for Win16 and Win32, _must_ use JNI_PUBLIC_API to + * be able to export functions properly. + + * Since we must also maintain compatibility with JavaSoft, we + * continue to define the symbol JNIEXPORT. However, use of this + * internally is deprecated, since it will cause a mess on Win16. + + * We _do not_ need a new symbol called JNICALL. Instead we + * redefine JNICALL in the same way JRI_CALLBACK was defined. + + ******************************************************************************/ + +/* DLL Entry modifiers... */ +#if defined(XP_OS2) +# ifdef XP_OS2_VACPP +# define JNI_PUBLIC_API(ResultType) ResultType _System +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNICALL _Optlink +# define JNIEXPORT +# else +# define JNI_PUBLIC_API(ResultType) ResultType +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNICALL +# define JNIEXPORT +# endif +/* Win32 */ +#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) +# include +# if defined(_MSC_VER) || defined(__GNUC__) +# if defined(WIN32) || defined(_WIN32) +# define JNI_PUBLIC_API(ResultType) _declspec(dllexport) ResultType __stdcall +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) _declspec(dllexport) ResultType +# define JNICALL __stdcall +# else /* !_WIN32 */ +# if defined(_WINDLL) +# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds +# define JNICALL __loadds +# else /* !WINDLL */ +# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __export +# define JNICALL __export +# endif /* !WINDLL */ +# endif /* !_WIN32 */ +# elif defined(__BORLANDC__) +# if defined(WIN32) || defined(_WIN32) +# define JNI_PUBLIC_API(ResultType) __export ResultType +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) __export ResultType +# define JNICALL +# else /* !_WIN32 */ +# define JNI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds +# define JNICALL _loadds +# endif +# else +# error Unsupported PC development environment. +# endif +# ifndef IS_LITTLE_ENDIAN +# define IS_LITTLE_ENDIAN +# endif + /* This is the stuff inherited from JavaSoft .. */ +# define JNIEXPORT __declspec(dllexport) + + +/* Mac */ +#elif defined(macintosh) || defined(Macintosh) || defined(THINK_C) +# if defined(__MWERKS__) /* Metrowerks */ +# if !__option(enumsalwaysint) +# error You need to define 'Enums Always Int' for your project. +# endif +# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM +# if !__option(fourbyteints) +# error You need to define 'Struct Alignment: 68k' for your project. +# endif +# endif /* !GENERATINGCFM */ +# define JNI_PUBLIC_API(ResultType) __declspec(export) ResultType +# define JNI_PUBLIC_VAR(VarType) JNI_PUBLIC_API(VarType) +# define JNI_NATIVE_STUB(ResultType) JNI_PUBLIC_API(ResultType) +# elif defined(__SC__) /* Symantec */ +# error What are the Symantec defines? (warren@netscape.com) +# elif macintosh && applec /* MPW */ +# error Please upgrade to the latest MPW compiler (SC). +# else +# error Unsupported Mac development environment. +# endif +# define JNICALL + /* This is the stuff inherited from JavaSoft .. */ +# define JNIEXPORT -/* XXX don't use this -- it doesn't work for Win16 */ -#ifdef XP_WIN -#define JNIEXPORT __declspec(dllexport) +/* Unix or else */ #else -#define JNIEXPORT +# define JNI_PUBLIC_API(ResultType) ResultType +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) ResultType +# define JNICALL + /* This is the stuff inherited from JavaSoft .. */ +# define JNIEXPORT #endif +#ifndef FAR /* for non-Win16 */ +#define FAR +#endif +/* Get the rest of the stuff from jri_md.h */ +#include "jri_md.h" #endif /* JNI_MD_H */ diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jri.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jri.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jri.h 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jri.h 2008-01-29 23:56:53.000000000 +0000 @@ -1,7 +1,42 @@ -/* -*- Mode: C; tab-width: 4; -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + /******************************************************************************* * Java Runtime Interface - * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. ******************************************************************************/ #ifndef JRI_H diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jri_md.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jri_md.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jri_md.h 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jri_md.h 2008-01-29 23:56:53.000000000 +0000 @@ -1,13 +1,49 @@ -/* -*- Mode: C; tab-width: 4; -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + /******************************************************************************* * Java Runtime Interface - Machine Dependent Types - * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. ******************************************************************************/ #ifndef JRI_MD_H #define JRI_MD_H #include +#include "prtypes.h" /* Needed for HAS_LONG_LONG ifdefs & _declspec */ #ifdef __cplusplus extern "C" { @@ -33,23 +69,39 @@ /* DLL Entry modifiers... */ /* PC */ -#if defined(XP_PC) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) +#if defined(XP_OS2) +# ifdef XP_OS2_VACPP +# define JRI_PUBLIC_API(ResultType) ResultType _Optlink +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_CALLBACK +# else +# define JRI_PUBLIC_API(ResultType) ResultType +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_CALLBACK +# endif +#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) # include -# if defined(_MSC_VER) +# if defined(_MSC_VER) || defined(__GNUC__) # if defined(WIN32) || defined(_WIN32) # define JRI_PUBLIC_API(ResultType) _declspec(dllexport) ResultType # define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) _declspec(dllexport) VarType +# define JRI_PUBLIC_VAR_IMP(VarType) _declspec(dllimport) VarType # define JRI_NATIVE_STUB(ResultType) _declspec(dllexport) ResultType # define JRI_CALLBACK # else /* !_WIN32 */ # if defined(_WINDLL) # define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds # define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) # define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds # define JRI_CALLBACK __loadds # else /* !WINDLL */ # define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export # define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) # define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __export # define JRI_CALLBACK __export # endif /* !WINDLL */ @@ -58,11 +110,15 @@ # if defined(WIN32) || defined(_WIN32) # define JRI_PUBLIC_API(ResultType) __export ResultType # define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) __export VarType +# define JRI_PUBLIC_VAR_IMP(VarType) __import VarType # define JRI_NATIVE_STUB(ResultType) __export ResultType # define JRI_CALLBACK # else /* !_WIN32 */ # define JRI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds # define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) __cdecl __export VarType +# define JRI_PUBLIC_VAR_IMP(VarType) __cdecl __import VarType # define JRI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds # define JRI_CALLBACK _loadds # endif @@ -74,18 +130,20 @@ # endif /* Mac */ -#elif defined(macintosh) || defined(Macintosh) || defined(THINK_C) +#elif defined (macintosh) || defined(Macintosh) || defined(THINK_C) # if defined(__MWERKS__) /* Metrowerks */ # if !__option(enumsalwaysint) # error You need to define 'Enums Always Int' for your project. # endif -# if defined(GENERATING68K) && !GENERATINGCFM +# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM # if !__option(fourbyteints) # error You need to define 'Struct Alignment: 68k' for your project. # endif # endif /* !GENERATINGCFM */ # define JRI_PUBLIC_API(ResultType) __declspec(export) ResultType # define JRI_PUBLIC_VAR(VarType) JRI_PUBLIC_API(VarType) +# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_API(VarType) +# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_API(VarType) # define JRI_NATIVE_STUB(ResultType) JRI_PUBLIC_API(ResultType) # elif defined(__SC__) /* Symantec */ # error What are the Symantec defines? (warren@netscape.com) @@ -100,7 +158,9 @@ #else # define JRI_PUBLIC_API(ResultType) ResultType # define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_NATIVE_STUB(ResultType) ResultType +# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_NATIVE_STUB(ResultType) ResultType # define JRI_CALLBACK #endif @@ -120,8 +180,15 @@ typedef juint jsize; #endif +/* moved from jni.h -- Sun's new jni.h doesn't have this anymore */ +#ifdef __cplusplus +typedef class _jobject *jref; +#else +typedef struct _jobject *jref; +#endif + typedef unsigned char jbool; -typedef char jbyte; +typedef signed char jbyte; #ifdef IS_64 /* XXX ok for alpha, but not right on all 64-bit architectures */ typedef unsigned int juint; typedef int jint; @@ -142,21 +209,30 @@ #ifdef HAVE_LONG_LONG -#if !(defined(WIN32) || defined(_WIN32)) -typedef long long jlong; -typedef unsigned long long julong; - -#define jlong_MAXINT 0x7fffffffffffffffLL -#define jlong_MININT 0x8000000000000000LL -#define jlong_ZERO 0x0LL +#ifdef OSF1 + +/* long is default 64-bit on OSF1, -std1 does not allow long long */ +typedef long jlong; +typedef unsigned long julong; +#define jlong_MAXINT 0x7fffffffffffffffL +#define jlong_MININT 0x8000000000000000L +#define jlong_ZERO 0x0L + +#elif (defined(WIN32) || defined(_WIN32)) + +typedef LONGLONG jlong; +typedef DWORDLONG julong; +#define jlong_MAXINT 0x7fffffffffffffffi64 +#define jlong_MININT 0x8000000000000000i64 +#define jlong_ZERO 0x0i64 #else -typedef LONGLONG jlong; -typedef DWORDLONG julong; -#define jlong_MAXINT 0x7fffffffffffffffi64 -#define jlong_MININT 0x8000000000000000i64 -#define jlong_ZERO 0x0i64 +typedef long long jlong; +typedef unsigned long long julong; +#define jlong_MAXINT 0x7fffffffffffffffLL +#define jlong_MININT 0x8000000000000000LL +#define jlong_ZERO 0x0LL #endif diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jritypes.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jritypes.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/jritypes.h 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/jritypes.h 2008-01-29 23:56:53.000000000 +0000 @@ -1,12 +1,48 @@ -/* -*- Mode: C; tab-width: 4; -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + /******************************************************************************* * Java Runtime Interface - * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. ******************************************************************************/ #ifndef JRITYPES_H #define JRITYPES_H +#include "jri_md.h" #include "jni.h" #include #include diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/npapi.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/npapi.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/npapi.h 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/npapi.h 2008-01-29 23:56:53.000000000 +0000 @@ -1,78 +1,215 @@ -/* -*- Mode: C; tab-width: 4; -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + + /* - * npapi.h $Revision: 67527 $ + * npapi.h $Revision: 750897 $ * Netscape client plug-in API spec */ #ifndef _NPAPI_H_ #define _NPAPI_H_ +#ifdef __OS2__ +#pragma pack(1) +#endif + +#include "prtypes.h" +/* Copied from xp_core.h */ +/* removed #ifdef for hpux defined in /usr/include/model.h */ +#ifndef XP_MAC +#ifndef _INT16 +#define _INT16 +#endif +#ifndef _INT32 +#define _INT32 +#endif +#ifndef _UINT16 +#define _UINT16 +#endif +#ifndef _UINT32 +#define _UINT32 +#endif +#endif + +/* + * NO_NSPR_10_SUPPORT disables the inclusion + * of obsolete/protypes.h, whose int16, uint16, + * int32, and uint32 typedefs conflict with those + * in this file. + */ +#ifndef NO_NSPR_10_SUPPORT +#define NO_NSPR_10_SUPPORT +#endif +#ifdef OJI #include "jri.h" /* Java Runtime Interface */ +#endif +#include + +#if defined (__OS2__ ) || defined (OS2) +# ifndef XP_OS2 +# define XP_OS2 1 +# endif /* XP_OS2 */ +#endif /* __OS2__ */ #ifdef _WINDOWS -# ifndef XP_WIN -# define XP_WIN 1 -# endif /* XP_WIN */ +# include +# ifndef XP_WIN +# define XP_WIN 1 +# endif /* XP_WIN */ #endif /* _WINDOWS */ #ifdef __MWERKS__ -# define _declspec __declspec -# ifdef macintosh -# ifndef XP_MAC -# define XP_MAC 1 -# endif /* XP_MAC */ -# endif /* macintosh */ -# ifdef __INTEL__ -# undef NULL -# ifndef XP_WIN -# define XP_WIN 1 -# endif /* __INTEL__ */ -# endif /* XP_PC */ +# define _declspec __declspec +# ifdef macintosh +# ifndef XP_MAC +# define XP_MAC 1 +# endif /* XP_MAC */ +# endif /* macintosh */ +# ifdef __INTEL__ +# undef NULL +# ifndef XP_WIN +# define XP_WIN 1 +# endif /* XP_WIN */ +# endif /* __INTEL__ */ #endif /* __MWERKS__ */ -#ifdef XP_MAC - #include - #include +#if defined(XP_MAC) || defined(XP_MACOSX) + #include + #include #endif - -#ifdef XP_UNIX - #include - #include -#endif +#if defined(XP_UNIX) +# include +# if defined(MOZ_X11) +# include +# include +# endif +#endif /*----------------------------------------------------------------------*/ -/* Plugin Version Constants */ +/* Plugin Version Constants */ /*----------------------------------------------------------------------*/ #define NP_VERSION_MAJOR 0 -#define NP_VERSION_MINOR 11 +#define NP_VERSION_MINOR 13 + + +/* The OS/2 version of Netscape uses RC_DATA to define the + mime types, file extensions, etc that are required. + Use a vertical bar to separate types, end types with \0. + FileVersion and ProductVersion are 32bit ints, all other + entries are strings the MUST be terminated wwith a \0. + +AN EXAMPLE: + +RCDATA NP_INFO_ProductVersion { 1,0,0,1,} + +RCDATA NP_INFO_MIMEType { "video/x-video|", + "video/x-flick\0" } +RCDATA NP_INFO_FileExtents { "avi|", + "flc\0" } +RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", + "MMOS2 Flc/Fli player(*.flc)\0" } + +RCDATA NP_INFO_FileVersion { 1,0,0,1 } +RCDATA NP_INFO_CompanyName { "Netscape Communications\0" } +RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0" +RCDATA NP_INFO_InternalName { "NPAVI32\0" ) +RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" +RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" } +RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } + +*/ + + +/* RC_DATA types for version info - required */ +#define NP_INFO_ProductVersion 1 +#define NP_INFO_MIMEType 2 +#define NP_INFO_FileOpenName 3 +#define NP_INFO_FileExtents 4 + +/* RC_DATA types for version info - used if found */ +#define NP_INFO_FileDescription 5 +#define NP_INFO_ProductName 6 + +/* RC_DATA types for version info - optional */ +#define NP_INFO_CompanyName 7 +#define NP_INFO_FileVersion 8 +#define NP_INFO_InternalName 9 +#define NP_INFO_LegalCopyright 10 +#define NP_INFO_OriginalFilename 11 + +#ifndef RC_INVOKED /*----------------------------------------------------------------------*/ -/* Definition of Basic Types */ +/* Definition of Basic Types */ /*----------------------------------------------------------------------*/ #ifndef _UINT16 typedef unsigned short uint16; #endif + #ifndef _UINT32 -#if defined(__alpha) +# if defined(__alpha) || defined(_AIX) || defined(__x86_64__) || defined(__LP64__) || defined(__amd64__) typedef unsigned int uint32; -#else /* __alpha */ -typedef unsigned long uint32; -#endif /* __alpha */ +# else +typedef u_int32_t uint32; +# endif #endif + +/* + * AIX defines these in sys/inttypes.h included from sys/types.h + */ +#ifndef AIX #ifndef _INT16 -typedef short int16; +typedef int16_t int16; #endif + #ifndef _INT32 -#if defined(__alpha) || defined(_AIX) +# if defined(__alpha) || defined(_AIX) || defined(__x86_64__) || defined(__LP64__) || defined(__amd64__) typedef int int32; -#else /* __alpha || _AIX */ -typedef long int32; -#endif /* __alpha || _AIX */ +# else +typedef int32_t int32; +# endif +#endif #endif #ifndef FALSE @@ -85,15 +222,15 @@ #define NULL (0L) #endif -typedef unsigned char NPBool; -typedef int16 NPError; -typedef int16 NPReason; -typedef char* NPMIMEType; +typedef unsigned char NPBool; +typedef int16 NPError; +typedef int16 NPReason; +typedef char* NPMIMEType; /*----------------------------------------------------------------------*/ -/* Structures and definitions */ +/* Structures and definitions */ /*----------------------------------------------------------------------*/ #ifdef XP_MAC @@ -105,8 +242,8 @@ */ typedef struct _NPP { - void* pdata; /* plug-in private data */ - void* ndata; /* netscape private data */ + void* pdata; /* plug-in private data */ + void* ndata; /* netscape private data */ } NPP_t; typedef NPP_t* NPP; @@ -114,38 +251,43 @@ typedef struct _NPStream { - void* pdata; /* plug-in private data */ - void* ndata; /* netscape private data */ - const char* url; - uint32 end; - uint32 lastmodified; - void* notifyData; + void* pdata; /* plug-in private data */ + void* ndata; /* netscape private data */ + const char* url; + uint32 end; + uint32 lastmodified; + void* notifyData; } NPStream; typedef struct _NPByteRange { - int32 offset; /* negative offset means from the end */ - uint32 length; - struct _NPByteRange* next; + int32 offset; /* negative offset means from the end */ + uint32 length; + struct _NPByteRange* next; } NPByteRange; typedef struct _NPSavedData { - int32 len; - void* buf; + int32 len; + void* buf; } NPSavedData; typedef struct _NPRect { - uint16 top; - uint16 left; - uint16 bottom; - uint16 right; + uint16 top; + uint16 left; + uint16 bottom; + uint16 right; } NPRect; +typedef struct _NPSize +{ + int32 width; + int32 height; +} NPSize; #ifdef XP_UNIX /* @@ -164,26 +306,71 @@ typedef struct { - int32 type; + int32 type; } NPAnyCallbackStruct; typedef struct { - int32 type; - Display* display; - Visual* visual; - Colormap colormap; - unsigned int depth; + int32 type; +#ifdef MOZ_X11 + Display* display; + Visual* visual; + Colormap colormap; + unsigned int depth; +#endif } NPSetWindowCallbackStruct; typedef struct { - int32 type; - FILE* fp; + int32 type; + FILE* fp; } NPPrintCallbackStruct; #endif /* XP_UNIX */ + +/* + * The following masks are applied on certain platforms to NPNV and + * NPPV selectors that pass around pointers to COM interfaces. Newer + * compilers on some platforms may generate vtables that are not + * compatible with older compilers. To prevent older plugins from + * not understanding a new browser's ABI, these masks change the + * values of those selectors on those platforms. To remain backwards + * compatible with differenet versions of the browser, plugins can + * use these masks to dynamically determine and use the correct C++ + * ABI that the browser is expecting. This does not apply to Windows + * as Microsoft's COM ABI will likely not change. + */ + +#define NP_ABI_GCC3_MASK 0x10000000 +/* + * gcc 3.x generated vtables on UNIX and OSX are incompatible with + * previous compilers. + */ +#if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) +#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK +#else +#define _NP_ABI_MIXIN_FOR_GCC3 0 +#endif + + +#define NP_ABI_MACHO_MASK 0x01000000 +/* + * On OSX, the Mach-O executable format is significantly + * different than CFM. In addition to having a different + * C++ ABI, it also has has different C calling convention. + * You must use glue code when calling between CFM and + * Mach-O C functions. + */ +#if (defined(TARGET_RT_MAC_MACHO)) +#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK +#else +#define _NP_ABI_MIXIN_FOR_MACHO 0 +#endif + + +#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) + /* * List of variable names for which NPP_GetValue shall be implemented */ @@ -191,7 +378,18 @@ NPPVpluginNameString = 1, NPPVpluginDescriptionString, NPPVpluginWindowBool, - NPPVpluginTransparentBool + NPPVpluginTransparentBool, + NPPVjavaClass, /* Not implemented in Mozilla 1.0 */ + NPPVpluginWindowSize, + NPPVpluginTimerInterval, + + NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), + NPPVpluginScriptableIID = 11, + + /* 12 and over are available on Mozilla builds starting with 0.9.9 */ + NPPVjavascriptPushCallerBool = 12, + NPPVpluginKeepLibraryInMemory = 13, /* available in Mozilla 1.0 */ + NPPVpluginNeedsXEmbed = 14 } NPPVariable; /* @@ -200,124 +398,157 @@ typedef enum { NPNVxDisplay = 1, NPNVxtAppContext, - NPNVnetscapeWindow, + NPNVnetscapeWindow, NPNVjavascriptEnabledBool, NPNVasdEnabledBool, - NPNVisOfflineBool + NPNVisOfflineBool, + + /* 10 and over are available on Mozilla builds starting with 0.9.4 */ + NPNVserviceManager = (10 | NP_ABI_MASK), + NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */ + NPNVDOMWindow = (12 | NP_ABI_MASK), + NPNVToolkit = (13 | NP_ABI_MASK), + NPNVSupportsXEmbedBool = 14 } NPNVariable; /* + * The type of Tookkit the widgets use + */ +typedef enum { + NPNVGtk12 = 1, + NPNVGtk2 +} NPNToolkitType; + +/* * The type of a NPWindow - it specifies the type of the data structure * returned in the window field. */ typedef enum { - NPWindowTypeWindow = 1, - NPWindowTypeDrawable + NPWindowTypeWindow = 1, + NPWindowTypeDrawable } NPWindowType; typedef struct _NPWindow { - void* window; /* Platform specific window handle */ - int32 x; /* Position of top left corner relative */ - int32 y; /* to a netscape page. */ - uint32 width; /* Maximum window size */ - uint32 height; - NPRect clipRect; /* Clipping rectangle in port coordinates */ - /* Used by MAC only. */ -#ifdef XP_UNIX - void * ws_info; /* Platform-dependent additonal data */ + void* window; /* Platform specific window handle */ + /* OS/2: x - Position of bottom left corner */ + /* OS/2: y - relative to visible netscape window */ + int32 x; /* Position of top left corner relative */ + int32 y; /* to a netscape page. */ + uint32 width; /* Maximum window size */ + uint32 height; + NPRect clipRect; /* Clipping rectangle in port coordinates */ + /* Used by MAC only. */ +#if defined(XP_UNIX) && !defined(XP_MACOSX) + void * ws_info; /* Platform-dependent additional data */ #endif /* XP_UNIX */ - NPWindowType type; /* Is this a window or a drawable? */ + NPWindowType type; /* Is this a window or a drawable? */ } NPWindow; typedef struct _NPFullPrint { - NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */ - /* printing */ - NPBool printOne; /* TRUE if plugin should print one copy */ - /* to default printer */ - void* platformPrint; /* Platform-specific printing info */ + NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ + NPBool printOne; /* TRUE if plugin should print one copy to default printer */ + void* platformPrint; /* Platform-specific printing info */ } NPFullPrint; typedef struct _NPEmbedPrint { - NPWindow window; - void* platformPrint; /* Platform-specific printing info */ + NPWindow window; + void* platformPrint; /* Platform-specific printing info */ } NPEmbedPrint; typedef struct _NPPrint { - uint16 mode; /* NP_FULL or NP_EMBED */ - union - { - NPFullPrint fullPrint; /* if mode is NP_FULL */ - NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ - } print; + uint16 mode; /* NP_FULL or NP_EMBED */ + union + { + NPFullPrint fullPrint; /* if mode is NP_FULL */ + NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ + } print; } NPPrint; -#ifdef XP_MAC -typedef EventRecord NPEvent; +#if defined(XP_MAC) || defined(XP_MACOSX) +typedef EventRecord NPEvent; #elif defined(XP_WIN) typedef struct _NPEvent { - uint16 event; - uint32 wParam; - uint32 lParam; + uint16 event; + uint32 wParam; + uint32 lParam; +} NPEvent; +#elif defined(XP_OS2) +typedef struct _NPEvent +{ + uint32 event; + uint32 wParam; + uint32 lParam; } NPEvent; -#elif defined (XP_UNIX) +#elif defined (XP_UNIX) && defined(MOZ_X11) typedef XEvent NPEvent; #else -typedef void* NPEvent; +typedef void* NPEvent; #endif /* XP_MAC */ -#ifdef XP_MAC +#if defined(XP_MAC) || defined(XP_MACOSX) typedef RgnHandle NPRegion; #elif defined(XP_WIN) typedef HRGN NPRegion; -#elif defined(XP_UNIX) +#elif defined(XP_UNIX) && defined(MOZ_X11) typedef Region NPRegion; #else typedef void *NPRegion; #endif /* XP_MAC */ -#ifdef XP_MAC +#if defined(XP_MAC) || defined(XP_MACOSX) /* * Mac-specific structures and definitions. */ typedef struct NP_Port { - CGrafPtr port; /* Grafport */ - int32 portx; /* position inside the topmost window */ - int32 porty; + CGrafPtr port; /* Grafport */ + int32 portx; /* position inside the topmost window */ + int32 porty; } NP_Port; /* * Non-standard event types that can be passed to HandleEvent */ -#define getFocusEvent (osEvt + 16) -#define loseFocusEvent (osEvt + 17) -#define adjustCursorEvent (osEvt + 18) -#endif /* XP_MAC */ +enum NPEventType { + NPEventType_GetFocusEvent = (osEvt + 16), + NPEventType_LoseFocusEvent, + NPEventType_AdjustCursorEvent, + NPEventType_MenuCommandEvent, + NPEventType_ClippingChangedEvent, + NPEventType_ScrollingBeginsEvent = 1000, + NPEventType_ScrollingEndsEvent +}; +#ifdef OBSOLETE +#define getFocusEvent (osEvt + 16) +#define loseFocusEvent (osEvt + 17) +#define adjustCursorEvent (osEvt + 18) +#endif +#endif /* XP_MAC */ /* * Values for mode passed to NPP_New: */ -#define NP_EMBED 1 -#define NP_FULL 2 +#define NP_EMBED 1 +#define NP_FULL 2 /* * Values for stream type passed to NPP_NewStream: */ -#define NP_NORMAL 1 -#define NP_SEEK 2 -#define NP_ASFILE 3 -#define NP_ASFILEONLY 4 +#define NP_NORMAL 1 +#define NP_SEEK 2 +#define NP_ASFILE 3 +#define NP_ASFILEONLY 4 -#define NP_MAXREADY (((unsigned)(~0)<<1)>>1) +#define NP_MAXREADY (((unsigned)(~0)<<1)>>1) #ifdef XP_MAC #pragma options align=reset @@ -325,38 +556,38 @@ /*----------------------------------------------------------------------*/ -/* Error and Reason Code definitions */ +/* Error and Reason Code definitions */ /*----------------------------------------------------------------------*/ /* - * Values of type NPError: + * Values of type NPError: */ -#define NPERR_BASE 0 -#define NPERR_NO_ERROR (NPERR_BASE + 0) -#define NPERR_GENERIC_ERROR (NPERR_BASE + 1) -#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) -#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) +#define NPERR_BASE 0 +#define NPERR_NO_ERROR (NPERR_BASE + 0) +#define NPERR_GENERIC_ERROR (NPERR_BASE + 1) +#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) +#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) -#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) -#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) +#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) +#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) -#define NPERR_INVALID_PARAM (NPERR_BASE + 9) -#define NPERR_INVALID_URL (NPERR_BASE + 10) -#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) -#define NPERR_NO_DATA (NPERR_BASE + 12) -#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) +#define NPERR_INVALID_PARAM (NPERR_BASE + 9) +#define NPERR_INVALID_URL (NPERR_BASE + 10) +#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) +#define NPERR_NO_DATA (NPERR_BASE + 12) +#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) /* - * Values of type NPReason: + * Values of type NPReason: */ -#define NPRES_BASE 0 -#define NPRES_DONE (NPRES_BASE + 0) -#define NPRES_NETWORK_ERR (NPRES_BASE + 1) -#define NPRES_USER_BREAK (NPRES_BASE + 2) +#define NPRES_BASE 0 +#define NPRES_DONE (NPRES_BASE + 0) +#define NPRES_NETWORK_ERR (NPRES_BASE + 1) +#define NPRES_USER_BREAK (NPRES_BASE + 2) /* - * Don't use these obsolete error codes any more. + * Don't use these obsolete error codes any more. */ #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR @@ -365,23 +596,27 @@ /* * Version feature information */ -#define NPVERS_HAS_STREAMOUTPUT 8 -#define NPVERS_HAS_NOTIFICATION 9 -#define NPVERS_HAS_LIVECONNECT 9 -#define NPVERS_WIN16_HAS_LIVECONNECT 9 -#define NPVERS_68K_HAS_LIVECONNECT 11 -#define NPVERS_HAS_WINDOWLESS 11 - +#define NPVERS_HAS_STREAMOUTPUT 8 +#define NPVERS_HAS_NOTIFICATION 9 +#define NPVERS_HAS_LIVECONNECT 9 +#define NPVERS_WIN16_HAS_LIVECONNECT 9 +#define NPVERS_68K_HAS_LIVECONNECT 11 +#define NPVERS_HAS_WINDOWLESS 11 +#define NPVERS_HAS_XPCONNECT_SCRIPTING 13 /*----------------------------------------------------------------------*/ -/* Function Prototypes */ +/* Function Prototypes */ /*----------------------------------------------------------------------*/ #if defined(_WINDOWS) && !defined(WIN32) #define NP_LOADDS _loadds #else +#if defined(__OS2__) +#define NP_LOADDS _System +#else #define NP_LOADDS #endif +#endif #ifdef __cplusplus extern "C" { @@ -392,78 +627,80 @@ */ #ifdef XP_UNIX -char* NPP_GetMIMEDescription(void); +char* NPP_GetMIMEDescription(void); #endif /* XP_UNIX */ -NPError NPP_Initialize(void); -void NPP_Shutdown(void); -NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, - uint16 mode, int16 argc, char* argn[], - char* argv[], NPSavedData* saved); -NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); -NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); -NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, - NPStream* stream, NPBool seekable, - uint16* stype); -NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, - NPReason reason); -int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); -int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, - int32 len, void* buffer); -void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, - const char* fname); -void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); -int16 NPP_HandleEvent(NPP instance, void* event); -void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, - NPReason reason, void* notifyData); -jref NP_LOADDS NPP_GetJavaClass(void); -NPError NPP_GetValue(void *instance, NPPVariable variable, - void *value); -NPError NPP_SetValue(void *instance, NPNVariable variable, - void *value); +NPError NP_LOADDS NPP_Initialize(void); +void NP_LOADDS NPP_Shutdown(void); +NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, + uint16 mode, int16 argc, char* argn[], + char* argv[], NPSavedData* saved); +NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); +NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); +NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, + NPStream* stream, NPBool seekable, + uint16* stype); +NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, + NPReason reason); +int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); +int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, + int32 len, void* buffer); +void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, + const char* fname); +void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); +int16 NP_LOADDS NPP_HandleEvent(NPP instance, void* event); +void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, + NPReason reason, void* notifyData); +#ifdef OJI +jref NP_LOADDS NPP_GetJavaClass(void); +#endif +NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); +NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); /* * NPN_* functions are provided by the navigator and called by the plugin. */ - -void NPN_Version(int* plugin_major, int* plugin_minor, - int* netscape_major, int* netscape_minor); -NPError NPN_GetURLNotify(NPP instance, const char* url, - const char* target, void* notifyData); -NPError NPN_GetURL(NPP instance, const char* url, - const char* target); -NPError NPN_PostURLNotify(NPP instance, const char* url, - const char* target, uint32 len, - const char* buf, NPBool file, - void* notifyData); -NPError NPN_PostURL(NPP instance, const char* url, - const char* target, uint32 len, - const char* buf, NPBool file); -NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); -NPError NPN_NewStream(NPP instance, NPMIMEType type, - const char* target, NPStream** stream); -int32 NPN_Write(NPP instance, NPStream* stream, int32 len, - void* buffer); -NPError NPN_DestroyStream(NPP instance, NPStream* stream, - NPReason reason); -void NPN_Status(NPP instance, const char* message); -const char* NPN_UserAgent(NPP instance); -void* NPN_MemAlloc(uint32 size); -void NPN_MemFree(void* ptr); -uint32 NPN_MemFlush(uint32 size); -void NPN_ReloadPlugins(NPBool reloadPages); -JRIEnv* NPN_GetJavaEnv(void); -jref NPN_GetJavaPeer(NPP instance); -NPError NPN_GetValue(NPP instance, NPNVariable variable, - void *value); -NPError NPN_SetValue(NPP instance, NPPVariable variable, - void *value); -void NPN_InvalidateRect(NPP instance, NPRect *invalidRect); -void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); -void NPN_ForceRedraw(NPP instance); +void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, + int* netscape_major, int* netscape_minor); +NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, + const char* target, void* notifyData); +NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url, + const char* target); +NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, + const char* target, uint32 len, + const char* buf, NPBool file, + void* notifyData); +NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url, + const char* target, uint32 len, + const char* buf, NPBool file); +NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); +NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, + const char* target, NPStream** stream); +int32 NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); +NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason); +void NP_LOADDS NPN_Status(NPP instance, const char* message); +const char* NP_LOADDS NPN_UserAgent(NPP instance); +void* NP_LOADDS NPN_MemAlloc(uint32 size); +void NP_LOADDS NPN_MemFree(void* ptr); +uint32 NP_LOADDS NPN_MemFlush(uint32 size); +void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); +#ifdef OJI +JRIEnv* NP_LOADDS NPN_GetJavaEnv(void); +jref NP_LOADDS NPN_GetJavaPeer(NPP instance); +#endif +NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value); +NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value); +void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); +void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); +void NP_LOADDS NPN_ForceRedraw(NPP instance); #ifdef __cplusplus } /* end extern "C" */ #endif +#endif /* RC_INVOKED */ +#ifdef __OS2__ +#pragma pack() +#endif + #endif /* _NPAPI_H_ */ diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/npruntime.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/npruntime.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/npruntime.h 1970-01-01 00:00:00.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/npruntime.h 2008-01-29 23:56:53.000000000 +0000 @@ -0,0 +1,399 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Copyright � 2004, Apple Computer, Inc. and The Mozilla Foundation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla + * Foundation ("Mozilla") nor the names of their contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR + * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Revision 1 (March 4, 2004): + * Initial proposal. + * + * Revision 2 (March 10, 2004): + * All calls into script were made asynchronous. Results are + * provided via the NPScriptResultFunctionPtr callback. + * + * Revision 3 (March 10, 2004): + * Corrected comments to not refer to class retain/release FunctionPtrs. + * + * Revision 4 (March 11, 2004): + * Added additional convenience NPN_SetExceptionWithUTF8(). + * Changed NPHasPropertyFunctionPtr and NPHasMethodFunctionPtr to take NPClass + * pointers instead of NPObject pointers. + * Added NPIsValidIdentifier(). + * + * Revision 5 (March 17, 2004): + * Added context parameter to result callbacks from ScriptObject functions. + * + * Revision 6 (March 29, 2004): + * Renamed functions implemented by user agent to NPN_*. Removed _ from + * type names. + * Renamed "JavaScript" types to "Script". + * + * Revision 7 (April 21, 2004): + * NPIdentifier becomes a void*, was int32_t + * Remove NP_IsValidIdentifier, renamed NP_IdentifierFromUTF8 to NP_GetIdentifier + * Added NPVariant and modified functions to use this new type. + * + * Revision 8 (July 9, 2004): + * Updated to joint Apple-Mozilla license. + * + */ +#ifndef _NP_RUNTIME_H_ +#define _NP_RUNTIME_H_ + +#include +typedef Q_UINT32 uint32_t; + +#ifdef __cplusplus +extern "C" { +#endif + + +/* + This API is used to facilitate binding code written in C to script + objects. The API in this header does not assume the presence of a + user agent. That is, it can be used to bind C code to scripting + environments outside of the context of a user agent. + + However, the normal use of the this API is in the context of a + scripting environment running in a browser or other user agent. + In particular it is used to support the extended Netscape + script-ability API for plugins (NP-SAP). NP-SAP is an extension + of the Netscape plugin API. As such we have adopted the use of + the "NP" prefix for this API. + + The following NP{N|P}Variables were added to the Netscape plugin + API (in npapi.h): + + NPNVWindowNPObject + NPNVPluginElementNPObject + NPPVpluginScriptableNPObject + + These variables are exposed through NPN_GetValue() and + NPP_GetValue() (respectively) and are used to establish the + initial binding between the user agent and native code. The DOM + objects in the user agent can be examined and manipulated using + the NPN_ functions that operate on NPObjects described in this + header. + + To the extent possible the assumptions about the scripting + language used by the scripting environment have been minimized. +*/ + +#define NP_BEGIN_MACRO do { +#define NP_END_MACRO } while (0) + +/* + Objects (non-primitive data) passed between 'C' and script is + always wrapped in an NPObject. The 'interface' of an NPObject is + described by an NPClass. +*/ +typedef struct NPObject NPObject; +typedef struct NPClass NPClass; + +typedef char NPUTF8; +typedef struct _NPString { + const NPUTF8 *utf8characters; + uint32_t utf8length; +} NPString; + +typedef enum { + NPVariantType_Void, + NPVariantType_Null, + NPVariantType_Bool, + NPVariantType_Int32, + NPVariantType_Double, + NPVariantType_String, + NPVariantType_Object +} NPVariantType; + +typedef struct _NPVariant { + NPVariantType type; + union { + bool boolValue; + uint32_t intValue; + double doubleValue; + NPString stringValue; + NPObject *objectValue; + } value; +} NPVariant; + +/* + NPN_ReleaseVariantValue is called on all 'out' parameters + references. Specifically it is to be called on variants that own + their value, as is the case with all non-const NPVariant* + arguments after a successful call to any methods (except this one) + in this API. + + After calling NPN_ReleaseVariantValue, the type of the variant + will be NPVariantType_Void. +*/ +void NPN_ReleaseVariantValue(NPVariant *variant); + +#define NPVARIANT_IS_VOID(_v) ((_v).type == NPVariantType_Void) +#define NPVARIANT_IS_NULL(_v) ((_v).type == NPVariantType_Null) +#define NPVARIANT_IS_BOOLEAN(_v) ((_v).type == NPVariantType_Bool) +#define NPVARIANT_IS_INT32(_v) ((_v).type == NPVariantType_Int32) +#define NPVARIANT_IS_DOUBLE(_v) ((_v).type == NPVariantType_Double) +#define NPVARIANT_IS_STRING(_v) ((_v).type == NPVariantType_String) +#define NPVARIANT_IS_OBJECT(_v) ((_v).type == NPVariantType_Object) + +#define NPVARIANT_TO_BOOLEAN(_v) ((_v).value.boolValue) +#define NPVARIANT_TO_INT32(_v) ((_v).value.intValue) +#define NPVARIANT_TO_DOUBLE(_v) ((_v).value.doubleValue) +#define NPVARIANT_TO_STRING(_v) ((_v).value.stringValue) +#define NPVARIANT_TO_OBJECT(_v) ((_v).value.objectValue) + +#define VOID_TO_NPVARIANT(_v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Void; \ + (_v).value.objectValue = NULL; \ +NP_END_MACRO + +#define NULL_TO_NPVARIANT(_v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Null; \ + (_v).value.objectValue = NULL; \ +NP_END_MACRO + +#define BOOLEAN_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Bool; \ + (_v).value.boolValue = !!(_val); \ +NP_END_MACRO + +#define INT32_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Int32; \ + (_v).value.intValue = _val; \ +NP_END_MACRO + +#define DOUBLE_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Double; \ + (_v).value.doubleValue = _val; \ +NP_END_MACRO + +#define STRINGZ_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_String; \ + NPString str = { _val, strlen(_val) }; \ + (_v).value.stringValue = str; \ +NP_END_MACRO + +#define STRINGN_TO_NPVARIANT(_val, _len, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_String; \ + NPString str = { _val, _len }; \ + (_v).value.stringValue = str; \ +NP_END_MACRO + +#define OBJECT_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Object; \ + (_v).value.objectValue = _val; \ +NP_END_MACRO + + +/* + Type mappings (JavaScript types have been used for illustration + purposes): + + JavaScript to C (NPVariant with type:) + undefined NPVariantType_Void + null NPVariantType_Null + Boolean NPVariantType_Bool + Number NPVariantType_Double or NPVariantType_Int32 + String NPVariantType_String + Object NPVariantType_Object + + C (NPVariant with type:) to JavaScript + NPVariantType_Void undefined + NPVariantType_Null null + NPVariantType_Bool Boolean + NPVariantType_Int32 Number + NPVariantType_Double Number + NPVariantType_String String + NPVariantType_Object Object +*/ + +typedef void *NPIdentifier; + +/* + NPObjects have methods and properties. Methods and properties are + identified with NPIdentifiers. These identifiers may be reflected + in script. NPIdentifiers can be either strings or integers, IOW, + methods and properties can be identified by either strings or + integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be + compared using ==. In case of any errors, the requested + NPIdentifier(s) will be NULL. +*/ +NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name); +void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, + NPIdentifier *identifiers); +NPIdentifier NPN_GetIntIdentifier(int32_t intid); +bool NPN_IdentifierIsString(NPIdentifier identifier); + +/* + The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed. +*/ +NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier); + +/* + Get the integer represented by identifier. If identifier is not an + integer identifier, the behaviour is undefined. +*/ +int32_t NPN_IntFromIdentifier(NPIdentifier identifier); + +/* + NPObject behavior is implemented using the following set of + callback functions. + + The NPVariant *result argument of these functions (where + applicable) should be released using NPN_ReleaseVariantValue(). +*/ +typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass); +typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj); +typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj); +typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name); +typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name, + const NPVariant *args, uint32_t argCount, + NPVariant *result); +typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj, + const NPVariant *args, + uint32_t argCount, + NPVariant *result); +typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name); +typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, + NPVariant *result); +typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, + const NPVariant *value); +typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj, + NPIdentifier name); + +/* + NPObjects returned by create, retain, invoke, and getProperty pass + a reference count to the caller. That is, the callee adds a + reference count which passes to the caller. It is the caller's + responsibility to release the returned object. + + NPInvokeFunctionPtr function may return 0 to indicate a void + result. + + NPInvalidateFunctionPtr is called by the scripting environment + when the native code is shutdown. Any attempt to message a + NPObject instance after the invalidate callback has been + called will result in undefined behavior, even if the native code + is still retaining those NPObject instances. (The runtime + will typically return immediately, with 0 or NULL, from an attempt + to dispatch to a NPObject, but this behavior should not be + depended upon.) +*/ +struct NPClass +{ + uint32_t structVersion; + NPAllocateFunctionPtr allocate; + NPDeallocateFunctionPtr deallocate; + NPInvalidateFunctionPtr invalidate; + NPHasMethodFunctionPtr hasMethod; + NPInvokeFunctionPtr invoke; + NPInvokeDefaultFunctionPtr invokeDefault; + NPHasPropertyFunctionPtr hasProperty; + NPGetPropertyFunctionPtr getProperty; + NPSetPropertyFunctionPtr setProperty; + NPRemovePropertyFunctionPtr removeProperty; +}; + +#define NP_CLASS_STRUCT_VERSION 1 + +struct NPObject { + NPClass *_class; + uint32_t referenceCount; + /* + * Additional space may be allocated here by types of NPObjects + */ +}; + +/* + If the class has an allocate function, NPN_CreateObject invokes + that function, otherwise a NPObject is allocated and + returned. This method will initialize the referenceCount member of + the NPObject to 1. +*/ +NPObject *NPN_CreateObject(NPP npp, NPClass *aClass); + +/* + Increment the NPObject's reference count. +*/ +NPObject *NPN_RetainObject(NPObject *npobj); + +/* + Decremented the NPObject's reference count. If the reference + count goes to zero, the class's destroy function is invoke if + specified, otherwise the object is freed directly. +*/ +void NPN_ReleaseObject(NPObject *npobj); + +/* + Functions to access script objects represented by NPObject. + + Calls to script objects are synchronous. If a function returns a + value, it will be supplied via the result NPVariant + argument. Successful calls will return true, false will be + returned in case of an error. + + Calls made from plugin code to script must be made from the thread + on which the plugin was initialized. +*/ + +bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, + const NPVariant *args, uint32_t argCount, NPVariant *result); +bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, + uint32_t argCount, NPVariant *result); +bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, + NPVariant *result); +bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, + NPVariant *result); +bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, + const NPVariant *value); +bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); +bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); +bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName); + +/* + NPN_SetException may be called to trigger a script exception upon + return from entry points into NPObjects. Typical usage: + + NPN_SetException (npobj, message); +*/ +void NPN_SetException(NPObject *npobj, const NPUTF8 *message); + +#ifdef __cplusplus +} +#endif + +#endif diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/npupp.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/npupp.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/npupp.h 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/npupp.h 2008-01-29 23:56:53.000000000 +0000 @@ -1,6 +1,43 @@ -/* -*- Mode: C; tab-width: 4; -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + + /* - * npupp.h $Revision: 46100 $ + * npupp.h $Revision: 750897 $ * function call mecahnics needed by platform specific glue code. */ @@ -8,6 +45,10 @@ #ifndef _NPUPP_H_ #define _NPUPP_H_ +#if defined(__OS2__) +#pragma pack(1) +#endif + #ifndef GENERATINGCFM #define GENERATINGCFM 0 #endif @@ -16,435 +57,437 @@ #include "npapi.h" #endif +#include "npruntime.h" + #include "jri.h" /****************************************************************************************** plug-in function table macros - for each function in and out of the plugin API we define + for each function in and out of the plugin API we define typedef NPP_FooUPP - #define NewNPP_FooProc - #define CallNPP_FooProc - for mac, define the UPP magic for PPC/68K calling + #define NewNPP_FooProc + #define CallNPP_FooProc + for mac, define the UPP magic for PPC/68K calling *******************************************************************************************/ /* NPP_Initialize */ -#if GENERATINGCFM +#define _NPUPP_USE_UPP_ 0 + +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_InitializeUPP; enum { - uppNPP_InitializeProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) - | RESULT_SIZE(SIZE_CODE(0)) -}; - -#define NewNPP_InitializeProc(FUNC) \ - (NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture()) -#define CallNPP_InitializeProc(FUNC) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo) - -#else - -typedef void (*NPP_InitializeUPP)(void); -#define NewNPP_InitializeProc(FUNC) \ - ((NPP_InitializeUPP) (FUNC)) -#define CallNPP_InitializeProc(FUNC) \ - (*(FUNC))() + uppNPP_InitializeProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPP_InitializeProc(FUNC) \ + (NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture()) +#define CallNPP_InitializeProc(FUNC) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo) + +#else + +typedef void (* NP_LOADDS NPP_InitializeUPP)(void); +#define NewNPP_InitializeProc(FUNC) \ + ((NPP_InitializeUPP) (FUNC)) +#define CallNPP_InitializeProc(FUNC) \ + (*(FUNC))() #endif /* NPP_Shutdown */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_ShutdownUPP; enum { - uppNPP_ShutdownProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) - | RESULT_SIZE(SIZE_CODE(0)) -}; - -#define NewNPP_ShutdownProc(FUNC) \ - (NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture()) -#define CallNPP_ShutdownProc(FUNC) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo) - -#else - -typedef void (*NPP_ShutdownUPP)(void); -#define NewNPP_ShutdownProc(FUNC) \ - ((NPP_ShutdownUPP) (FUNC)) -#define CallNPP_ShutdownProc(FUNC) \ - (*(FUNC))() + uppNPP_ShutdownProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPP_ShutdownProc(FUNC) \ + (NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture()) +#define CallNPP_ShutdownProc(FUNC) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo) + +#else + +typedef void (* NP_LOADDS NPP_ShutdownUPP)(void); +#define NewNPP_ShutdownProc(FUNC) \ + ((NPP_ShutdownUPP) (FUNC)) +#define CallNPP_ShutdownProc(FUNC) \ + (*(FUNC))() #endif /* NPP_New */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_NewUPP; enum { - uppNPP_NewProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **))) - | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **))) - | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + uppNPP_NewProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **))) + | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) }; -#define NewNPP_NewProc(FUNC) \ - (NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture()) +#define NewNPP_NewProc(FUNC) \ + (NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture()) #define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \ - (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \ + (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) #else -typedef NPError (*NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); -#define NewNPP_NewProc(FUNC) \ - ((NPP_NewUPP) (FUNC)) -#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) +typedef NPError (* NP_LOADDS NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); +#define NewNPP_NewProc(FUNC) \ + ((NPP_NewUPP) (FUNC)) +#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) #endif /* NPP_Destroy */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_DestroyUPP; enum { - uppNPP_DestroyProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_DestroyProc(FUNC) \ - (NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture()) -#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2)) -#else - -typedef NPError (*NPP_DestroyUPP)(NPP instance, NPSavedData** save); -#define NewNPP_DestroyProc(FUNC) \ - ((NPP_DestroyUPP) (FUNC)) -#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) + uppNPP_DestroyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_DestroyProc(FUNC) \ + (NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture()) +#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2)) +#else + +typedef NPError (* NP_LOADDS NPP_DestroyUPP)(NPP instance, NPSavedData** save); +#define NewNPP_DestroyProc(FUNC) \ + ((NPP_DestroyUPP) (FUNC)) +#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) #endif /* NPP_SetWindow */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_SetWindowUPP; enum { - uppNPP_SetWindowProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_SetWindowProc(FUNC) \ - (NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture()) -#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2)) + uppNPP_SetWindowProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_SetWindowProc(FUNC) \ + (NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture()) +#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2)) #else -typedef NPError (*NPP_SetWindowUPP)(NPP instance, NPWindow* window); -#define NewNPP_SetWindowProc(FUNC) \ - ((NPP_SetWindowUPP) (FUNC)) -#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) +typedef NPError (* NP_LOADDS NPP_SetWindowUPP)(NPP instance, NPWindow* window); +#define NewNPP_SetWindowProc(FUNC) \ + ((NPP_SetWindowUPP) (FUNC)) +#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) #endif /* NPP_NewStream */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_NewStreamUPP; enum { - uppNPP_NewStreamProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_NewStreamProc(FUNC) \ - (NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture()) -#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) -#else - -typedef NPError (*NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); -#define NewNPP_NewStreamProc(FUNC) \ - ((NPP_NewStreamUPP) (FUNC)) + uppNPP_NewStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_NewStreamProc(FUNC) \ + (NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture()) +#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) +#else + +typedef NPError (* NP_LOADDS NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); +#define NewNPP_NewStreamProc(FUNC) \ + ((NPP_NewStreamUPP) (FUNC)) #define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) #endif /* NPP_DestroyStream */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_DestroyStreamUPP; enum { - uppNPP_DestroyStreamProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_DestroyStreamProc(FUNC) \ - (NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture()) -#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPReasonArg)) + uppNPP_DestroyStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_DestroyStreamProc(FUNC) \ + (NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture()) +#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPReasonArg)) #else -typedef NPError (*NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); -#define NewNPP_DestroyStreamProc(FUNC) \ - ((NPP_DestroyStreamUPP) (FUNC)) -#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ - (*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg)) +typedef NPError (* NP_LOADDS NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); +#define NewNPP_DestroyStreamProc(FUNC) \ + ((NPP_DestroyStreamUPP) (FUNC)) +#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ + (*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg)) #endif /* NPP_WriteReady */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_WriteReadyUPP; enum { - uppNPP_WriteReadyProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | RESULT_SIZE(SIZE_CODE(sizeof(int32))) -}; -#define NewNPP_WriteReadyProc(FUNC) \ - (NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture()) -#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ - (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr)) + uppNPP_WriteReadyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +}; +#define NewNPP_WriteReadyProc(FUNC) \ + (NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture()) +#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ + (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr)) #else -typedef int32 (*NPP_WriteReadyUPP)(NPP instance, NPStream* stream); -#define NewNPP_WriteReadyProc(FUNC) \ - ((NPP_WriteReadyUPP) (FUNC)) -#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ - (*(FUNC))((NPParg), (NPStreamPtr)) +typedef int32 (* NP_LOADDS NPP_WriteReadyUPP)(NPP instance, NPStream* stream); +#define NewNPP_WriteReadyProc(FUNC) \ + ((NPP_WriteReadyUPP) (FUNC)) +#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ + (*(FUNC))((NPParg), (NPStreamPtr)) #endif /* NPP_Write */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_WriteUPP; enum { - uppNPP_WriteProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*))) - | RESULT_SIZE(SIZE_CODE(sizeof(int32))) -}; -#define NewNPP_WriteProc(FUNC) \ - (NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture()) -#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ - (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) + uppNPP_WriteProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +}; +#define NewNPP_WriteProc(FUNC) \ + (NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture()) +#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ + (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) #else -typedef int32 (*NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); -#define NewNPP_WriteProc(FUNC) \ - ((NPP_WriteUPP) (FUNC)) -#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ - (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) +typedef int32 (* NP_LOADDS NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); +#define NewNPP_WriteProc(FUNC) \ + ((NPP_WriteUPP) (FUNC)) +#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ + (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) #endif /* NPP_StreamAsFile */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_StreamAsFileUPP; enum { - uppNPP_StreamAsFileProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) - | RESULT_SIZE(SIZE_CODE(0)) -}; -#define NewNPP_StreamAsFileProc(FUNC) \ - (NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture()) -#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3)) + uppNPP_StreamAsFileProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) + | RESULT_SIZE(SIZE_CODE(0)) +}; +#define NewNPP_StreamAsFileProc(FUNC) \ + (NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture()) +#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3)) #else -typedef void (*NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname); -#define NewNPP_StreamAsFileProc(FUNC) \ - ((NPP_StreamAsFileUPP) (FUNC)) -#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) +typedef void (* NP_LOADDS NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname); +#define NewNPP_StreamAsFileProc(FUNC) \ + ((NPP_StreamAsFileUPP) (FUNC)) +#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) #endif /* NPP_Print */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_PrintUPP; enum { - uppNPP_PrintProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *))) - | RESULT_SIZE(SIZE_CODE(0)) -}; -#define NewNPP_PrintProc(FUNC) \ - (NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture()) -#define CallNPP_PrintProc(FUNC, NPParg, voidPtr) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr)) + uppNPP_PrintProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *))) + | RESULT_SIZE(SIZE_CODE(0)) +}; +#define NewNPP_PrintProc(FUNC) \ + (NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture()) +#define CallNPP_PrintProc(FUNC, NPParg, voidPtr) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr)) #else -typedef void (*NPP_PrintUPP)(NPP instance, NPPrint* platformPrint); -#define NewNPP_PrintProc(FUNC) \ - ((NPP_PrintUPP) (FUNC)) -#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \ - (*(FUNC))((NPParg), (NPPrintArg)) +typedef void (* NP_LOADDS NPP_PrintUPP)(NPP instance, NPPrint* platformPrint); +#define NewNPP_PrintProc(FUNC) \ + ((NPP_PrintUPP) (FUNC)) +#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \ + (*(FUNC))((NPParg), (NPPrintArg)) #endif /* NPP_HandleEvent */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_HandleEventUPP; enum { - uppNPP_HandleEventProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *))) - | RESULT_SIZE(SIZE_CODE(sizeof(int16))) -}; -#define NewNPP_HandleEventProc(FUNC) \ - (NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture()) -#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ - (int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr)) + uppNPP_HandleEventProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(int16))) +}; +#define NewNPP_HandleEventProc(FUNC) \ + (NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture()) +#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ + (int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr)) #else -typedef int16 (*NPP_HandleEventUPP)(NPP instance, void* event); -#define NewNPP_HandleEventProc(FUNC) \ - ((NPP_HandleEventUPP) (FUNC)) -#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ - (*(FUNC))((NPParg), (voidPtr)) +typedef int16 (* NP_LOADDS NPP_HandleEventUPP)(NPP instance, void* event); +#define NewNPP_HandleEventProc(FUNC) \ + ((NPP_HandleEventUPP) (FUNC)) +#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ + (*(FUNC))((NPParg), (voidPtr)) #endif /* NPP_URLNotify */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_URLNotifyUPP; enum { - uppNPP_URLNotifyProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) - | RESULT_SIZE(SIZE_CODE(SIZE_CODE(0))) -}; -#define NewNPP_URLNotifyProc(FUNC) \ - (NPP_URLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, GetCurrentArchitecture()) -#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + uppNPP_URLNotifyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(SIZE_CODE(0))) +}; +#define NewNPP_URLNotifyProc(FUNC) \ + (NPP_URLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, GetCurrentArchitecture()) +#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) #else -typedef void (*NPP_URLNotifyUPP)(NPP instance, const char* url, NPReason reason, void* notifyData); -#define NewNPP_URLNotifyProc(FUNC) \ - ((NPP_URLNotifyUPP) (FUNC)) -#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) +typedef void (* NP_LOADDS NPP_URLNotifyUPP)(NPP instance, const char* url, NPReason reason, void* notifyData); +#define NewNPP_URLNotifyProc(FUNC) \ + ((NPP_URLNotifyUPP) (FUNC)) +#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) #endif /* NPP_GetValue */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_GetValueUPP; enum { - uppNPP_GetValueProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + uppNPP_GetValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) }; -#define NewNPP_GetValueProc(FUNC) \ - (NPP_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_GetValueProcInfo, GetCurrentArchitecture()) +#define NewNPP_GetValueProc(FUNC) \ + (NPP_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_GetValueProcInfo, GetCurrentArchitecture()) #define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) #else -typedef NPError (*NPP_GetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); -#define NewNPP_GetValueProc(FUNC) \ - ((NPP_GetValueUPP) (FUNC)) -#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) +typedef NPError (* NP_LOADDS NPP_GetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); +#define NewNPP_GetValueProc(FUNC) \ + ((NPP_GetValueUPP) (FUNC)) +#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) #endif /* NPP_SetValue */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_SetValueUPP; enum { - uppNPP_SetValueProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + uppNPP_SetValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) }; -#define NewNPP_SetValueProc(FUNC) \ - (NPP_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetValueProcInfo, GetCurrentArchitecture()) +#define NewNPP_SetValueProc(FUNC) \ + (NPP_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetValueProcInfo, GetCurrentArchitecture()) #define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) #else -typedef NPError (*NPP_SetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); -#define NewNPP_SetValueProc(FUNC) \ - ((NPP_SetValueUPP) (FUNC)) -#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) +typedef NPError (* NP_LOADDS NPP_SetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); +#define NewNPP_SetValueProc(FUNC) \ + ((NPP_SetValueUPP) (FUNC)) +#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) #endif - - /* * Netscape entry points */ @@ -452,310 +495,310 @@ /* NPN_GetValue */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_GetValueUPP; enum { - uppNPN_GetValueProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + uppNPN_GetValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) }; -#define NewNPN_GetValueProc(FUNC) \ - (NPN_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetValueProcInfo, GetCurrentArchitecture()) +#define NewNPN_GetValueProc(FUNC) \ + (NPN_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetValueProcInfo, GetCurrentArchitecture()) #define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) #else -typedef NPError (*NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); -#define NewNPN_GetValueProc(FUNC) \ - ((NPN_GetValueUPP) (FUNC)) -#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) +typedef NPError (* NP_LOADDS NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); +#define NewNPN_GetValueProc(FUNC) \ + ((NPN_GetValueUPP) (FUNC)) +#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) #endif /* NPN_SetValue */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_SetValueUPP; enum { - uppNPN_SetValueProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + uppNPN_SetValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) }; -#define NewNPN_SetValueProc(FUNC) \ - (NPN_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetValueProcInfo, GetCurrentArchitecture()) +#define NewNPN_SetValueProc(FUNC) \ + (NPN_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetValueProcInfo, GetCurrentArchitecture()) #define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) #else -typedef NPError (*NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); -#define NewNPN_SetValueProc(FUNC) \ - ((NPN_SetValueUPP) (FUNC)) -#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) +typedef NPError (* NP_LOADDS NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); +#define NewNPN_SetValueProc(FUNC) \ + ((NPN_SetValueUPP) (FUNC)) +#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) #endif /* NPN_GetUrlNotify */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_GetURLNotifyUPP; enum { - uppNPN_GetURLNotifyProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + uppNPN_GetURLNotifyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) }; -#define NewNPN_GetURLNotifyProc(FUNC) \ - (NPN_GetURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, GetCurrentArchitecture()) +#define NewNPN_GetURLNotifyProc(FUNC) \ + (NPN_GetURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, GetCurrentArchitecture()) #define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) #else -typedef NPError (*NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); -#define NewNPN_GetURLNotifyProc(FUNC) \ - ((NPN_GetURLNotifyUPP) (FUNC)) -#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) +typedef NPError (* NP_LOADDS NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); +#define NewNPN_GetURLNotifyProc(FUNC) \ + ((NPN_GetURLNotifyUPP) (FUNC)) +#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) #endif /* NPN_PostUrlNotify */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_PostURLNotifyUPP; enum { - uppNPN_PostURLNotifyProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) - | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(void*))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + uppNPN_PostURLNotifyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) + | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) }; -#define NewNPN_PostURLNotifyProc(FUNC) \ - (NPN_PostURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, GetCurrentArchitecture()) +#define NewNPN_PostURLNotifyProc(FUNC) \ + (NPN_PostURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, GetCurrentArchitecture()) #define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) #else -typedef NPError (*NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData); -#define NewNPN_PostURLNotifyProc(FUNC) \ - ((NPN_PostURLNotifyUPP) (FUNC)) +typedef NPError (* NP_LOADDS NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData); +#define NewNPN_PostURLNotifyProc(FUNC) \ + ((NPN_PostURLNotifyUPP) (FUNC)) #define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) #endif /* NPN_GetUrl */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_GetURLUPP; enum { - uppNPN_GetURLProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + uppNPN_GetURLProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) }; -#define NewNPN_GetURLProc(FUNC) \ - (NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture()) +#define NewNPN_GetURLProc(FUNC) \ + (NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture()) #define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3)) + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3)) #else -typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window); -#define NewNPN_GetURLProc(FUNC) \ - ((NPN_GetURLUPP) (FUNC)) -#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) +typedef NPError (* NP_LOADDS NPN_GetURLUPP)(NPP instance, const char* url, const char* window); +#define NewNPN_GetURLProc(FUNC) \ + ((NPN_GetURLUPP) (FUNC)) +#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) #endif /* NPN_PostUrl */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_PostURLUPP; enum { - uppNPN_PostURLProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) + uppNPN_PostURLProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) }; -#define NewNPN_PostURLProc(FUNC) \ - (NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture()) +#define NewNPN_PostURLProc(FUNC) \ + (NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture()) #define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) #else -typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); -#define NewNPN_PostURLProc(FUNC) \ - ((NPN_PostURLUPP) (FUNC)) +typedef NPError (* NP_LOADDS NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); +#define NewNPN_PostURLProc(FUNC) \ + ((NPN_PostURLUPP) (FUNC)) #define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) #endif /* NPN_RequestRead */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_RequestReadUPP; enum { - uppNPN_RequestReadProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPN_RequestReadProc(FUNC) \ - (NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture()) -#define CallNPN_RequestReadProc(FUNC, stream, range) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range)) + uppNPN_RequestReadProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_RequestReadProc(FUNC) \ + (NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture()) +#define CallNPN_RequestReadProc(FUNC, stream, range) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range)) #else -typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); -#define NewNPN_RequestReadProc(FUNC) \ - ((NPN_RequestReadUPP) (FUNC)) -#define CallNPN_RequestReadProc(FUNC, stream, range) \ - (*(FUNC))((stream), (range)) +typedef NPError (* NP_LOADDS NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); +#define NewNPN_RequestReadProc(FUNC) \ + ((NPN_RequestReadUPP) (FUNC)) +#define CallNPN_RequestReadProc(FUNC, stream, range) \ + (*(FUNC))((stream), (range)) #endif /* NPN_NewStream */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_NewStreamUPP; enum { - uppNPN_NewStreamProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPStream **))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPN_NewStreamProc(FUNC) \ - (NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture()) -#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (window), (stream)) + uppNPN_NewStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPStream **))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_NewStreamProc(FUNC) \ + (NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture()) +#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (window), (stream)) #else -typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); -#define NewNPN_NewStreamProc(FUNC) \ - ((NPN_NewStreamUPP) (FUNC)) -#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ - (*(FUNC))((npp), (type), (window), (stream)) +typedef NPError (* NP_LOADDS NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); +#define NewNPN_NewStreamProc(FUNC) \ + ((NPN_NewStreamUPP) (FUNC)) +#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ + (*(FUNC))((npp), (type), (window), (stream)) #endif /* NPN_Write */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_WriteUPP; enum { - uppNPN_WriteProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) - | RESULT_SIZE(SIZE_CODE(sizeof(int32))) -}; -#define NewNPN_WriteProc(FUNC) \ - (NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture()) -#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ - (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer)) + uppNPN_WriteProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +}; +#define NewNPN_WriteProc(FUNC) \ + (NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture()) +#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ + (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer)) #else -typedef int32 (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer); -#define NewNPN_WriteProc(FUNC) \ - ((NPN_WriteUPP) (FUNC)) -#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ - (*(FUNC))((npp), (stream), (len), (buffer)) +typedef int32 (* NP_LOADDS NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer); +#define NewNPN_WriteProc(FUNC) \ + ((NPN_WriteUPP) (FUNC)) +#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ + (*(FUNC))((npp), (stream), (len), (buffer)) #endif /* NPN_DestroyStream */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_DestroyStreamUPP; enum { - uppNPN_DestroyStreamProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPN_DestroyStreamProc(FUNC) \ - (NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture()) -#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (reason)) + uppNPN_DestroyStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_DestroyStreamProc(FUNC) \ + (NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture()) +#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (reason)) #else -typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); -#define NewNPN_DestroyStreamProc(FUNC) \ - ((NPN_DestroyStreamUPP) (FUNC)) -#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ - (*(FUNC))((npp), (stream), (reason)) +typedef NPError (* NP_LOADDS NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); +#define NewNPN_DestroyStreamProc(FUNC) \ + ((NPN_DestroyStreamUPP) (FUNC)) +#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ + (*(FUNC))((npp), (stream), (reason)) #endif /* NPN_Status */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_StatusUPP; enum { - uppNPN_StatusProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) + uppNPN_StatusProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) }; -#define NewNPN_StatusProc(FUNC) \ - (NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture()) -#define CallNPN_StatusProc(FUNC, npp, msg) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg)) +#define NewNPN_StatusProc(FUNC) \ + (NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture()) +#define CallNPN_StatusProc(FUNC, npp, msg) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg)) #else -typedef void (*NPN_StatusUPP)(NPP instance, const char* message); -#define NewNPN_StatusProc(FUNC) \ - ((NPN_StatusUPP) (FUNC)) -#define CallNPN_StatusProc(FUNC, npp, msg) \ - (*(FUNC))((npp), (msg)) +typedef void (* NP_LOADDS NPN_StatusUPP)(NPP instance, const char* message); +#define NewNPN_StatusProc(FUNC) \ + ((NPN_StatusUPP) (FUNC)) +#define CallNPN_StatusProc(FUNC, npp, msg) \ + (*(FUNC))((npp), (msg)) #endif /* NPN_UserAgent */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_UserAgentUPP; enum { @@ -771,7 +814,7 @@ #else -typedef const char* (*NPN_UserAgentUPP)(NPP instance); +typedef const char* (* NP_LOADDS NPN_UserAgentUPP)(NPP instance); #define NewNPN_UserAgentProc(FUNC) \ ((NPN_UserAgentUPP) (FUNC)) #define CallNPN_UserAgentProc(FUNC, ARG1) \ @@ -781,80 +824,80 @@ /* NPN_MemAlloc */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_MemAllocUPP; enum { - uppNPN_MemAllocProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) - | RESULT_SIZE(SIZE_CODE(sizeof(void *))) + uppNPN_MemAllocProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) + | RESULT_SIZE(SIZE_CODE(sizeof(void *))) }; -#define NewNPN_MemAllocProc(FUNC) \ - (NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture()) -#define CallNPN_MemAllocProc(FUNC, ARG1) \ - (void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1)) +#define NewNPN_MemAllocProc(FUNC) \ + (NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture()) +#define CallNPN_MemAllocProc(FUNC, ARG1) \ + (void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1)) #else -typedef void* (*NPN_MemAllocUPP)(uint32 size); -#define NewNPN_MemAllocProc(FUNC) \ - ((NPN_MemAllocUPP) (FUNC)) -#define CallNPN_MemAllocProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) +typedef void* (* NP_LOADDS NPN_MemAllocUPP)(uint32 size); +#define NewNPN_MemAllocProc(FUNC) \ + ((NPN_MemAllocUPP) (FUNC)) +#define CallNPN_MemAllocProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) #endif /* NPN__MemFree */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_MemFreeUPP; enum { - uppNPN_MemFreeProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *))) + uppNPN_MemFreeProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *))) }; -#define NewNPN_MemFreeProc(FUNC) \ - (NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture()) -#define CallNPN_MemFreeProc(FUNC, ARG1) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1)) +#define NewNPN_MemFreeProc(FUNC) \ + (NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture()) +#define CallNPN_MemFreeProc(FUNC, ARG1) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1)) #else -typedef void (*NPN_MemFreeUPP)(void* ptr); -#define NewNPN_MemFreeProc(FUNC) \ - ((NPN_MemFreeUPP) (FUNC)) -#define CallNPN_MemFreeProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) +typedef void (* NP_LOADDS NPN_MemFreeUPP)(void* ptr); +#define NewNPN_MemFreeProc(FUNC) \ + ((NPN_MemFreeUPP) (FUNC)) +#define CallNPN_MemFreeProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) #endif /* NPN_MemFlush */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_MemFlushUPP; enum { - uppNPN_MemFlushProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) - | RESULT_SIZE(SIZE_CODE(sizeof(uint32))) + uppNPN_MemFlushProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) + | RESULT_SIZE(SIZE_CODE(sizeof(uint32))) }; -#define NewNPN_MemFlushProc(FUNC) \ - (NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture()) -#define CallNPN_MemFlushProc(FUNC, ARG1) \ - (uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1)) +#define NewNPN_MemFlushProc(FUNC) \ + (NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture()) +#define CallNPN_MemFlushProc(FUNC, ARG1) \ + (uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1)) #else -typedef uint32 (*NPN_MemFlushUPP)(uint32 size); -#define NewNPN_MemFlushProc(FUNC) \ - ((NPN_MemFlushUPP) (FUNC)) -#define CallNPN_MemFlushProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) +typedef uint32 (* NP_LOADDS NPN_MemFlushUPP)(uint32 size); +#define NewNPN_MemFlushProc(FUNC) \ + ((NPN_MemFlushUPP) (FUNC)) +#define CallNPN_MemFlushProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) #endif @@ -862,172 +905,749 @@ /* NPN_ReloadPlugins */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_ReloadPluginsUPP; enum { - uppNPN_ReloadPluginsProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool))) - | RESULT_SIZE(SIZE_CODE(0)) + uppNPN_ReloadPluginsProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool))) + | RESULT_SIZE(SIZE_CODE(0)) }; -#define NewNPN_ReloadPluginsProc(FUNC) \ - (NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture()) -#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1)) +#define NewNPN_ReloadPluginsProc(FUNC) \ + (NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture()) +#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1)) #else -typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages); -#define NewNPN_ReloadPluginsProc(FUNC) \ - ((NPN_ReloadPluginsUPP) (FUNC)) -#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) +typedef void (* NP_LOADDS NPN_ReloadPluginsUPP)(NPBool reloadPages); +#define NewNPN_ReloadPluginsProc(FUNC) \ + ((NPN_ReloadPluginsUPP) (FUNC)) +#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) #endif - /* NPN_GetJavaEnv */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_GetJavaEnvUPP; enum { - uppNPN_GetJavaEnvProcInfo = kThinkCStackBased - | RESULT_SIZE(SIZE_CODE(sizeof(JRIEnv*))) + uppNPN_GetJavaEnvProcInfo = kThinkCStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(JRIEnv*))) }; -#define NewNPN_GetJavaEnvProc(FUNC) \ - (NPN_GetJavaEnvUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo, GetCurrentArchitecture()) -#define CallNPN_GetJavaEnvProc(FUNC) \ - (JRIEnv*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo) +#define NewNPN_GetJavaEnvProc(FUNC) \ + (NPN_GetJavaEnvUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetJavaEnvProc(FUNC) \ + (JRIEnv*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo) #else - -typedef JRIEnv* (*NPN_GetJavaEnvUPP)(void); -#define NewNPN_GetJavaEnvProc(FUNC) \ - ((NPN_GetJavaEnvUPP) (FUNC)) -#define CallNPN_GetJavaEnvProc(FUNC) \ - (*(FUNC))() +typedef JRIEnv* (* NP_LOADDS NPN_GetJavaEnvUPP)(void); +#define NewNPN_GetJavaEnvProc(FUNC) \ + ((NPN_GetJavaEnvUPP) (FUNC)) +#define CallNPN_GetJavaEnvProc(FUNC) \ + (*(FUNC))() #endif /* NPN_GetJavaPeer */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_GetJavaPeerUPP; enum { - uppNPN_GetJavaPeerProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | RESULT_SIZE(SIZE_CODE(sizeof(jref))) + uppNPN_GetJavaPeerProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | RESULT_SIZE(SIZE_CODE(sizeof(jref))) }; -#define NewNPN_GetJavaPeerProc(FUNC) \ - (NPN_GetJavaPeerUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, GetCurrentArchitecture()) -#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ - (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, (ARG1)) +#define NewNPN_GetJavaPeerProc(FUNC) \ + (NPN_GetJavaPeerUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, (ARG1)) #else -typedef jref (*NPN_GetJavaPeerUPP)(NPP instance); -#define NewNPN_GetJavaPeerProc(FUNC) \ - ((NPN_GetJavaPeerUPP) (FUNC)) -#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) +typedef jref (* NP_LOADDS NPN_GetJavaPeerUPP)(NPP instance); +#define NewNPN_GetJavaPeerProc(FUNC) \ + ((NPN_GetJavaPeerUPP) (FUNC)) +#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) #endif - /* NPN_InvalidateRect */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_InvalidateRectUPP; enum { - uppNPN_InvalidateRectProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRect *))) - | RESULT_SIZE(SIZE_CODE(0)) + uppNPN_InvalidateRectProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRect *))) + | RESULT_SIZE(SIZE_CODE(0)) }; -#define NewNPN_InvalidateRectProc(FUNC) \ - (NPN_InvalidateRectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, GetCurrentArchitecture()) -#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, (ARG1), (ARG2)) +#define NewNPN_InvalidateRectProc(FUNC) \ + (NPN_InvalidateRectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, GetCurrentArchitecture()) +#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, (ARG1), (ARG2)) #else -typedef void (*NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); -#define NewNPN_InvalidateRectProc(FUNC) \ - ((NPN_InvalidateRectUPP) (FUNC)) -#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) +typedef void (* NP_LOADDS NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); +#define NewNPN_InvalidateRectProc(FUNC) \ + ((NPN_InvalidateRectUPP) (FUNC)) +#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) #endif /* NPN_InvalidateRegion */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_InvalidateRegionUPP; enum { - uppNPN_InvalidateRegionProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRegion))) - | RESULT_SIZE(SIZE_CODE(0)) + uppNPN_InvalidateRegionProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRegion))) + | RESULT_SIZE(SIZE_CODE(0)) }; -#define NewNPN_InvalidateRegionProc(FUNC) \ - (NPN_InvalidateRegionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, GetCurrentArchitecture()) -#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, (ARG1), (ARG2)) +#define NewNPN_InvalidateRegionProc(FUNC) \ + (NPN_InvalidateRegionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, GetCurrentArchitecture()) +#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, (ARG1), (ARG2)) #else -typedef void (*NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); -#define NewNPN_InvalidateRegionProc(FUNC) \ - ((NPN_InvalidateRegionUPP) (FUNC)) -#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) +typedef void (* NP_LOADDS NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); +#define NewNPN_InvalidateRegionProc(FUNC) \ + ((NPN_InvalidateRegionUPP) (FUNC)) +#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) #endif /* NPN_ForceRedraw */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPN_ForceRedrawUPP; enum { - uppNPN_ForceRedrawProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | RESULT_SIZE(SIZE_CODE(sizeof(0))) + uppNPN_ForceRedrawProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | RESULT_SIZE(SIZE_CODE(sizeof(0))) +}; + +#define NewNPN_ForceRedrawProc(FUNC) \ + (NPN_ForceRedrawUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, GetCurrentArchitecture()) +#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, (ARG1)) + +#else + +typedef void (* NP_LOADDS NPN_ForceRedrawUPP)(NPP instance); +#define NewNPN_ForceRedrawProc(FUNC) \ + ((NPN_ForceRedrawUPP) (FUNC)) +#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_GetStringIdentifier */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetStringIdentifierUPP; +enum { + uppNPN_GetStringIdentifierProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const NPUTF8*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPIdentifier))) +}; + +#define NewNPN_GetStringIdentifierProc(FUNC) \ + (NPN_GetStringIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetStringIdentifierProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetStringIdentifierProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetStringIdentifierProcInfo, (ARG1)) + +#else + +typedef NPIdentifier (* NP_LOADDS NPN_GetStringIdentifierUPP)(const NPUTF8* name); +#define NewNPN_GetStringIdentifierProc(FUNC) \ + ((NPN_GetStringIdentifierUPP) (FUNC)) +#define CallNPN_GetStringIdentifierProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_GetStringIdentifiers */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetStringIdentifiersUPP; +enum { + uppNPN_GetStringIdentifiersProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const NPUTF8**))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(int32_t))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier*))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_GetStringIdentifiersProc(FUNC) \ + (NPN_GetStringIdentifiersUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetStringIdentifiersProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetStringIdentifiersProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef void (* NP_LOADDS NPN_GetStringIdentifiersUPP)(const NPUTF8** names, + int32_t nameCount, + NPIdentifier* identifiers); +#define NewNPN_GetStringIdentifiersProc(FUNC) \ + ((NPN_GetStringIdentifiersUPP) (FUNC)) +#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) + +#endif + +/* NPN_GetIntIdentifier */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetIntIdentifierUPP; +enum { + uppNPN_GetIntIdentifierProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(int32_t))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPIdentifier))) +}; + +#define NewNPN_GetIntIdentifierProc(FUNC) \ + (NPN_GetIntIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetIntIdentifierProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetIntIdentifierProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetIntIdentifierProcInfo, (ARG1)) + +#else + +typedef NPIdentifier (* NP_LOADDS NPN_GetIntIdentifierUPP)(int32_t intid); +#define NewNPN_GetIntIdentifierProc(FUNC) \ + ((NPN_GetIntIdentifierUPP) (FUNC)) +#define CallNPN_GetIntIdentifierProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_IdentifierIsString */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_IdentifierIsStringUPP; +enum { + uppNPN_IdentifierIsStringProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier identifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_IdentifierIsStringProc(FUNC) \ + (NPN_IdentifierIsStringUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_IdentifierIsStringProcInfo, GetCurrentArchitecture()) +#define CallNPN_IdentifierIsStringProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_IdentifierIsStringProcInfo, (ARG1)) + +#else + +typedef bool (* NP_LOADDS NPN_IdentifierIsStringUPP)(NPIdentifier identifier); +#define NewNPN_IdentifierIsStringProc(FUNC) \ + ((NPN_IdentifierIsStringUPP) (FUNC)) +#define CallNPN_IdentifierIsStringProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_UTF8FromIdentifier */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_UTF8FromIdentifierUPP; +enum { + uppNPN_UTF8FromIdentifierProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPUTF8*))) +}; + +#define NewNPN_UTF8FromIdentifierProc(FUNC) \ + (NPN_UTF8FromIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UTF8FromIdentifierProcInfo, GetCurrentArchitecture()) +#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UTF8FromIdentifierProcInfo, (ARG1)) + +#else + +typedef NPUTF8* (* NP_LOADDS NPN_UTF8FromIdentifierUPP)(NPIdentifier identifier); +#define NewNPN_UTF8FromIdentifierProc(FUNC) \ + ((NPN_UTF8FromIdentifierUPP) (FUNC)) +#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_IntFromIdentifier */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_IntFromIdentifierUPP; +enum { + uppNPN_IntFromIdentifierProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32_t))) +}; + +#define NewNPN_IntFromIdentifierProc(FUNC) \ + (NPN_IntFromIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_IntFromIdentifierProcInfo, GetCurrentArchitecture()) +#define CallNPN_IntFromIdentifierProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_IntFromIdentifierProcInfo, (ARG1)) + +#else + +typedef int32_t (* NP_LOADDS NPN_IntFromIdentifierUPP)(NPIdentifier identifier); +#define NewNPN_IntFromIdentifierProc(FUNC) \ + ((NPN_IntFromIdentifierUPP) (FUNC)) +#define CallNPN_IntFromIdentifierProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_CreateObject */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_CreateObjectUPP; +enum { + uppNPN_CreateObjectProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPClass*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPObject*))) +}; + +#define NewNPN_CreateObjectProc(FUNC) \ + (NPN_CreateObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_CreateObjectProcInfo, GetCurrentArchitecture()) +#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_CreateObjectProcInfo, (ARG1), (ARG2)) + +#else + +typedef NPObject* (* NP_LOADDS NPN_CreateObjectUPP)(NPP npp, NPClass *aClass); +#define NewNPN_CreateObjectProc(FUNC) \ + ((NPN_CreateObjectUPP) (FUNC)) +#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + +/* NPN_RetainObject */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_RetainObjectUPP; +enum { + uppNPN_RetainObjectProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPObject*))) +}; + +#define NewNPN_RetainObjectProc(FUNC) \ + (NPN_RetainObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RetainObjectProcInfo, GetCurrentArchitecture()) +#define CallNPN_RetainObjectProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RetainObjectProcInfo, (ARG1)) + +#else + +typedef NPObject* (* NP_LOADDS NPN_RetainObjectUPP)(NPObject *obj); +#define NewNPN_RetainObjectProc(FUNC) \ + ((NPN_RetainObjectUPP) (FUNC)) +#define CallNPN_RetainObjectProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_ReleaseObject */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_ReleaseObjectUPP; +enum { + uppNPN_ReleaseObjectProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_ReleaseObjectProc(FUNC) \ + (NPN_ReleaseObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReleaseObjectProcInfo, GetCurrentArchitecture()) +#define CallNPN_ReleaseObjectProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReleaseObjectProcInfo, (ARG1)) + +#else + +typedef void (* NP_LOADDS NPN_ReleaseObjectUPP)(NPObject *obj); +#define NewNPN_ReleaseObjectProc(FUNC) \ + ((NPN_ReleaseObjectUPP) (FUNC)) +#define CallNPN_ReleaseObjectProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_Invoke */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_InvokeUPP; +enum { + uppNPN_InvokeProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint32_t))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_InvokeProc(FUNC) \ + (NPN_InvokeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvokeProcInfo, GetCurrentArchitecture()) +#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvokeProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) + +#else + +typedef bool (* NP_LOADDS NPN_InvokeUPP)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); +#define NewNPN_InvokeProc(FUNC) \ + ((NPN_InvokeUPP) (FUNC)) +#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) + +#endif + +/* NPN_InvokeDefault */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_InvokeDefaultUPP; +enum { + uppNPN_InvokeDefaultProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint32_t))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) }; -#define NewNPN_ForceRedrawProc(FUNC) \ - (NPN_ForceRedrawUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, GetCurrentArchitecture()) -#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ - (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, (ARG1)) +#define NewNPN_InvokeDefaultProc(FUNC) \ + (NPN_InvokeDefaultUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvokeDefaultProcInfo, GetCurrentArchitecture()) +#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvokeDefaultProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) #else -typedef void (*NPN_ForceRedrawUPP)(NPP instance); -#define NewNPN_ForceRedrawProc(FUNC) \ - ((NPN_ForceRedrawUPP) (FUNC)) -#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) +typedef bool (* NP_LOADDS NPN_InvokeDefaultUPP)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); +#define NewNPN_InvokeDefaultProc(FUNC) \ + ((NPN_InvokeDefaultUPP) (FUNC)) +#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) #endif +/* NPN_Evaluate */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_EvaluateUPP; +enum { + uppNPN_EvaluateProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPString*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_EvaluateProc(FUNC) \ + (NPN_EvaluateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_EvaluateProcInfo, GetCurrentArchitecture()) +#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_EvaluateProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + +#else + +typedef bool (* NP_LOADDS NPN_EvaluateUPP)(NPP npp, NPObject *obj, NPString *script, NPVariant *result); +#define NewNPN_EvaluateProc(FUNC) \ + ((NPN_EvaluateUPP) (FUNC)) +#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) + +#endif + +/* NPN_GetProperty */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetPropertyUPP; +enum { + uppNPN_GetPropertyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_GetPropertyProc(FUNC) \ + (NPN_GetPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetPropertyProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetPropertyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + +#else + +typedef bool (* NP_LOADDS NPN_GetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result); +#define NewNPN_GetPropertyProc(FUNC) \ + ((NPN_GetPropertyUPP) (FUNC)) +#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) + +#endif + +/* NPN_SetProperty */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_SetPropertyUPP; +enum { + uppNPN_SetPropertyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_SetPropertyProc(FUNC) \ + (NPN_SetPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetPropertyProcInfo, GetCurrentArchitecture()) +#define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetPropertyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + +#else + +typedef bool (* NP_LOADDS NPN_SetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value); +#define NewNPN_SetPropertyProc(FUNC) \ + ((NPN_SetPropertyUPP) (FUNC)) +#define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) + +#endif + +/* NPN_RemoveProperty */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_RemovePropertyUPP; +enum { + uppNPN_RemovePropertyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_RemovePropertyProc(FUNC) \ + (NPN_RemovePropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RemovePropertyProcInfo, GetCurrentArchitecture()) +#define CallNPN_RemovePropertyProc(FUNC, ARG1, ARG2, ARG3) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RemovePropertyProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef bool (* NP_LOADDS NPN_RemovePropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); +#define NewNPN_RemovePropertyProc(FUNC) \ + ((NPN_RemovePropertyUPP) (FUNC)) +#define CallNPN_RemovePropertyProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) + +#endif + +/* NPN_HasProperty */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_HasPropertyUPP; +enum { + uppNPN_HasPropertyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_HasPropertyProc(FUNC) \ + (NPN_HasPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_HasPropertyProcInfo, GetCurrentArchitecture()) +#define CallNPN_HasPropertyProc(FUNC, ARG1, ARG2, ARG3) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_HasPropertyProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef bool (* NP_LOADDS NPN_HasPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); +#define NewNPN_HasPropertyProc(FUNC) \ + ((NPN_HasPropertyUPP) (FUNC)) +#define CallNPN_HasPropertyProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) + +#endif + +/* NPN_HasMethod */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_HasMethodUPP; +enum { + uppNPN_HasMethodProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_HasMethodProc(FUNC) \ + (NPN_HasMethodUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_HasMethodProcInfo, GetCurrentArchitecture()) +#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_HasMethodProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef bool (* NP_LOADDS NPN_HasMethodUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); +#define NewNPN_HasMethodProc(FUNC) \ + ((NPN_HasMethodUPP) (FUNC)) +#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) + +#endif + +/* NPN_ReleaseVariantValue */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_ReleaseVariantValue; +enum { + uppNPN_ReleaseVariantValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_ReleaseVariantValueProc(FUNC) \ + (NPN_ReleaseVariantValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReleaseVariantValueProcInfo, GetCurrentArchitecture()) +#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReleaseVariantValueProcInfo, (ARG1)) + +#else + +typedef void (* NP_LOADDS NPN_ReleaseVariantValueUPP)(NPVariant *variant); +#define NewNPN_ReleaseVariantValueProc(FUNC) \ + ((NPN_ReleaseVariantValueUPP) (FUNC)) +#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_SetException */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_SetExceptionUPP; +enum { + uppNPN_SetExceptionProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const NPUTF8*))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_SetExceptionProc(FUNC) \ + (NPN_SetExceptionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetExceptionProcInfo, GetCurrentArchitecture()) +#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetExceptionProcInfo, (ARG1), (ARG2)) + +#else + +typedef void (* NP_LOADDS NPN_SetExceptionUPP)(NPObject *obj, const NPUTF8 *message); +#define NewNPN_SetExceptionProc(FUNC) \ + ((NPN_SetExceptionUPP) (FUNC)) +#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + +/* NPN_PushPopupsEnabledStateUPP */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_PushPopupsEnabledStateUPP; +enum { + uppNPN_PushPopupsEnabledStateProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPBool))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_PushPopupsEnabledStateProc(FUNC) \ + (NPN_PushPopupsEnabledStateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PushPopupsEnabledStateProcInfo, GetCurrentArchitecture()) +#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PushPopupsEnabledStateProcInfo, (ARG1), (ARG2)) + +#else + +typedef bool (* NP_LOADDS NPN_PushPopupsEnabledStateUPP)(NPP npp, NPBool enabled); +#define NewNPN_PushPopupsEnabledStateProc(FUNC) \ + ((NPN_PushPopupsEnabledStateUPP) (FUNC)) +#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + +/* NPN_PopPopupsEnabledState */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_PopPopupsEnabledStateUPP; +enum { + uppNPN_PopPopupsEnabledStateProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_PopPopupsEnabledStateProc(FUNC) \ + (NPN_PopPopupsEnabledStateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PopPopupsEnabledStateProcInfo, GetCurrentArchitecture()) +#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PopPopupsEnabledStateProcInfo, (ARG1)) + +#else + +typedef bool (* NP_LOADDS NPN_PopPopupsEnabledStateUPP)(NPP npp); +#define NewNPN_PopPopupsEnabledStateProc(FUNC) \ + ((NPN_PopPopupsEnabledStateUPP) (FUNC)) +#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + /****************************************************************************************** * The actual plugin function table definitions *******************************************************************************************/ #ifdef XP_MAC -#pragma align=mac68k +#if PRAGMA_STRUCT_ALIGN +#pragma options align=mac68k +#endif #endif typedef struct _NPPluginFuncs { @@ -1073,14 +1693,37 @@ NPN_InvalidateRectUPP invalidaterect; NPN_InvalidateRegionUPP invalidateregion; NPN_ForceRedrawUPP forceredraw; + NPN_GetStringIdentifierUPP getstringidentifier; + NPN_GetStringIdentifiersUPP getstringidentifiers; + NPN_GetIntIdentifierUPP getintidentifier; + NPN_IdentifierIsStringUPP identifierisstring; + NPN_UTF8FromIdentifierUPP utf8fromidentifier; + NPN_IntFromIdentifierUPP intfromidentifier; + NPN_CreateObjectUPP createobject; + NPN_RetainObjectUPP retainobject; + NPN_ReleaseObjectUPP releaseobject; + NPN_InvokeUPP invoke; + NPN_InvokeDefaultUPP invokeDefault; + NPN_EvaluateUPP evaluate; + NPN_GetPropertyUPP getproperty; + NPN_SetPropertyUPP setproperty; + NPN_RemovePropertyUPP removeproperty; + NPN_HasPropertyUPP hasproperty; + NPN_HasMethodUPP hasmethod; + NPN_ReleaseVariantValueUPP releasevariantvalue; + NPN_SetExceptionUPP setexception; + NPN_PushPopupsEnabledStateUPP pushpopupsenabledstate; + NPN_PopPopupsEnabledStateUPP poppopupsenabledstate; } NPNetscapeFuncs; #ifdef XP_MAC -#pragma align=reset +#if PRAGMA_STRUCT_ALIGN +#pragma options align=reset +#endif #endif -#ifdef XP_MAC +#if defined(XP_MAC) || defined(XP_MACOSX) /****************************************************************************************** * Mac platform-specific plugin glue stuff *******************************************************************************************/ @@ -1092,52 +1735,137 @@ * and NPPShutdownUPP for Netscape's use. */ -#if GENERATINGCFM +#if _NPUPP_USE_UPP_ typedef UniversalProcPtr NPP_MainEntryUPP; enum { - uppNPP_MainEntryProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_MainEntryProc(FUNC) \ - (NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture()) -#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ - CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP)) + uppNPP_MainEntryProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_MainEntryProc(FUNC) \ + (NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture()) +#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ + CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP)) #else -typedef NPError (*NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); -#define NewNPP_MainEntryProc(FUNC) \ - ((NPP_MainEntryUPP) (FUNC)) -#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ - (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) +typedef NPError (* NP_LOADDS NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); +#define NewNPP_MainEntryProc(FUNC) \ + ((NPP_MainEntryUPP) (FUNC)) +#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ + (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) + +#endif + + +/* + * Mac version(s) of NP_GetMIMEDescription(const char *) + * These can be called to retreive MIME information from the plugin dynamically + * + * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way + * to get mime info from the plugin only on OSX and may not be supported + * in furture version--use NP_GetMIMEDescription instead + */ + +enum +{ + kBPSupportedMIMETypesStructVers_1 = 1 +}; + +typedef struct _BPSupportedMIMETypes +{ + SInt32 structVersion; /* struct version */ + Handle typeStrings; /* STR# formated handle, allocated by plug-in */ + Handle infoStrings; /* STR# formated handle, allocated by plug-in */ +} BPSupportedMIMETypes; +OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); + +#if _NPUPP_USE_UPP_ + +#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescriptionRD" +typedef UniversalProcPtr NP_GetMIMEDescriptionUPP; +enum { + uppNP_GetMIMEDescEntryProc = kThinkCStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(const char *))) +}; +#define NewNP_GetMIMEDescEntryProc(FUNC) \ + (NP_GetMIMEDescriptionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNP_GetMIMEDescEntryProc, GetCurrentArchitecture()) +#define CallNP_GetMIMEDescEntryProc(FUNC) \ + (const char *)CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNP_GetMIMEDescEntryProc) + + +#else /* !_NPUPP_USE_UPP_ */ + + /* NP_GetMIMEDescription */ +#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" +typedef const char* (* NP_LOADDS NP_GetMIMEDescriptionUPP)(); +#define NewNP_GetMIMEDescEntryProc(FUNC) \ + ((NP_GetMIMEDescriptionUPP) (FUNC)) +#define CallNP_GetMIMEDescEntryProc(FUNC) \ + (*(FUNC))() +/* BP_GetSupportedMIMETypes */ +typedef OSErr (* NP_LOADDS BP_GetSupportedMIMETypesUPP)(BPSupportedMIMETypes*, UInt32); +#define NewBP_GetSupportedMIMETypesEntryProc(FUNC) \ + ((BP_GetSupportedMIMETypesUPP) (FUNC)) +#define CallBP_GetMIMEDescEntryProc(FUNC, mimeInfo, flags) \ + (*(FUNC))((mimeInfo), (flags)) #endif #endif /* MAC */ +#if defined(_WINDOWS) +#define OSCALL WINAPI +#else +#if defined(__OS2__) +#define OSCALL _System +#else +#define OSCALL +#endif +#endif -#ifdef _WINDOWS +#if defined( _WINDOWS ) || defined (__OS2__) #ifdef __cplusplus extern "C" { #endif /* plugin meta member functions */ +#if defined(__OS2__) + +typedef struct _NPPluginData { /* Alternate OS2 Plugin interface */ + char *pMimeTypes; + char *pFileExtents; + char *pFileOpenTemplate; + char *pProductName; + char *pProductDescription; + unsigned long dwProductVersionMS; + unsigned long dwProductVersionLS; +} NPPluginData; + +NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData); + +#endif + +NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs); -NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs); +NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs); -NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs); +NPError OSCALL NP_Shutdown(); -NPError WINAPI NP_Shutdown(); +char* NP_GetMIMEDescription(); #ifdef __cplusplus } #endif -#endif /* _WINDOWS */ +#endif /* _WINDOWS || __OS2__ */ + +#if defined(__OS2__) +#pragma pack() +#endif #ifdef XP_UNIX @@ -1147,9 +1875,10 @@ /* plugin meta member functions */ -char* NP_GetMIMEDescription(void); -NPError NP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*); -NPError NP_Shutdown(void); +char* NP_GetMIMEDescription(void); +NPError NP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*); +NPError NP_Shutdown(void); +NPError NP_GetValue(void *future, NPPVariable aVariable, void *aValue); #ifdef __cplusplus } diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/obsolete/protypes.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/obsolete/protypes.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/obsolete/protypes.h 1970-01-01 00:00:00.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/obsolete/protypes.h 2008-01-29 23:56:53.000000000 +0000 @@ -0,0 +1,251 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is the Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998-2000 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +/* + * This header typedefs the old 'native' types to the new PRs. + * These definitions are scheduled to be eliminated at the earliest + * possible time. The NSPR API is implemented and documented using + * the new definitions. + */ + +#if !defined(PROTYPES_H) +#define PROTYPES_H + +typedef PRUintn uintn; +#ifndef _XP_Core_ +typedef PRIntn intn; +#endif + +/* + * It is trickier to define uint, int8, uint8, int16, uint16, + * int32, uint32, int64, and uint64 because some of these int + * types are defined by standard header files on some platforms. + * Our strategy here is to include all such standard headers + * first, and then define these int types only if they are not + * defined by those standard headers. + */ + +/* + * BeOS defines all the int types below in its standard header + * file SupportDefs.h. + */ +#ifdef XP_BEOS +#include +#endif + +/* + * OpenVMS defines all the int types below in its standard + * header files ints.h and types.h. + */ +#ifdef VMS +#include +#include +#endif + +/* + * SVR4 typedef of uint is commonly found on UNIX machines. + * + * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h) + * defines the types int8, int16, int32, and int64. + */ +#ifdef XP_UNIX +#include +#endif + +/* model.h on HP-UX defines int8, int16, and int32. */ +#ifdef HPUX +#include +#endif + +/* + * uint + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(XP_UNIX) || defined(NTO) +typedef PRUintn uint; +#endif + +/* + * uint64 + */ + +#if !defined(XP_BEOS) && !defined(VMS) +typedef PRUint64 uint64; +#endif + +/* + * uint32 + */ + +#if !defined(XP_BEOS) && !defined(VMS) +#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) +typedef PRUint32 uint32; +#else +typedef unsigned long uint32; +#endif +#endif + +/* + * uint16 + */ + +#if !defined(XP_BEOS) && !defined(VMS) +typedef PRUint16 uint16; +#endif + +/* + * uint8 + */ + +#if !defined(XP_BEOS) && !defined(VMS) +typedef PRUint8 uint8; +#endif + +/* + * int64 + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) +typedef PRInt64 int64; +#endif + +/* + * int32 + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ + && !defined(HPUX) +#if !defined(WIN32) || !defined(_WINSOCK2API_) /* defines its own "int32" */ +#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) +typedef PRInt32 int32; +#else +typedef long int32; +#endif +#endif +#endif + +/* + * int16 + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ + && !defined(HPUX) +typedef PRInt16 int16; +#endif + +/* + * int8 + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ + && !defined(HPUX) +typedef PRInt8 int8; +#endif + +typedef PRFloat64 float64; +typedef PRUptrdiff uptrdiff_t; +typedef PRUword uprword_t; +typedef PRWord prword_t; + + +/* Re: prbit.h */ +#define TEST_BIT PR_TEST_BIT +#define SET_BIT PR_SET_BIT +#define CLEAR_BIT PR_CLEAR_BIT + +/* Re: prarena.h->plarena.h */ +#define PRArena PLArena +#define PRArenaPool PLArenaPool +#define PRArenaStats PLArenaStats +#define PR_ARENA_ALIGN PL_ARENA_ALIGN +#define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL +#define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE +#define PR_ARENA_GROW PL_ARENA_GROW +#define PR_ARENA_MARK PL_ARENA_MARK +#define PR_CLEAR_UNUSED PL_CLEAR_UNUSED +#define PR_CLEAR_ARENA PL_CLEAR_ARENA +#define PR_ARENA_RELEASE PL_ARENA_RELEASE +#define PR_COUNT_ARENA PL_COUNT_ARENA +#define PR_ARENA_DESTROY PL_ARENA_DESTROY +#define PR_InitArenaPool PL_InitArenaPool +#define PR_FreeArenaPool PL_FreeArenaPool +#define PR_FinishArenaPool PL_FinishArenaPool +#define PR_CompactArenaPool PL_CompactArenaPool +#define PR_ArenaFinish PL_ArenaFinish +#define PR_ArenaAllocate PL_ArenaAllocate +#define PR_ArenaGrow PL_ArenaGrow +#define PR_ArenaRelease PL_ArenaRelease +#define PR_ArenaCountAllocation PL_ArenaCountAllocation +#define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth +#define PR_ArenaCountGrowth PL_ArenaCountGrowth +#define PR_ArenaCountRelease PL_ArenaCountRelease +#define PR_ArenaCountRetract PL_ArenaCountRetract + +/* Re: prhash.h->plhash.h */ +#define PRHashEntry PLHashEntry +#define PRHashTable PLHashTable +#define PRHashNumber PLHashNumber +#define PRHashFunction PLHashFunction +#define PRHashComparator PLHashComparator +#define PRHashEnumerator PLHashEnumerator +#define PRHashAllocOps PLHashAllocOps +#define PR_NewHashTable PL_NewHashTable +#define PR_HashTableDestroy PL_HashTableDestroy +#define PR_HashTableRawLookup PL_HashTableRawLookup +#define PR_HashTableRawAdd PL_HashTableRawAdd +#define PR_HashTableRawRemove PL_HashTableRawRemove +#define PR_HashTableAdd PL_HashTableAdd +#define PR_HashTableRemove PL_HashTableRemove +#define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries +#define PR_HashTableLookup PL_HashTableLookup +#define PR_HashTableDump PL_HashTableDump +#define PR_HashString PL_HashString +#define PR_CompareStrings PL_CompareStrings +#define PR_CompareValues PL_CompareValues + +#if defined(XP_MAC) +#ifndef TRUE /* Mac standard is lower case true */ + #define TRUE 1 +#endif +#ifndef FALSE /* Mac standard is lower case false */ + #define FALSE 0 +#endif +#endif + +#endif /* !defined(PROTYPES_H) */ diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/prcpucfg.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/prcpucfg.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/prcpucfg.h 1970-01-01 00:00:00.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/prcpucfg.h 2008-01-29 23:56:53.000000000 +0000 @@ -0,0 +1,661 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is the Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nspr_cpucfg___ +#define nspr_cpucfg___ + +#ifndef XP_UNIX +#define XP_UNIX +#endif + +#ifndef LINUX +#define LINUX +#endif + +#define PR_AF_INET6 10 /* same as AF_INET6 */ + +#ifdef __powerpc__ + +#undef IS_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 1 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__alpha) + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +#define IS_64 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 8 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 8 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 64 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 64 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 6 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 6 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 8 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 8 +#define PR_ALIGN_OF_WORD 8 + +#define PR_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__ia64__) + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +#define IS_64 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 8 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 8 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 64 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 64 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 6 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 6 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 8 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 8 +#define PR_ALIGN_OF_WORD 8 + +#define PR_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__x86_64__) + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +#define IS_64 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 8 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 8 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 64 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 64 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 6 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 6 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 8 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 8 +#define PR_ALIGN_OF_WORD 8 + +#define PR_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__mc68000__) + +#undef IS_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 1 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 2 +#define PR_ALIGN_OF_LONG 2 +#define PR_ALIGN_OF_INT64 2 +#define PR_ALIGN_OF_FLOAT 2 +#define PR_ALIGN_OF_DOUBLE 2 +#define PR_ALIGN_OF_POINTER 2 +#define PR_ALIGN_OF_WORD 2 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__sparc__) || (defined(__SUNPRO_CC) && defined(__sparc)) + +#undef IS_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 1 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__i386__) || (defined(__SUNPRO_CC) && defined(__i386)) + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 4 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 4 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__mips__) + +#ifdef __MIPSEB__ +#define IS_BIG_ENDIAN 1 +#undef IS_LITTLE_ENDIAN +#elif defined(__MIPSEL__) +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +#else +#error "Unknown MIPS endianness." +#endif + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__arm__) + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 4 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 4 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__hppa__) + +#undef IS_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 1 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__s390x__) + +#define IS_BIG_ENDIAN 1 +#undef IS_LITTLE_ENDIAN +#define IS_64 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 8 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 8 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 64 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 64 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 6 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 6 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 8 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 8 +#define PR_ALIGN_OF_WORD 8 + +#define PR_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__s390__) + +#define IS_BIG_ENDIAN 1 +#undef IS_LITTLE_ENDIAN + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 4 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 4 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#else + +#error "Unknown CPU architecture" + +#endif + +#define HAVE_LONG_LONG 1 +#if PR_ALIGN_OF_DOUBLE == 8 +#define HAVE_ALIGNED_DOUBLES +#endif +#if PR_ALIGN_OF_INT64 == 8 +#define HAVE_ALIGNED_LONGLONGS +#endif + +#ifndef NO_NSPR_10_SUPPORT + +#define BYTES_PER_BYTE PR_BYTES_PER_BYTE +#define BYTES_PER_SHORT PR_BYTES_PER_SHORT +#define BYTES_PER_INT PR_BYTES_PER_INT +#define BYTES_PER_INT64 PR_BYTES_PER_INT64 +#define BYTES_PER_LONG PR_BYTES_PER_LONG +#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT +#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE +#define BYTES_PER_WORD PR_BYTES_PER_WORD +#define BYTES_PER_DWORD PR_BYTES_PER_DWORD + +#define BITS_PER_BYTE PR_BITS_PER_BYTE +#define BITS_PER_SHORT PR_BITS_PER_SHORT +#define BITS_PER_INT PR_BITS_PER_INT +#define BITS_PER_INT64 PR_BITS_PER_INT64 +#define BITS_PER_LONG PR_BITS_PER_LONG +#define BITS_PER_FLOAT PR_BITS_PER_FLOAT +#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE +#define BITS_PER_WORD PR_BITS_PER_WORD + +#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 +#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 +#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 +#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 +#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 +#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 +#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 +#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 + +#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT +#define ALIGN_OF_INT PR_ALIGN_OF_INT +#define ALIGN_OF_LONG PR_ALIGN_OF_LONG +#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 +#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT +#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE +#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER +#define ALIGN_OF_WORD PR_ALIGN_OF_WORD + +#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 +#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 +#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 + +#endif /* NO_NSPR_10_SUPPORT */ + +#endif /* nspr_cpucfg___ */ diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/prtypes.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/prtypes.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/sdk/prtypes.h 1970-01-01 00:00:00.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/sdk/prtypes.h 2008-01-29 23:56:53.000000000 +0000 @@ -0,0 +1,543 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is the Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998-2000 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +/* +** File: prtypes.h +** Description: Definitions of NSPR's basic types +** +** Prototypes and macros used to make up for deficiencies in ANSI environments +** that we have found. +** +** Since we do not wrap and all the other standard headers, authors +** of portable code will not know in general that they need these definitions. +** Instead of requiring these authors to find the dependent uses in their code +** and take the following steps only in those C files, we take steps once here +** for all C files. +**/ + +#ifndef prtypes_h___ +#define prtypes_h___ + +#ifdef MDCPUCFG +#include MDCPUCFG +#else +#include "prcpucfg.h" +#endif + +#include + +/*********************************************************************** +** MACROS: PR_EXTERN +** PR_IMPLEMENT +** DESCRIPTION: +** These are only for externally visible routines and globals. For +** internal routines, just use "extern" for type checking and that +** will not export internal cross-file or forward-declared symbols. +** Define a macro for declaring procedures return types. We use this to +** deal with windoze specific type hackery for DLL definitions. Use +** PR_EXTERN when the prototype for the method is declared. Use +** PR_IMPLEMENT for the implementation of the method. +** +** Example: +** in dowhim.h +** PR_EXTERN( void ) DoWhatIMean( void ); +** in dowhim.c +** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; } +** +** +***********************************************************************/ +#if defined(WIN32) + +#if defined(__GNUC__) +#undef _declspec +#define _declspec(x) __declspec(x) +#endif + +#define PR_EXPORT(__type) extern _declspec(dllexport) __type +#define PR_EXPORT_DATA(__type) extern _declspec(dllexport) __type +#define PR_IMPORT(__type) _declspec(dllimport) __type +#define PR_IMPORT_DATA(__type) _declspec(dllimport) __type + +#define PR_EXTERN(__type) extern _declspec(dllexport) __type +#define PR_IMPLEMENT(__type) _declspec(dllexport) __type +#define PR_EXTERN_DATA(__type) extern _declspec(dllexport) __type +#define PR_IMPLEMENT_DATA(__type) _declspec(dllexport) __type + +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + +#elif defined(XP_BEOS) + +#define PR_EXPORT(__type) extern __declspec(dllexport) __type +#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type +#define PR_IMPORT(__type) extern __declspec(dllexport) __type +#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type + +#define PR_EXTERN(__type) extern __declspec(dllexport) __type +#define PR_IMPLEMENT(__type) __declspec(dllexport) __type +#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type +#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type + +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + +#elif defined(WIN16) + +#define PR_CALLBACK_DECL __cdecl + +#if defined(_WINDLL) +#define PR_EXPORT(__type) extern __type _cdecl _export _loadds +#define PR_IMPORT(__type) extern __type _cdecl _export _loadds +#define PR_EXPORT_DATA(__type) extern __type _export +#define PR_IMPORT_DATA(__type) extern __type _export + +#define PR_EXTERN(__type) extern __type _cdecl _export _loadds +#define PR_IMPLEMENT(__type) __type _cdecl _export _loadds +#define PR_EXTERN_DATA(__type) extern __type _export +#define PR_IMPLEMENT_DATA(__type) __type _export + +#define PR_CALLBACK __cdecl __loadds +#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK + +#else /* this must be .EXE */ +#define PR_EXPORT(__type) extern __type _cdecl _export +#define PR_IMPORT(__type) extern __type _cdecl _export +#define PR_EXPORT_DATA(__type) extern __type _export +#define PR_IMPORT_DATA(__type) extern __type _export + +#define PR_EXTERN(__type) extern __type _cdecl _export +#define PR_IMPLEMENT(__type) __type _cdecl _export +#define PR_EXTERN_DATA(__type) extern __type _export +#define PR_IMPLEMENT_DATA(__type) __type _export + +#define PR_CALLBACK __cdecl __loadds +#define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK +#endif /* _WINDLL */ + +#elif defined(XP_MAC) + +#define PR_EXPORT(__type) extern __declspec(export) __type +#define PR_EXPORT_DATA(__type) extern __declspec(export) __type +#define PR_IMPORT(__type) extern __declspec(export) __type +#define PR_IMPORT_DATA(__type) extern __declspec(export) __type + +#define PR_EXTERN(__type) extern __declspec(export) __type +#define PR_IMPLEMENT(__type) __declspec(export) __type +#define PR_EXTERN_DATA(__type) extern __declspec(export) __type +#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type + +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + +#elif defined(XP_OS2_VACPP) + +#define PR_EXPORT(__type) extern __type +#define PR_EXPORT_DATA(__type) extern __type +#define PR_IMPORT(__type) extern __type +#define PR_IMPORT_DATA(__type) extern __type + +#define PR_EXTERN(__type) extern __type +#define PR_IMPLEMENT(__type) __type +#define PR_EXTERN_DATA(__type) extern __type +#define PR_IMPLEMENT_DATA(__type) __type +#define PR_CALLBACK _Optlink +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK + +#else /* Unix */ + +#define PR_EXPORT(__type) extern __type +#define PR_EXPORT_DATA(__type) extern __type +#define PR_IMPORT(__type) extern __type +#define PR_IMPORT_DATA(__type) extern __type + +#define PR_EXTERN(__type) extern __type +#define PR_IMPLEMENT(__type) __type +#define PR_EXTERN_DATA(__type) extern __type +#define PR_IMPLEMENT_DATA(__type) __type +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + +#endif + +#if defined(_NSPR_BUILD_) +#define NSPR_API(__type) PR_EXPORT(__type) +#define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type) +#else +#define NSPR_API(__type) PR_IMPORT(__type) +#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) +#endif + +/*********************************************************************** +** MACROS: PR_BEGIN_MACRO +** PR_END_MACRO +** DESCRIPTION: +** Macro body brackets so that macros with compound statement definitions +** behave syntactically more like functions when called. +***********************************************************************/ +#define PR_BEGIN_MACRO do { +#define PR_END_MACRO } while (0) + +/*********************************************************************** +** MACROS: PR_BEGIN_EXTERN_C +** PR_END_EXTERN_C +** DESCRIPTION: +** Macro shorthands for conditional C++ extern block delimiters. +***********************************************************************/ +#ifdef __cplusplus +#define PR_BEGIN_EXTERN_C extern "C" { +#define PR_END_EXTERN_C } +#else +#define PR_BEGIN_EXTERN_C +#define PR_END_EXTERN_C +#endif + +/*********************************************************************** +** MACROS: PR_BIT +** PR_BITMASK +** DESCRIPTION: +** Bit masking macros. XXX n must be <= 31 to be portable +***********************************************************************/ +#define PR_BIT(n) ((PRUint32)1 << (n)) +#define PR_BITMASK(n) (PR_BIT(n) - 1) + +/*********************************************************************** +** MACROS: PR_ROUNDUP +** PR_MIN +** PR_MAX +** PR_ABS +** DESCRIPTION: +** Commonly used macros for operations on compatible types. +***********************************************************************/ +#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) +#define PR_MIN(x,y) ((x)<(y)?(x):(y)) +#define PR_MAX(x,y) ((x)>(y)?(x):(y)) +#define PR_ABS(x) ((x)<0?-(x):(x)) + +PR_BEGIN_EXTERN_C + +/************************************************************************ +** TYPES: PRUint8 +** PRInt8 +** DESCRIPTION: +** The int8 types are known to be 8 bits each. There is no type that +** is equivalent to a plain "char". +************************************************************************/ +#if PR_BYTES_PER_BYTE == 1 +typedef unsigned char PRUint8; +/* +** Some cfront-based C++ compilers do not like 'signed char' and +** issue the warning message: +** warning: "signed" not implemented (ignored) +** For these compilers, we have to define PRInt8 as plain 'char'. +** Make sure that plain 'char' is indeed signed under these compilers. +*/ +#if (defined(HPUX) && defined(__cplusplus) \ + && !defined(__GNUC__) && __cplusplus < 199707L) \ + || (defined(SCO) && defined(__cplusplus) \ + && !defined(__GNUC__) && __cplusplus == 1L) +typedef char PRInt8; +#else +typedef signed char PRInt8; +#endif +#else +#error No suitable type for PRInt8/PRUint8 +#endif + +/************************************************************************ + * MACROS: PR_INT8_MAX + * PR_INT8_MIN + * PR_UINT8_MAX + * DESCRIPTION: + * The maximum and minimum values of a PRInt8 or PRUint8. +************************************************************************/ + +#define PR_INT8_MAX 127 +#define PR_INT8_MIN (-128) +#define PR_UINT8_MAX 255U + +/************************************************************************ +** TYPES: PRUint16 +** PRInt16 +** DESCRIPTION: +** The int16 types are known to be 16 bits each. +************************************************************************/ +#if PR_BYTES_PER_SHORT == 2 +typedef unsigned short PRUint16; +typedef short PRInt16; +#else +#error No suitable type for PRInt16/PRUint16 +#endif + +/************************************************************************ + * MACROS: PR_INT16_MAX + * PR_INT16_MIN + * PR_UINT16_MAX + * DESCRIPTION: + * The maximum and minimum values of a PRInt16 or PRUint16. +************************************************************************/ + +#define PR_INT16_MAX 32767 +#define PR_INT16_MIN (-32768) +#define PR_UINT16_MAX 65535U + +/************************************************************************ +** TYPES: PRUint32 +** PRInt32 +** DESCRIPTION: +** The int32 types are known to be 32 bits each. +************************************************************************/ +#if PR_BYTES_PER_INT == 4 +typedef unsigned int PRUint32; +typedef int PRInt32; +#define PR_INT32(x) x +#define PR_UINT32(x) x ## U +#elif PR_BYTES_PER_LONG == 4 +typedef unsigned long PRUint32; +typedef long PRInt32; +#define PR_INT32(x) x ## L +#define PR_UINT32(x) x ## UL +#else +#error No suitable type for PRInt32/PRUint32 +#endif + +/************************************************************************ + * MACROS: PR_INT32_MAX + * PR_INT32_MIN + * PR_UINT32_MAX + * DESCRIPTION: + * The maximum and minimum values of a PRInt32 or PRUint32. +************************************************************************/ + +#define PR_INT32_MAX PR_INT32(2147483647) +#define PR_INT32_MIN (-PR_INT32_MAX - 1) +#define PR_UINT32_MAX PR_UINT32(4294967295) + +/************************************************************************ +** TYPES: PRUint64 +** PRInt64 +** DESCRIPTION: +** The int64 types are known to be 64 bits each. Care must be used when +** declaring variables of type PRUint64 or PRInt64. Different hardware +** architectures and even different compilers have varying support for +** 64 bit values. The only guaranteed portability requires the use of +** the LL_ macros (see prlong.h). +************************************************************************/ +#ifdef HAVE_LONG_LONG +#if PR_BYTES_PER_LONG == 8 +typedef long PRInt64; +typedef unsigned long PRUint64; +#elif defined(WIN16) +typedef __int64 PRInt64; +typedef unsigned __int64 PRUint64; +#elif defined(WIN32) && !defined(__GNUC__) +typedef __int64 PRInt64; +typedef unsigned __int64 PRUint64; +#else +typedef long long PRInt64; +typedef unsigned long long PRUint64; +#endif /* PR_BYTES_PER_LONG == 8 */ +#else /* !HAVE_LONG_LONG */ +typedef struct { +#ifdef IS_LITTLE_ENDIAN + PRUint32 lo, hi; +#else + PRUint32 hi, lo; +#endif +} PRInt64; +typedef PRInt64 PRUint64; +#endif /* !HAVE_LONG_LONG */ + +/************************************************************************ +** TYPES: PRUintn +** PRIntn +** DESCRIPTION: +** The PRIntn types are most appropriate for automatic variables. They are +** guaranteed to be at least 16 bits, though various architectures may +** define them to be wider (e.g., 32 or even 64 bits). These types are +** never valid for fields of a structure. +************************************************************************/ +#if PR_BYTES_PER_INT >= 2 +typedef int PRIntn; +typedef unsigned int PRUintn; +#else +#error 'sizeof(int)' not sufficient for platform use +#endif + +/************************************************************************ +** TYPES: PRFloat64 +** DESCRIPTION: +** NSPR's floating point type is always 64 bits. +************************************************************************/ +typedef double PRFloat64; + +/************************************************************************ +** TYPES: PRSize +** DESCRIPTION: +** A type for representing the size of objects. +************************************************************************/ +typedef size_t PRSize; + + +/************************************************************************ +** TYPES: PROffset32, PROffset64 +** DESCRIPTION: +** A type for representing byte offsets from some location. +************************************************************************/ +typedef PRInt32 PROffset32; +typedef PRInt64 PROffset64; + +/************************************************************************ +** TYPES: PRPtrDiff +** DESCRIPTION: +** A type for pointer difference. Variables of this type are suitable +** for storing a pointer or pointer sutraction. +************************************************************************/ +typedef ptrdiff_t PRPtrdiff; + +/************************************************************************ +** TYPES: PRUptrdiff +** DESCRIPTION: +** A type for pointer difference. Variables of this type are suitable +** for storing a pointer or pointer sutraction. +************************************************************************/ +typedef unsigned long PRUptrdiff; + +/************************************************************************ +** TYPES: PRBool +** DESCRIPTION: +** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE +** for clarity of target type in assignments and actual arguments. Use +** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans +** juast as you would C int-valued conditions. +************************************************************************/ +typedef PRIntn PRBool; +#define PR_TRUE 1 +#define PR_FALSE 0 + +/************************************************************************ +** TYPES: PRPackedBool +** DESCRIPTION: +** Use PRPackedBOol within structs where bitfields are not desireable +** but minimum and consistant overhead matters. +************************************************************************/ +typedef PRUint8 PRPackedBool; + +/* +** Status code used by some routines that have a single point of failure or +** special status return. +*/ +typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; + +#ifdef MOZ_UNICODE +/* + * EXPERIMENTAL: This type may be removed in a future release. + */ +#ifndef __PRUNICHAR__ +#define __PRUNICHAR__ +#if defined(WIN32) || defined(XP_MAC) +typedef wchar_t PRUnichar; +#else +typedef PRUint16 PRUnichar; +#endif +#endif +#endif /* MOZ_UNICODE */ + +/* +** WARNING: The undocumented data types PRWord and PRUword are +** only used in the garbage collection and arena code. Do not +** use PRWord and PRUword in new code. +** +** A PRWord is an integer that is the same size as a void*. +** It implements the notion of a "word" in the Java Virtual +** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine +** Specification, Addison-Wesley, September 1996. +** http://java.sun.com/docs/books/vmspec/index.html.) +*/ +typedef long PRWord; +typedef unsigned long PRUword; + +#if defined(NO_NSPR_10_SUPPORT) +#else +/********* ???????????????? FIX ME ??????????????????????????? *****/ +/********************** Some old definitions until pr=>ds transition is done ***/ +/********************** Also, we are still using NSPR 1.0. GC ******************/ +/* +** Fundamental NSPR macros, used nearly everywhere. +*/ + +#define PR_PUBLIC_API PR_IMPLEMENT + +/* +** Macro body brackets so that macros with compound statement definitions +** behave syntactically more like functions when called. +*/ +#define NSPR_BEGIN_MACRO do { +#define NSPR_END_MACRO } while (0) + +/* +** Macro shorthands for conditional C++ extern block delimiters. +*/ +#ifdef NSPR_BEGIN_EXTERN_C +#undef NSPR_BEGIN_EXTERN_C +#endif +#ifdef NSPR_END_EXTERN_C +#undef NSPR_END_EXTERN_C +#endif + +#ifdef __cplusplus +#define NSPR_BEGIN_EXTERN_C extern "C" { +#define NSPR_END_EXTERN_C } +#else +#define NSPR_BEGIN_EXTERN_C +#define NSPR_END_EXTERN_C +#endif + +#ifdef XP_MAC +#include "protypes.h" +#else +#include "obsolete/protypes.h" +#endif + +/********* ????????????? End Fix me ?????????????????????????????? *****/ +#endif /* NO_NSPR_10_SUPPORT */ + +PR_END_EXTERN_C + +#endif /* prtypes_h___ */ + diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/Makefile.am /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/Makefile.am --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/Makefile.am 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/Makefile.am 2008-01-29 23:56:53.000000000 +0000 @@ -1,12 +1,11 @@ -INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) +INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) `pkg-config --cflags glib-2.0` METASOURCES = AUTO bin_PROGRAMS = nspluginviewer nspluginviewer_SOURCES = NSPluginCallbackIface.stub NSPluginClassIface.skel \ - nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp -nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic + nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp +nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic `pkg-config --libs glib-2.0` nspluginviewer_LDADD = $(LIB_KIO) $(LIB_KPARTS) -lXt NSPluginCallbackIface_DIR = $(srcdir)/.. - diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/Makefile.in /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/Makefile.in --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/Makefile.in 2008-01-29 23:56:31.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/Makefile.in 2008-01-29 23:56:53.000000000 +0000 @@ -53,12 +53,12 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_nspluginviewer_OBJECTS = nsplugin.$(OBJEXT) viewer.$(OBJEXT) \ - kxt.$(OBJEXT) qxteventloop.$(OBJEXT) + kxt.$(OBJEXT) qxteventloop.$(OBJEXT) glibevents.$(OBJEXT) #>- nspluginviewer_OBJECTS = $(am_nspluginviewer_OBJECTS) #>+ 5 nspluginviewer_final_OBJECTS = nspluginviewer.all_cpp.o nspluginviewer_nofinal_OBJECTS = nsplugin.$(OBJEXT) viewer.$(OBJEXT) \ - kxt.$(OBJEXT) qxteventloop.$(OBJEXT) NSPluginCallbackIface_stub.$(OBJEXT) NSPluginClassIface_skel.$(OBJEXT) + kxt.$(OBJEXT) qxteventloop.$(OBJEXT) glibevents.$(OBJEXT) NSPluginCallbackIface_stub.$(OBJEXT) NSPluginClassIface_skel.$(OBJEXT) @KDE_USE_FINAL_FALSE@nspluginviewer_OBJECTS = $(nspluginviewer_nofinal_OBJECTS) @KDE_USE_FINAL_TRUE@nspluginviewer_OBJECTS = $(nspluginviewer_final_OBJECTS) am__DEPENDENCIES_1 = @@ -580,15 +580,15 @@ xdg_appsdir = @xdg_appsdir@ xdg_directorydir = @xdg_directorydir@ xdg_menudir = @xdg_menudir@ -INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) +INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes) `pkg-config --cflags glib-2.0` #>- METASOURCES = AUTO #>- nspluginviewer_SOURCES = NSPluginCallbackIface.stub NSPluginClassIface.skel \ -#>- nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp +#>- nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp #>+ 2 nspluginviewer_SOURCES= \ - nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp + nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp -nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic +nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic `pkg-config --libs glib-2.0` nspluginviewer_LDADD = $(LIB_KIO) $(LIB_KPARTS) -lXt NSPluginCallbackIface_DIR = $(srcdir)/.. #>- all: all-am @@ -677,6 +677,7 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glibevents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kxt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsplugin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qxteventloop.Po@am__quote@ @@ -914,6 +915,13 @@ mocs: qxteventloop.moc #>+ 3 +glibevents.moc: $(srcdir)/glibevents.h + $(MOC) $(srcdir)/glibevents.h -o glibevents.moc + +#>+ 2 +mocs: glibevents.moc + +#>+ 3 nsplugin.moc: $(srcdir)/nsplugin.h $(MOC) $(srcdir)/nsplugin.h -o nsplugin.moc @@ -922,10 +930,10 @@ #>+ 3 clean-metasources: - -rm -f kxt.moc qxteventloop.moc nsplugin.moc + -rm -f kxt.moc qxteventloop.moc glibevents.moc nsplugin.moc #>+ 2 -KDE_DIST=resolve.h Makefile.in nsplugin.h NSPluginClassIface.h qxteventloop.h kxt.h Makefile.am +KDE_DIST=resolve.h Makefile.in nsplugin.h NSPluginClassIface.h qxteventloop.h kxt.h glibevents.h Makefile.am #>+ 5 clean-idl: @@ -975,11 +983,11 @@ #>+ 11 -nspluginviewer.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/nsplugin.cpp $(srcdir)/viewer.cpp $(srcdir)/kxt.cpp $(srcdir)/qxteventloop.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp kxt.moc qxteventloop.moc nsplugin.moc +nspluginviewer.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/nsplugin.cpp $(srcdir)/viewer.cpp $(srcdir)/kxt.cpp $(srcdir)/qxteventloop.cpp $(srcdir)/glibevents.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp kxt.moc qxteventloop.moc glibevents.moc nsplugin.moc @echo 'creating nspluginviewer.all_cpp.cpp ...'; \ rm -f nspluginviewer.all_cpp.files nspluginviewer.all_cpp.final; \ echo "#define KDE_USE_FINAL 1" >> nspluginviewer.all_cpp.final; \ - for file in nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp ; do \ + for file in nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp glibevents.cpp NSPluginCallbackIface_stub.cpp NSPluginClassIface_skel.cpp ; do \ echo "#include \"$$file\"" >> nspluginviewer.all_cpp.files; \ test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> nspluginviewer.all_cpp.final; \ done; \ @@ -1010,17 +1018,20 @@ kde-rpo-clean: -rm -f *.rpo -#>+ 14 +#>+ 17 NSPluginCallbackIface_stub.cpp: NSPluginCallbackIface_stub.h kxt.o: kxt.moc $(srcdir)/viewer.cpp: NSPluginCallbackIface_stub.h $(srcdir)/nsplugin.cpp: NSPluginCallbackIface_stub.h +$(srcdir)/glibevents.cpp: NSPluginCallbackIface_stub.h qxteventloop.o: qxteventloop.moc -$(srcdir)/qxteventloop.cpp: NSPluginCallbackIface_stub.h nmcheck: -kxt.lo: kxt.moc +$(srcdir)/qxteventloop.cpp: NSPluginCallbackIface_stub.h nmcheck-am: nmcheck +kxt.lo: kxt.moc +glibevents.o: glibevents.moc nsplugin.lo: nsplugin.moc nsplugin.o: nsplugin.moc +glibevents.lo: glibevents.moc qxteventloop.lo: qxteventloop.moc $(srcdir)/kxt.cpp: NSPluginCallbackIface_stub.h diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/NSPluginClassIface.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/NSPluginClassIface.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/NSPluginClassIface.h 2005-11-19 11:08:29.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/NSPluginClassIface.h 2008-01-29 23:56:53.000000000 +0000 @@ -47,10 +47,10 @@ k_dcop: - virtual DCOPRef newInstance(QString url, QString mimeType, bool embed, + virtual DCOPRef newInstance(QString url, QString mimeType, Q_INT8 embed, QStringList argn, QStringList argv, - QString appId, QString callbackId, bool reload, - bool doPost, QByteArray postData) = 0; + QString appId, QString callbackId, Q_INT8 reload, + Q_INT8 doPost, QByteArray postData, Q_UINT32 xembed) = 0; virtual QString getMIMEDescription() = 0; }; @@ -66,11 +66,11 @@ virtual int winId() = 0; - virtual int setWindow(int remove=0) = 0; + virtual int setWindow(Q_INT8 remove=0) = 0; - virtual void resizePlugin(int w, int h) = 0; + virtual void resizePlugin(Q_INT32 w, Q_INT32 h) = 0; - virtual void javascriptResult(int id, QString result) = 0; + virtual void javascriptResult(Q_INT32 id, QString result) = 0; virtual void displayPlugin() = 0; }; diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/glibevents.cpp /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/glibevents.cpp --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/glibevents.cpp 1970-01-01 00:00:00.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/glibevents.cpp 2008-01-29 23:56:53.000000000 +0000 @@ -0,0 +1,43 @@ +/* + Copyright (c) 2007 Lubos Lunak + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +*/ + +#include "glibevents.h" + +#include + +GlibEvents::GlibEvents() + { + g_main_context_ref( g_main_context_default()); + connect( &timer, SIGNAL( timeout()), SLOT( process())); + // TODO Poll for now + timer.start( 10 ); + } + +GlibEvents::~GlibEvents() + { + g_main_context_unref( g_main_context_default()); + } + +void GlibEvents::process() + { + while( g_main_context_pending( g_main_context_default())) + g_main_context_iteration( g_main_context_default(), false ); + } + +#include "glibevents.moc" diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/glibevents.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/glibevents.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/glibevents.h 1970-01-01 00:00:00.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/glibevents.h 2008-01-29 23:56:53.000000000 +0000 @@ -0,0 +1,41 @@ +/* + Copyright (c) 2007 Lubos Lunak + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +*/ + +#ifndef GLIBEVENTS_H +#define GLIBEVENTS_H + +#include +#include + +#include + +class GlibEvents + : public QWidget + { + Q_OBJECT + public: + GlibEvents(); + virtual ~GlibEvents(); + private slots: + void process(); + private: + QTimer timer; + }; + +#endif diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/nsplugin.cpp /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/nsplugin.cpp --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/nsplugin.cpp 2006-03-17 10:17:36.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/nsplugin.cpp 2008-01-29 23:56:53.000000000 +0000 @@ -180,6 +180,12 @@ // Offline browsing - no thanks *(bool*)value = false; return NPERR_NO_ERROR; + case NPNVToolkit: + *(NPNToolkitType*)value = NPNVGtk2; + return NPERR_NO_ERROR; + case NPNVSupportsXEmbedBool: + *(bool*)value = true; + return NPERR_NO_ERROR; default: return NPERR_INVALID_PARAM; } @@ -484,6 +490,8 @@ KProtocolManager kpm; QString agent = kpm.userAgentForHost("nspluginviewer"); kdDebug(1431) << "g_NPN_UserAgent() = " << agent << endl; + // flash crashes without Firefox UA + agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/2007101500 Firefox/2.0.0.10"; return agent.latin1(); } @@ -583,12 +591,11 @@ KLibrary *handle, int width, int height, QString src, QString /*mime*/, QString appId, QString callbackId, - bool embed, + bool embed, WId xembed, QObject *parent, const char* name ) : DCOPObject(), QObject( parent, name ) { Q_UNUSED(embed); - _firstResize = true; _visible = false; _npp = privateData; _npp->ndata = this; @@ -600,6 +607,8 @@ _streams.setAutoDelete( true ); _waitingRequests.setAutoDelete( true ); _callback = new NSPluginCallbackIface_stub( appId.latin1(), callbackId.latin1() ); + _xembed_window = xembed; + _toplevel = _form = 0; KURL base(src); base.setFileName( QString::null ); @@ -620,51 +629,53 @@ if (height == 0) height = 1200; - // create drawing area - Arg args[7]; - Cardinal nargs = 0; - XtSetArg(args[nargs], XtNwidth, width); nargs++; - XtSetArg(args[nargs], XtNheight, height); nargs++; - XtSetArg(args[nargs], XtNborderWidth, 0); nargs++; - - String n, c; - XtGetApplicationNameAndClass(qt_xdisplay(), &n, &c); - - _toplevel = XtAppCreateShell("drawingArea", c, applicationShellWidgetClass, - qt_xdisplay(), args, nargs); - - // What exactly does widget mapping mean? Without this call the widget isn't - // embedded correctly. With it the viewer doesn't show anything in standalone mode. - //if (embed) - XtSetMappedWhenManaged(_toplevel, False); - XtRealizeWidget(_toplevel); - - // Create form window that is searched for by flash plugin - _form = XtVaCreateWidget("form", compositeWidgetClass, _toplevel, NULL); - XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++; - XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++; - XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++; - XtSetValues(_form, args, nargs); - XSync(qt_xdisplay(), false); + if( _xembed_window == 0 ) { + // create drawing area + Arg args[7]; + Cardinal nargs = 0; + XtSetArg(args[nargs], XtNwidth, width); nargs++; + XtSetArg(args[nargs], XtNheight, height); nargs++; + XtSetArg(args[nargs], XtNborderWidth, 0); nargs++; + + String n, c; + XtGetApplicationNameAndClass(qt_xdisplay(), &n, &c); + + _toplevel = XtAppCreateShell("drawingArea", c, applicationShellWidgetClass, + qt_xdisplay(), args, nargs); + + // What exactly does widget mapping mean? Without this call the widget isn't + // embedded correctly. With it the viewer doesn't show anything in standalone mode. + //if (embed) + XtSetMappedWhenManaged(_toplevel, False); + XtRealizeWidget(_toplevel); + + // Create form window that is searched for by flash plugin + _form = XtVaCreateWidget("form", compositeWidgetClass, _toplevel, NULL); + XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++; + XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++; + XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++; + XtSetValues(_form, args, nargs); + XSync(qt_xdisplay(), false); - // From mozilla - not sure if it's needed yet, nor what to use for embedder + // From mozilla - not sure if it's needed yet, nor what to use for embedder #if 0 - /* this little trick seems to finish initializing the widget */ + /* this little trick seems to finish initializing the widget */ #if XlibSpecificationRelease >= 6 - XtRegisterDrawable(qt_xdisplay(), embedderid, _toplevel); + XtRegisterDrawable(qt_xdisplay(), embedderid, _toplevel); #else - _XtRegisterWindow(embedderid, _toplevel); + _XtRegisterWindow(embedderid, _toplevel); #endif #endif - XtRealizeWidget(_form); - XtManageChild(_form); + XtRealizeWidget(_form); + XtManageChild(_form); - // Register forwarder - XtAddEventHandler(_toplevel, (KeyPressMask|KeyReleaseMask), - False, forwarder, (XtPointer)this ); - XtAddEventHandler(_form, (KeyPressMask|KeyReleaseMask), - False, forwarder, (XtPointer)this ); - XSync(qt_xdisplay(), false); + // Register forwarder + XtAddEventHandler(_toplevel, (KeyPressMask|KeyReleaseMask), + False, forwarder, (XtPointer)this ); + XtAddEventHandler(_form, (KeyPressMask|KeyReleaseMask), + False, forwarder, (XtPointer)this ); + XSync(qt_xdisplay(), false); + } } NSPluginInstance::~NSPluginInstance() @@ -715,14 +726,16 @@ if (saved) g_NPN_MemFree(saved); - XtRemoveEventHandler(_form, (KeyPressMask|KeyReleaseMask), - False, forwarder, (XtPointer)this); - XtRemoveEventHandler(_toplevel, (KeyPressMask|KeyReleaseMask), - False, forwarder, (XtPointer)this); - XtDestroyWidget(_form); - _form = 0; - XtDestroyWidget(_toplevel); - _toplevel = 0; + if( _form != 0 ) { + XtRemoveEventHandler(_form, (KeyPressMask|KeyReleaseMask), + False, forwarder, (XtPointer)this); + XtRemoveEventHandler(_toplevel, (KeyPressMask|KeyReleaseMask), + False, forwarder, (XtPointer)this); + XtDestroyWidget(_form); + _form = 0; + XtDestroyWidget(_toplevel); + _toplevel = 0; + } if (_npp) { ::free(_npp); // matched with malloc() in newInstance @@ -807,7 +820,7 @@ s->post( url, req.data, req.mime, req.notify, req.args ); } else if (url.lower().startsWith("javascript:")){ if (_callback) { - static int _jsrequestid = 0; + static Q_INT32 _jsrequestid = 0; _jsrequests.insert(_jsrequestid, new Request(req)); _callback->evalJavaScript(_jsrequestid++, url.mid(11)); } else { @@ -903,8 +916,7 @@ _timer->start( 100, true ); } - -int NSPluginInstance::setWindow(int remove) +int NSPluginInstance::setWindow(Q_INT8 remove) { if (remove) { @@ -927,14 +939,24 @@ _win.clipRect.bottom = _height; _win.clipRect.right = _width; - _win.window = (void*) XtWindow(_form); - kdDebug(1431) << "Window ID = " << _win.window << endl; + if( _xembed_window ) { + _win.window = (void*) _xembed_window; + _win_info.type = NP_SETWINDOW; + _win_info.display = qt_xdisplay(); + _win_info.visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(qt_xdisplay())); + _win_info.colormap = DefaultColormapOfScreen(DefaultScreenOfDisplay(qt_xdisplay())); + _win_info.depth = DefaultDepthOfScreen(DefaultScreenOfDisplay(qt_xdisplay())); + } else { + _win.window = (void*) XtWindow(_form); - _win_info.type = NP_SETWINDOW; - _win_info.display = XtDisplay(_form); - _win_info.visual = DefaultVisualOfScreen(XtScreen(_form)); - _win_info.colormap = DefaultColormapOfScreen(XtScreen(_form)); - _win_info.depth = DefaultDepthOfScreen(XtScreen(_form)); + _win_info.type = NP_SETWINDOW; + _win_info.display = XtDisplay(_form); + _win_info.visual = DefaultVisualOfScreen(XtScreen(_form)); + _win_info.colormap = DefaultColormapOfScreen(XtScreen(_form)); + _win_info.depth = DefaultDepthOfScreen(XtScreen(_form)); + } + + kdDebug(1431) << "Window ID = " << _win.window << endl; _win.ws_info = &_win_info; @@ -958,11 +980,8 @@ } -void NSPluginInstance::resizePlugin(int w, int h) +void NSPluginInstance::resizePlugin(Q_INT32 w, Q_INT32 h) { - if (!_visible) - return; - if (w == _width && h == _height) return; @@ -971,33 +990,38 @@ _width = w; _height = h; - XResizeWindow(qt_xdisplay(), XtWindow(_form), w, h); - XResizeWindow(qt_xdisplay(), XtWindow(_toplevel), w, h); + if( _form != 0 ) { + XResizeWindow(qt_xdisplay(), XtWindow(_form), w, h); + XResizeWindow(qt_xdisplay(), XtWindow(_toplevel), w, h); + + Arg args[7]; + Cardinal nargs = 0; + XtSetArg(args[nargs], XtNwidth, _width); nargs++; + XtSetArg(args[nargs], XtNheight, _height); nargs++; + XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++; + XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++; + XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++; + XtSetArg(args[nargs], XtNborderWidth, 0); nargs++; + + XtSetValues(_toplevel, args, nargs); + XtSetValues(_form, args, nargs); + + resizeWidgets(XtWindow(_form), _width, _height); + } + + // If not visible yet, displayWindow() will call setWindow() again anyway, so avoid this. + // This also handled plugins that are broken and cannot handle repeated setWindow() calls + // very well. + if (!_visible) + return; - Arg args[7]; - Cardinal nargs = 0; - XtSetArg(args[nargs], XtNwidth, _width); nargs++; - XtSetArg(args[nargs], XtNheight, _height); nargs++; - XtSetArg(args[nargs], XtNvisual, QPaintDevice::x11AppVisual()); nargs++; - XtSetArg(args[nargs], XtNdepth, QPaintDevice::x11AppDepth()); nargs++; - XtSetArg(args[nargs], XtNcolormap, QPaintDevice::x11AppColormap()); nargs++; - XtSetArg(args[nargs], XtNborderWidth, 0); nargs++; - - XtSetValues(_toplevel, args, nargs); - XtSetValues(_form, args, nargs); - - resizeWidgets(XtWindow(_form), _width, _height); - - if (_firstResize) { - _firstResize = false; - setWindow(); - } + setWindow(); kdDebug(1431) << "<- NSPluginInstance::resizePlugin" << endl; } -void NSPluginInstance::javascriptResult(int id, QString result) { +void NSPluginInstance::javascriptResult(Q_INT32 id, QString result) { QMap::iterator i = _jsrequests.find( id ); if (i != _jsrequests.end()) { Request *req = i.data(); @@ -1406,10 +1430,10 @@ } -DCOPRef NSPluginClass::newInstance( QString url, QString mimeType, bool embed, +DCOPRef NSPluginClass::newInstance( QString url, QString mimeType, Q_INT8 embed, QStringList argn, QStringList argv, QString appId, QString callbackId, - bool reload, bool doPost, QByteArray postData ) + Q_INT8 reload, Q_INT8 doPost, QByteArray postData, Q_UINT32 xembed ) { kdDebug(1431) << "-> NSPluginClass::NewInstance" << endl; @@ -1453,16 +1477,25 @@ memset(npp, 0, sizeof(NPP_t)); npp->ndata = NULL; - // Create plugin instance object - NSPluginInstance *inst = new NSPluginInstance( npp, &_pluginFuncs, _handle, - width, height, baseURL, mimeType, - appId, callbackId, embed, this ); - // create plugin instance NPError error = _pluginFuncs.newp(mime, npp, embed ? NP_EMBED : NP_FULL, argc, _argn, _argv, 0); kdDebug(1431) << "NPP_New = " << (int)error << endl; + // don't use bool here, it can be 1 byte, but some plugins write it as int, and I can't find what the spec says + int wants_xembed = false; + if (_pluginFuncs.getvalue) { + NPError error = _pluginFuncs.getvalue(npp, (NPPVariable)14/*NPPVpluginNeedsXEmbed*/, &wants_xembed ); + if( error != NPERR_NO_ERROR ) + wants_xembed = false; + } + kdDebug(1431) << "Plugin requires XEmbed:" << (bool)wants_xembed << endl; + + // Create plugin instance object + NSPluginInstance *inst = new NSPluginInstance( npp, &_pluginFuncs, _handle, + width, height, baseURL, mimeType, + appId, callbackId, embed, wants_xembed ? xembed : 0, this ); + // free arrays with arguments delete [] _argn; delete [] _argv; @@ -1497,7 +1530,6 @@ timer(); //_timer->start( 0, TRUE ); } - /****************************************************************************/ NSPluginStreamBase::NSPluginStreamBase( NSPluginInstance *instance ) @@ -1520,8 +1552,6 @@ delete _tempFile; _tempFile = 0; - delete _queue; - _queue = 0; } @@ -1602,6 +1632,12 @@ return true; } +void NSPluginStreamBase::updateURL( const KURL& newURL ) +{ + _url = newURL; + free(const_cast(_stream->url)); + _stream->url = strdup(_url.url().ascii()); +} int NSPluginStreamBase::process( const QByteArray &data, int start ) { @@ -1824,6 +1860,8 @@ SLOT(totalSize(KIO::Job *, KIO::filesize_t))); connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)), SLOT(mimetype(KIO::Job *, const QString &))); + connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)), + SLOT(redirection(KIO::Job *, const KURL&))); } return false; @@ -1847,6 +1885,8 @@ SLOT(totalSize(KIO::Job *, KIO::filesize_t))); connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)), SLOT(mimetype(KIO::Job *, const QString &))); + connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)), + SLOT(redirection(KIO::Job *, const KURL&))); } return false; @@ -1863,6 +1903,11 @@ } } +void NSPluginStream::redirection(KIO::Job * /*job*/, const KURL& url) +{ + updateURL( url ); +} + void NSPluginStream::totalSize(KIO::Job * job, KIO::filesize_t size) { kdDebug(1431) << "NSPluginStream::totalSize - job=" << (void*)job << " size=" << KIO::number(size) << endl; diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/nsplugin.h /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/nsplugin.h --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/nsplugin.h 2005-11-19 11:08:29.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/nsplugin.h 2008-01-29 23:56:53.000000000 +0000 @@ -46,6 +46,7 @@ #define XP_UNIX +#define MOZ_X11 #include "sdk/npupp.h" typedef char* NP_GetMIMEDescriptionUPP(void); @@ -85,6 +86,7 @@ bool create( const QString& url, const QString& mimeType, void *notify, bool forceNotify = false ); int tries() { return _tries; } void inform( ); + void updateURL( const KURL& newURL ); class NSPluginInstance *_instance; uint16 _streamType; @@ -126,6 +128,7 @@ void totalSize(KIO::Job *job, KIO::filesize_t size); void mimetype(KIO::Job * job, const QString &mimeType); void result(KIO::Job *job); + void redirection(KIO::Job *job, const KURL& url); void resume(); protected: @@ -162,16 +165,16 @@ // constructor, destructor NSPluginInstance( NPP privateData, NPPluginFuncs *pluginFuncs, KLibrary *handle, int width, int height, QString src, QString mime, - QString appId, QString callbackId, bool embed, + QString appId, QString callbackId, bool embed, WId xembed, QObject *parent, const char* name=0 ); ~NSPluginInstance(); // DCOP functions void shutdown(); - int winId() { return XtWindow(_form); } - int setWindow(int remove=0); - void resizePlugin(int w, int h); - void javascriptResult(int id, QString result); + int winId() { return _form != 0 ? XtWindow(_form) : 0; } + int setWindow(Q_INT8 remove=0); + void resizePlugin(Q_INT32 w, Q_INT32 h); + void javascriptResult(Q_INT32 id, QString result); void displayPlugin(); // value handling @@ -218,7 +221,6 @@ bool _destroyed; bool _visible; - bool _firstResize; void addTempFile(KTempFile *tmpFile); QPtrList _tempFiles; NSPluginCallbackIface_stub *_callback; @@ -230,6 +232,7 @@ NPPluginFuncs _pluginFuncs; Widget _area, _form, _toplevel; + WId _xembed_window; QString _baseURL; int _width, _height; @@ -276,10 +279,10 @@ ~NSPluginClass(); QString getMIMEDescription(); - DCOPRef newInstance(QString url, QString mimeType, bool embed, + DCOPRef newInstance(QString url, QString mimeType, Q_INT8 embed, QStringList argn, QStringList argv, - QString appId, QString callbackId, bool reload, bool post, - QByteArray postData ); + QString appId, QString callbackId, Q_INT8 reload, Q_INT8 post, + QByteArray postData, Q_UINT32 xembed ); void destroyInstance( NSPluginInstance* inst ); bool error() { return _error; } diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/qxteventloop.cpp /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/qxteventloop.cpp --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/qxteventloop.cpp 2005-09-10 08:25:39.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/qxteventloop.cpp 2008-01-29 23:56:53.000000000 +0000 @@ -32,12 +32,16 @@ ** not clear to you. ** **********************************************************************/ + +#include + #include "qxteventloop.h" #if QT_VERSION >= 0x030100 #include #include +#include // resolve the conflict between X11's FocusIn and QEvent::FocusIn const int XFocusOut = FocusOut; @@ -52,6 +56,8 @@ Boolean qmotif_event_dispatcher( XEvent *event ); +static void handle_xquerykeymap( Display* dpy, XEvent* event ); + class QXtEventLoopPrivate { public: @@ -147,6 +153,7 @@ extern bool qt_try_modal( QWidget *, XEvent * ); // defined in qapplication_x11.cpp Boolean qmotif_event_dispatcher( XEvent *event ) { + handle_xquerykeymap( qt_xdisplay(), event ); QApplication::sendPostedEvents(); QWidgetIntDict *mapper = &static_d->mapper; @@ -462,6 +469,29 @@ return ( (flags & WaitForMore) || ( pendingmask != 0 ) || nevents > 0 ); } +#include + +static char xquerykeymap_data[ 32 ]; +static int (*real_xquerykeymap)( Display*, char[32] ) = NULL; + +static void handle_xquerykeymap( Display* dpy, XEvent* event ) +{ + if( real_xquerykeymap == NULL ) + real_xquerykeymap = (int (*)( Display*, char[32] )) dlsym( RTLD_NEXT, "XQueryKeymap" ); + if( event->type == XFocusIn || event->type == XKeyPress || event->type == XKeyRelease ) + real_xquerykeymap( dpy, xquerykeymap_data ); + if( event->type == XFocusOut ) + memset( xquerykeymap_data, 0, 32 ); +} + +extern "C" KDE_EXPORT +int XQueryKeymap( Display* , char k[32] ) +{ + memcpy( k, xquerykeymap_data, 32 ); + return 1; +} + + #include "qxteventloop.moc" #endif diff -Nru /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/viewer.cpp /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/viewer.cpp --- /tmp/onSlcgKOuX/kdebase-3.5.2/nsplugins/viewer/viewer.cpp 2006-01-19 17:01:49.000000000 +0000 +++ /tmp/GWJuRwoDpG/kdebase-3.5.2/nsplugins/viewer/viewer.cpp 2008-01-29 23:56:53.000000000 +0000 @@ -52,6 +52,7 @@ #include #else #include "qxteventloop.h" +#include "glibevents.h" #endif /** @@ -249,6 +250,7 @@ kdDebug(1430) << "4 - create KApplication" << endl; KApplication app( argc, argv, "nspluginviewer" ); + GlibEvents glibevents; #endif {