[Not part of build] Initial checkin of header files required to build the MRJ Plugin.

This commit is contained in:
bnesse%netscape.com 2002-05-02 21:56:05 +00:00
Родитель 2b3abdb34f
Коммит 24ad4c4d23
5 изменённых файлов: 2825 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,393 @@
/*
File: JavaEmbedding/JavaApplet.h
Contains: interface to embedding a Java Applet in a Carbon Control
Version: JavaEmbedding-3~36
Copyright: © 2000-2001 by Apple Computer, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
#ifndef __JAVAAPPLET__
#define __JAVAAPPLET__
#if __MACHO__
#ifndef __CORESERVICES__
#include <CoreServices/CoreServices.h>
#endif
#ifndef __JAVACONTROL__
#include <JavaEmbedding/JavaControl.h>
#endif
#else
#ifndef __CFURL__
#include <CFURL.h>
#endif
#ifndef __JAVACONTROL__
#include <JavaControl.h>
#endif
#endif
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
#pragma pack(2)
#endif
#if PRAGMA_ENUM_ALWAYSINT
#if defined(__fourbyteints__) && !__fourbyteints__
#define __JAVAAPPLET__RESTORE_TWOBYTEINTS
#pragma fourbyteints on
#endif
#pragma enumsalwaysint on
#elif PRAGMA_ENUM_OPTIONS
#pragma option enum=int
#elif PRAGMA_ENUM_PACK
#if __option(pack_enums)
#define __JAVAAPPLET__RESTORE_PACKED_ENUMS
#pragma options(!pack_enums)
#endif
#endif
/*
* AppletDescriptor
*
* Discussion:
* The structure for describing applet. This is used as the
* definition of the applet to create when you call CreateJavaApplet.
*/
struct AppletDescriptor {
CFURLRef docBase;
CFURLRef codeBase;
/*
* The attributes found in the <applet ...> tag formatted as a
* CFDictionary of CFStrings. For attributes like height and width
* they should be in screen coordinates. some Applets define them as
* % (for example 90%) and should be converted to pixels before put
* into the dictionary.
*/
CFDictionaryRef htmlAttrs;
/*
* The parameters to the applet formatted as a CFDictionary of
* CFStrings. These are typically found in <param ...> tags inside of
* the applet tag.
*/
CFDictionaryRef appletParams;
};
typedef struct AppletDescriptor AppletDescriptor;
/*
* AppletArena
*
* Discussion:
* This is an opaque type that represents an AppletArena - an applet
* arena represents a single classloader, so all applets that share
* an arena share a common classloader.
*/
typedef struct OpaqueAppletArena* AppletArena;
/*
kUniqueArena is the value to pass to CreateJavaApplet if you want the applet to be created
in a unique arena. A unique arena is one which is guaranteed not to be shared with
any other applet running in this Java VM. This is the appropriate default value to
pass to CreateJavaApplet.
*/
#define kUniqueArena ((AppletArena)NULL)
/*
* JE_ShowDocumentCallback
*
* Discussion:
* Type of a callback function used for show document (link) message
* from an applet.
*
* Parameters:
*
* applet:
* The applet which sent this show document message.
*
* url:
* The url to load.
*
* windowName:
* A string definition of where to open the url. Null means open
* in place, other strings are defined in the HTML spec, like
* "_top" means the parent window of the applet if it happens to
* be in a frame, etc.
*
* userData:
* Data specified when this callback was registered using
* RegisterShowDocumentCallback.
*/
typedef CALLBACK_API_C( void , JE_ShowDocumentCallback )(jobject applet, CFURLRef url, CFStringRef windowName, void *userData);
/*
* JE_SetStatusCallback
*
* Discussion:
* Type of a callback function used for a status message from an
* applet.
*
* Parameters:
*
* applet:
* The applet which sent this status message.
*
* statusMessage:
* The message to be displayed.
*
* userData:
* Data specified when this callback was registered using
* RegisterStatusCallback.
*/
typedef CALLBACK_API_C( void , JE_SetStatusCallback )(jobject applet, CFStringRef statusMessage, void *userData);
/*
* CreateAppletArena()
*
* Discussion:
* Create an applet arena. By default each applet you create will
* have its own "arena". By creating an applet arena, and passing
* that arena into two or more CreateJavaApplet calls, those applets
* will share a single classloader and thus be able to communicate
* with each other through static objects.
*
* Parameters:
*
* outNewArena:
* The newly created applet arena.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
CreateAppletArena(AppletArena * outNewArena);
/*
* CreateJavaApplet()
*
* Discussion:
* Creates a java applet from a descriptor.
*
* Parameters:
*
* env:
* The JNI environment for the current thread.
*
* applet:
* A full descriptor of the applet being loaded. See
* AppletDescriptor.
*
* trusted:
* Whether this applet should be loaded as trusted.
*
* arena:
* The arena for this applet. If this is set to null then a new
* arena will be created. This is the typcial case for applets.
*
* outJavaFrame:
* The applet itself to be used for registering callbacks and
* creating controls.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
CreateJavaApplet(
JNIEnv * env,
AppletDescriptor applet,
Boolean trusted,
AppletArena arena, /* can be NULL */
jobject * outJavaFrame);
/*
* AppletState
*
* Summary:
* Constants that are passed to SetJavaAppletState.
*/
enum AppletState {
kAppletStart = 1, /* Starts the applet processing 3.*/
kAppletStop = 2, /* Halts the applet, but it can be started again.*/
kAppletDestroy = 4 /* Tears down the applet.*/
};
typedef enum AppletState AppletState;
/*
* SetJavaAppletState()
*
* Discussion:
* Sets the state of the current applet as defined by the applet
* spec. Applets can be started and stopped many times, but
* destroying them is final.
*
* Parameters:
*
* env:
* The JNI environment for the current VM and thread.
*
* inAppletFrame:
* The applet to register the status callback (from
* CreateJavaApplet).
*
* inNewState:
* Host defined data passed into showStatusFunction.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
SetJavaAppletState(
JNIEnv * env,
jobject inAppletFrame,
AppletState inNewState);
/*
* RegisterStatusCallback()
*
* Discussion:
* Registers your function that will be called to update the
* applet's status area. Status typically is put in a web browser as
* a text area at the bottom of the page.
*
* Note that this callback will be called from a preemptive thread,
* and if the host application is using cooperative threads they
* will need to push this into their own event system in order to
* handle this correctly.
*
* Parameters:
*
* env:
* The JNI environment for the current VM and thread.
*
* inJavaFrame:
* The applet to register the status callback (from
* CreateJavaApplet).
*
* showStatusFunction:
* The function that will be called when the applet calls
* showStatus(...).
*
* userData:
* Host defined data passed into showStatusFunction.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
RegisterStatusCallback(
JNIEnv * env,
jobject inJavaFrame,
JE_SetStatusCallback showStatusFunction,
void * userData);
/*
* RegisterShowDocumentCallback()
*
* Discussion:
* Registers your function that will be called when the applet
* behaves like a hyperlink. This will be called to move an
* embedding host application to a new URL.
*
* Note that this callback will be called from a preemptive thread,
* and if the host application is using cooperative threads they
* will need to push this into their own event system in order to
* handle this correctly.
*
* Parameters:
*
* env:
* The JNI environment for the current VM and thread.
*
* inJavaFrame:
* The applet to register the show document callback (from
* CreateJavaApplet).
*
* showDocumentFunction:
* The function that will be called when the applet calls
* showDocument().
*
* userData:
* Host defined data passed into showDocumentFunction.
*
* Result:
* An operating system status code.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
RegisterShowDocumentCallback(
JNIEnv * env,
jobject inJavaFrame,
JE_ShowDocumentCallback showDocumentFunction,
void * userData);
#if PRAGMA_ENUM_ALWAYSINT
#pragma enumsalwaysint reset
#ifdef __JAVAAPPLET__RESTORE_TWOBYTEINTS
#pragma fourbyteints off
#endif
#elif PRAGMA_ENUM_OPTIONS
#pragma option enum=reset
#elif defined(__JAVAAPPLET__RESTORE_PACKED_ENUMS)
#pragma options(pack_enums)
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif
#endif /* __JAVAAPPLET__ */

Просмотреть файл

@ -0,0 +1,461 @@
/*
File: JavaEmbedding/JavaControl.h
Contains: interface to embedding Java code in a Carbon Control
Version: JavaEmbedding-3~36
Copyright: © 2000-2001 by Apple Computer, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
#ifndef __JAVACONTROL__
#define __JAVACONTROL__
#if __MACHO__
#ifndef __HITOOLBOX__
#include <HIToolbox/HIToolbox.h>
#endif
#include <JavaVM/jni.h>
#else
#include <jni.h>
#endif
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
#pragma pack(2)
#endif
/*
* Summary:
* JavaControl Embedding errors
*
* Discussion:
* The following are all errors which can be returned from the
* routines contained in this file. Most are self explanatory.
*/
enum {
errJavaEmbeddingNotYetImplemented = -9950,
errJavaEmbeddingIntializationFailed = -9962, /* previously errClassConstructorNotFound, errClassNotFound, and errMethodNotFound*/
errJavaEmbeddingMissingURL = -9955, /* previously errMissingURL*/
errJavaEmbeddingCouldNotCreateApplet = -9956, /* previously errCouldNotCreateApplet*/
errJavaEmbeddingCouldNotEmbedFrame = -9957, /* previously errCouldNotEmbedFrame */
errJavaEmbeddingCouldNotConvertURL = -9958, /* previously errCouldNotConvertURL*/
errJavaEmbeddingNotAFrame = -9959, /* previously errNotAFrame*/
errJavaEmbeddingControlNotEmbedded = -9960, /* previously errControlNotEmbedded*/
errJavaEmbeddingExceptionThrown = -9961 /* previously errExceptionThrown*/
};
/*
* MoveAndClipJavaControl()
*
* Summary:
* Positions the control in the containing window, and sets the clip
* bounds for drawing.
*
* Discussion:
* All coordinates are local to the host window, and 0,0 is the top
* left corner of the content area of the host window - just below
* the title bar.
* Usually a call to MoveAndClipJavaControl is followed by a call to
* DrawJavaControl.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* theControl:
* The Java control (applet).
*
* posX:
* The x position of the control.
*
* posY:
* The y position of the control.
*
* clipX:
* The left of the clip region.
*
* clipY:
* The top of the clip region.
*
* clipWidth:
* The width of the clip region. (Notice this is not right, but
* width)
*
* clipHeight:
* The height of the clip region. (Notice this is not bottom, but
* height)
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
MoveAndClipJavaControl(
JNIEnv * env,
ControlRef theControl,
int posX,
int posY,
int clipX,
int clipY,
int clipWidth,
int clipHeight);
/*
* SizeJavaControl()
*
* Summary:
* Sets the size of the Java control.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
SizeJavaControl(
JNIEnv * env,
ControlRef theControl,
int width,
int height);
/*
* ShowHideJavaControl()
*
* Summary:
* Makes a Java control visible or invisible.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* theControl:
* The Java control (applet).
*
* visible:
* True shows the control.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
ShowHideJavaControl(
JNIEnv * env,
ControlRef theControl,
Boolean visible);
/*
* StopJavaControlAsyncDrawing()
*
* Summary:
* Stops a Java applet from drawing asynchonously.
*
* Discussion:
* Many applets are used for animation and they draw themselves at
* times other than when the control is drawn. In order to handle
* things like live resize and scrolling a host app must be able to
* suspend asynchronous drawing otherwise a draw may occur before
* the host app is able to reposition/reclip the control thus
* causing drawing in the wrong location. When async drawing is off
* normal paint events in an applet are ignored. Only
* DrawJavaControl events are allowed to paint. This allows
* temporary fine grained control of when an applet can paint, and
* should only be used when needed.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* theControl:
* The Java control (applet).
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
StopJavaControlAsyncDrawing(
JNIEnv * env,
ControlRef theControl);
/*
* RestartJavaControlAsyncDrawing()
*
* Summary:
* Allows a Java applet to draw asynchonously.
*
* Discussion:
* This should be called when it is safe again for an applet to draw
* asynchronously. See StopJavaControlAsyncDrawing.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* theControl:
* The Java control (applet).
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
RestartJavaControlAsyncDrawing(
JNIEnv * env,
ControlRef theControl);
/*
* DrawJavaControl()
*
* Summary:
* Causes a Java control that to be drawn.
*
* Discussion:
* This should be called whenever the host app needs the
* applet/control to be redrawn. In the case where Async drawing is
* paused, DrawJavaControl will still cause the applet to draw. So
* if the host app is stopping async drawing for something like live
* scrolling, if there are convenient times the host app should call
* DrawJavaControl (usually after a call to MoveAndClipJavaControl)
* to provide some feedback to the user.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* theControl:
* The corresponding Java control (applet) that is to be drawn.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
DrawJavaControl(
JNIEnv * env,
ControlRef theControl);
/*
========================================================================================
UTILITY API - functions to determine the status of a window or control
========================================================================================
*/
/*
* GetJavaWindowFromWindow()
*
* Discussion:
* Given a native Carbon window this returns the corresponding Java
* window.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* inMacWindow:
* A reference to a native window.
*
* outJavaWindow:
* The corresponding Java window.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
GetJavaWindowFromWindow(
JNIEnv * env,
WindowRef inMacWindow,
jobject * outJavaWindow);
/*
* GetWindowFromJavaWindow()
*
* Discussion:
* Given a Java window this returns the corresponding native Carbon
* window.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* inJavaWindow:
* A reference to a Java window.
*
* outMacWindow:
* The corresponding native window.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
GetWindowFromJavaWindow(
JNIEnv * env,
jobject inJavaWindow,
WindowRef * outMacWindow);
/*
* GetJavaFrameFromControl()
*
* Discussion:
* Given an embedded control this returns the corresponding Java
* applet frame.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* inMacControl:
* A reference to the control for the applet.
*
* outJavaFrame:
* The applet reference.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
GetJavaFrameFromControl(
JNIEnv * env,
ControlRef inMacControl,
jobject * outJavaFrame);
/*
* GetControlFromJavaFrame()
*
* Discussion:
* Given a Java applet frame reference this returns the embedded
* control.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* inJavaFrame:
* The applet reference obtained from CreateJavaApplet.
*
* outMacControl:
* A reference to the control for the applet.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
GetControlFromJavaFrame(
JNIEnv * env,
jobject inJavaFrame,
ControlRef * outMacControl);
/*
* CreateJavaControl()
*
* Discussion:
* Creates a control for the specified applet whose content is drawn
* and events processed by java.
* All communication to this control should be through the APIs
* specified here in JavaControl.h.
*
* Parameters:
*
* env:
* The JNI Environment for the current thread.
*
* inNativeWindow:
* The carbon window that will host the applet.
*
* inBounds:
* The starting location for the applet.
*
* inAppletFrame:
* The applet reference obtained from CreateJavaApplet.
*
* inVisible:
* True if the applet should start out hidden.
*
* outControl:
* A reference to the control that is created for the applet.
*
* Availability:
* Mac OS X: in version 10.1 and later in Carbon.framework
* CarbonLib: not available
* Non-Carbon CFM: not available
*/
extern OSStatus
CreateJavaControl(
JNIEnv * env,
WindowRef inNativeWindow,
const Rect * inBounds,
jobject inAppletFrame,
Boolean inVisible,
ControlRef * outControl);
#if PRAGMA_STRUCT_ALIGN
#pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif
#endif /* __JAVACONTROL__ */

Двоичные данные
plugin/oji/MRJCarbon/MRJSDK/JavaFrameworks/JavaEmbeddingLib Normal file

Двоичный файл не отображается.

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,22 @@
/*
* @(#)jni_md.h 1.12 00/02/02
*
* Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT
#define JNIIMPORT
#define JNICALL
typedef long jint;
typedef long long jlong;
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */