6996291: command line selection of MToolkit by -Dawt.toolkit=sun.awt.motif.MToolkit fails from jdk7 b21 on

Reviewed-by: art, dcherepanov, bae, prr
This commit is contained in:
Sergey Bylokhov 2011-11-12 04:13:38 +04:00
parent 1612a6cb79
commit c007822f02
58 changed files with 16 additions and 14528 deletions

View File

@ -140,71 +140,12 @@ FILES_2D_c = \
debug_trace.c \
debug_util.c
# These files rely on motif to be built, and should not be included
# in a headless build.
#FILES_MOTIF_c = \
#keep awt_AWTEvent.c \
# awt_Button.c \
# awt_Canvas.c \
# awt_Checkbox.c \
#keep .h awt_Component.c \
#keep .h awt_Cursor.c \
# awt_DataTransferer.c \
# awt_DrawingSurface.c \
# awt_Event.c \
# awt_FileDialog.c \
# awt_GlobalCursorManager.c \
# awt_GraphicsEnv.c \
# awt_InputMethod.c \
#keep awt_Insets.c \
# awt_KeyboardFocusManager.c \
# awt_Label.c \
# awt_List.c \
# awt_Menu.c \
# awt_MenuBar.c \
# awt_MenuComponent.c \
# awt_MenuItem.c \
# awt_motif.c \
# awt_Plugin.c \
# awt_PopupMenu.c \
# awt_Robot.c \
# awt_Scrollbar.c \
# awt_ScrollPane.c \
# awt_Selection.c \
# awt_UNIXToolkit.c \
# awt_TextArea.c \
# awt_TextField.c \
# awt_TopLevel.c \
# awt_mgrsel.c \
# awt_util.c \
# awt_wm.c \
# awt_XmDnD.c \
# awt_dnd.c \
# awt_dnd_ds.c \
# awt_dnd_dt.c \
# canvas.c \
# cursor.c \
# multi_font.c \
# robot_common.c \
# list.c \
# multiVis.c \
# XDrawingArea.c \
# MouseInfo.c \
# awt_xembed.c \
# awt_xembed_server.c \
# gtk2_interface.c \
# swing_GTKEngine.c \
# swing_GTKStyle.c
# These files are required to be built, with or without motif. Some of
# these are only dependent on X11, and some contain native source that
# is required, even in a headless build.
FILES_NO_MOTIF_c = \
awt_Font.c \
awt_MToolkit.c \
fontpath.c \
VDrawingArea.c \
X11Color.c \

View File

@ -61,11 +61,8 @@ FILES_export = \
sun/awt/image/BufImgSurfaceData.java \
sun/awt/image/DataBufferNative.java \
\
sun/awt/motif/X11FontMetrics.java \
sun/awt/X11InputMethod.java \
sun/awt/motif/MFontConfiguration.java \
sun/awt/motif/MFontPeer.java \
sun/awt/motif/MToolkit.java \
sun/awt/DebugSettings.java \
sun/awt/EmbeddedFrame.java \
sun/awt/PlatformFont.java \
@ -93,7 +90,6 @@ FILES_export = \
sun/java2d/cmm/ColorTransform.java \
sun/awt/datatransfer/DataTransferer.java \
sun/awt/dnd/SunDragSourceContextPeer.java \
sun/awt/motif/MToolkitThreadBlockedHandler.java \
sun/java2d/opengl/OGLBlitLoops.java \
sun/java2d/opengl/OGLContext.java \
sun/java2d/opengl/OGLMaskFill.java \

View File

@ -31,7 +31,6 @@ SUNWprivate_1.1 {
global:
JNI_OnLoad;
#Java_sun_awt_motif_MComponentPeer_restoreFocus;
Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
Java_java_awt_AWTEvent_nativeSetSource;
@ -56,230 +55,11 @@ SUNWprivate_1.1 {
Java_sun_awt_UNIXToolkit_load_1stock_1icon;
Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
Java_sun_awt_UNIXToolkit_nativeSync;
#Java_sun_awt_motif_MButtonPeer_create;
#Java_sun_awt_motif_MButtonPeer_setLabel;
#Java_sun_awt_motif_MPanelPeer_pEnsureIndex;
#Java_sun_awt_motif_MPanelPeer_pRestack;
#Java_sun_awt_motif_MCanvasPeer_create;
#Java_sun_awt_motif_MCanvasPeer_initIDs;
#Java_sun_awt_motif_MCanvasPeer_resetTargetGC;
#Java_sun_awt_motif_MCheckboxMenuItemPeer_pSetState;
#Java_sun_awt_motif_MCheckboxPeer_create;
#Java_sun_awt_motif_MCheckboxPeer_setCheckboxGroup;
#Java_sun_awt_motif_MCheckboxPeer_setLabel;
#Java_sun_awt_motif_MCheckboxPeer_pSetState;
#Java_sun_awt_motif_MCheckboxPeer_pGetState;
#Java_sun_awt_motif_MChoicePeer_addItem;
#Java_sun_awt_motif_MChoicePeer_appendItems;
#Java_sun_awt_motif_MChoicePeer_create;
#Java_sun_awt_motif_MChoicePeer_pReshape;
#Java_sun_awt_motif_MChoicePeer_remove;
#Java_sun_awt_motif_MChoicePeer_removeAll;
#Java_sun_awt_motif_MChoicePeer_setBackground;
#Java_sun_awt_motif_MChoicePeer_pSelect;
#Java_sun_awt_motif_MChoicePeer_setFont;
#Java_sun_awt_motif_MChoicePeer_setForeground;
#Java_sun_awt_motif_MComponentPeer_addNativeDropTarget;
#Java_sun_awt_motif_MComponentPeer_getNativeColor;
#Java_sun_awt_motif_MComponentPeer_getWindow;
#Java_sun_awt_motif_MComponentPeer_pDisable;
#Java_sun_awt_motif_MComponentPeer_pDispose;
#Java_sun_awt_motif_MComponentPeer_pEnable;
#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen;
#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen2;
#Java_sun_awt_motif_MComponentPeer_pHide;
#Java_sun_awt_motif_MComponentPeer_pInitialize;
#Java_sun_awt_motif_MComponentPeer_pMakeCursorVisible;
#Java_sun_awt_motif_MComponentPeer_pReshape;
#Java_sun_awt_motif_MComponentPeer_pShow;
#Java_sun_awt_motif_MComponentPeer_removeNativeDropTarget;
#Java_sun_awt_motif_MComponentPeer_pSetBackground;
#Java_sun_awt_motif_MComponentPeer_pSetFont;
#Java_sun_awt_motif_MComponentPeer_processSynchronousLightweightTransfer;
#Java_sun_awt_motif_MComponentPeer__1requestFocus;
#Java_sun_awt_motif_MComponentPeer_getNativeFocusedWindow;
#Java_sun_awt_motif_MCheckboxMenuItemPeer_getState;
#Java_sun_awt_motif_MComponentPeer_pSetForeground;
#Java_sun_awt_motif_MDragSourceContextPeer_startDrag;
#Java_sun_awt_motif_MDragSourceContextPeer_setNativeCursor;
#Java_sun_awt_motif_MDropTargetContextPeer_addTransfer;
#Java_sun_awt_motif_MDropTargetContextPeer_dropDone;
#Java_sun_awt_motif_MDropTargetContextPeer_startTransfer;
#Java_sun_awt_motif_X11DragSourceContextPeer_startDrag;
#Java_sun_awt_motif_X11DragSourceContextPeer_setNativeCursor;
#Java_sun_awt_motif_X11DropTargetContextPeer_sendResponse;
#Java_sun_awt_motif_X11DropTargetContextPeer_dropDone;
#Java_sun_awt_motif_X11DropTargetContextPeer_getData;
#Java_sun_awt_motif_MEmbeddedFramePeer_NEFcreate;
#Java_sun_awt_motif_MEmbeddedFramePeer_pShowImpl;
#Java_sun_awt_motif_MEmbeddedFramePeer_requestXEmbedFocus;
#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedApplicationActive;
#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedActive;
#Java_sun_awt_motif_MEmbeddedFramePeer_synthesizeFocusInOut;
#Java_sun_awt_motif_MEmbeddedFramePeer_pReshapePrivate;
#Java_sun_awt_motif_MEmbeddedFramePeer_getBoundsPrivate;
#Java_sun_awt_motif_MEmbeddedFrame_getWidget;
#Java_sun_awt_motif_MEmbeddedFrame_mapWidget;
#Java_sun_awt_motif_MEmbedCanvasPeer_forwardEventToEmbedded;
#Java_sun_awt_motif_MFramePeer_pSetIconImage___3B_3I_3SII;
#Java_sun_awt_motif_MFileDialogPeer_create;
#Java_sun_awt_motif_MFileDialogPeer_pDispose;
#Java_sun_awt_motif_MFileDialogPeer_pHide;
#Java_sun_awt_motif_MFileDialogPeer_pReshape;
#Java_sun_awt_motif_MFileDialogPeer_pShow;
#Java_sun_awt_motif_MFileDialogPeer_setFileEntry;
#Java_sun_awt_motif_MFileDialogPeer_setFont;
#Java_sun_awt_motif_MFramePeer_pGetIconSize;
#Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
#Java_sun_awt_motif_MGlobalCursorManager_findComponentAt;
#Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
#Java_sun_awt_motif_MGlobalCursorManager_getCursorPos;
#Java_sun_awt_motif_MGlobalCursorManager_getLocationOnScreen;
#Java_sun_awt_motif_MLabelPeer_create;
#Java_sun_awt_motif_MLabelPeer_setAlignment;
#Java_sun_awt_motif_MLabelPeer_setText;
#Java_sun_awt_motif_MListPeer_addItem;
#Java_sun_awt_motif_MListPeer_create;
#Java_sun_awt_motif_MListPeer_delItems;
#Java_sun_awt_motif_MListPeer_deselect;
#Java_sun_awt_motif_MListPeer_isSelected;
#Java_sun_awt_motif_MListPeer_makeVisible;
#Java_sun_awt_motif_MListPeer_nativeHandleMouseWheel;
#Java_sun_awt_motif_MListPeer_select;
#Java_sun_awt_motif_MListPeer_setMultipleSelections;
#Java_sun_awt_motif_MMenuBarPeer_create;
#Java_sun_awt_motif_MMenuItemPeer_createMenuItem;
#Java_sun_awt_motif_MMenuItemPeer_pDisable;
#Java_sun_awt_motif_MMenuItemPeer_pDispose;
#Java_sun_awt_motif_MMenuItemPeer_pEnable;
#Java_sun_awt_motif_MMenuItemPeer_pSetLabel;
#Java_sun_awt_motif_MMenuPeer_createMenu;
#Java_sun_awt_motif_MMenuPeer_createSubMenu;
#Java_sun_awt_motif_MMenuPeer_pDispose;
#Java_sun_awt_motif_MPopupMenuPeer_createMenu;
#Java_sun_awt_motif_MPopupMenuPeer_pDispose;
#Java_sun_awt_motif_MPopupMenuPeer_pShow;
#Java_sun_awt_motif_MRobotPeer_getRGBPixelsImpl;
#Java_sun_awt_motif_MRobotPeer_keyPressImpl;
#Java_sun_awt_motif_MRobotPeer_keyReleaseImpl;
#Java_sun_awt_motif_MRobotPeer_mouseMoveImpl;
#Java_sun_awt_motif_MRobotPeer_mousePressImpl;
#Java_sun_awt_motif_MRobotPeer_mouseReleaseImpl;
#Java_sun_awt_motif_MRobotPeer_mouseWheelImpl;
#Java_sun_awt_motif_MRobotPeer_setup;
#Java_sun_awt_motif_MScrollbarPeer_create;
#Java_sun_awt_motif_MScrollbarPeer_setLineIncrement;
#Java_sun_awt_motif_MScrollbarPeer_setPageIncrement;
#Java_sun_awt_motif_MScrollbarPeer_pSetValues;
#Java_sun_awt_motif_MScrollPanePeer_create;
#Java_sun_awt_motif_MScrollPanePeer_pGetBlockIncrement;
#Java_sun_awt_motif_MScrollPanePeer_pGetScrollbarSpace;
#Java_sun_awt_motif_MScrollPanePeer_pGetShadow;
#Java_sun_awt_motif_MScrollPanePeer_pInsets;
#Java_sun_awt_motif_MScrollPanePeer_pSetIncrement;
#Java_sun_awt_motif_MScrollPanePeer_pSetScrollChild;
#Java_sun_awt_motif_MScrollPanePeer_setScrollPosition;
#Java_sun_awt_motif_MScrollPanePeer_setTypedValue;
#Java_sun_awt_motif_MTextAreaPeer_initIDs;
#Java_sun_awt_motif_MTextAreaPeer_pCreate;
#Java_sun_awt_motif_MTextAreaPeer_getCaretPosition;
#Java_sun_awt_motif_MTextAreaPeer_getExtraHeight;
#Java_sun_awt_motif_MTextAreaPeer_getExtraWidth;
#Java_sun_awt_motif_MTextAreaPeer_getSelectionEnd;
#Java_sun_awt_motif_MTextAreaPeer_getSelectionStart;
#Java_sun_awt_motif_MTextAreaPeer_getText;
#Java_sun_awt_motif_MTextAreaPeer_insert;
#Java_sun_awt_motif_MTextAreaPeer_nativeHandleMouseWheel;
#Java_sun_awt_motif_MTextAreaPeer_pMakeCursorVisible;
#Java_sun_awt_motif_MTextAreaPeer_pSetEditable;
#Java_sun_awt_motif_MTextAreaPeer_pShow2;
#Java_sun_awt_motif_MTextAreaPeer_replaceRange;
#Java_sun_awt_motif_MTextAreaPeer_select;
#Java_sun_awt_motif_MTextAreaPeer_setCaretPosition;
#Java_sun_awt_motif_MTextAreaPeer_setFont;
#Java_sun_awt_motif_MTextAreaPeer_setText;
#Java_sun_awt_motif_MTextAreaPeer_setTextBackground;
#Java_sun_awt_motif_MTextFieldPeer_initIDs;
#Java_sun_awt_motif_MTextFieldPeer_pCreate;
#Java_sun_awt_motif_MTextFieldPeer_getCaretPosition;
#Java_sun_awt_motif_MTextFieldPeer_getSelectionEnd;
#Java_sun_awt_motif_MTextFieldPeer_getSelectionStart;
#Java_sun_awt_motif_MTextFieldPeer_getText;
#Java_sun_awt_motif_MTextFieldPeer_insertReplaceText;
#Java_sun_awt_motif_MTextFieldPeer_preDispose;
#Java_sun_awt_motif_MTextFieldPeer_pSetEditable;
#Java_sun_awt_motif_MTextFieldPeer_select;
#Java_sun_awt_motif_MTextFieldPeer_setCaretPosition;
#Java_sun_awt_motif_MTextFieldPeer_setEchoChar;
#Java_sun_awt_motif_MTextFieldPeer_setFont;
#Java_sun_awt_motif_MTextFieldPeer_setText;
Java_sun_awt_motif_MToolkit_beep;
Java_sun_awt_motif_MToolkit_getLockingKeyStateNative;
Java_sun_awt_motif_MToolkit_getMulticlickTime;
Java_sun_awt_motif_MToolkit_getNumMouseButtons;
Java_sun_awt_motif_MToolkit_loadXSettings;
Java_sun_awt_motif_MToolkit_getScreenHeight;
Java_sun_awt_motif_MToolkit_getScreenResolution;
Java_sun_awt_motif_MToolkit_getScreenWidth;
Java_sun_awt_motif_MToolkit_init;
Java_sun_awt_motif_MToolkit_isDynamicLayoutSupportedNative;
Java_sun_awt_motif_MToolkit_isFrameStateSupported;
Java_sun_awt_motif_MToolkit_loadSystemColors;
Java_sun_awt_motif_MToolkit_makeColorModel;
Java_sun_awt_motif_MToolkit_run;
Java_sun_awt_motif_MToolkit_isAlwaysOnTopSupported;
Java_sun_awt_motif_MToolkit_getEventNumber;
Java_sun_awt_motif_MToolkit_updateSyncSelection;
Java_sun_awt_motif_MToolkit_isSyncUpdated;
Java_sun_awt_motif_MToolkit_isSyncFailed;
Java_sun_awt_motif_MToolkit_nativeUnGrab;
Java_sun_awt_motif_MToolkit_nativeGrab;
Java_sun_awt_motif_MToolkit_getWMName;
Java_sun_awt_motif_MWindowAttributes_initIDs;
#Java_sun_awt_motif_MWindowPeer_pDispose;
#Java_sun_awt_motif_MWindowPeer_pHide;
#Java_sun_awt_motif_MWindowPeer_pReshape;
#Java_sun_awt_motif_MWindowPeer_pSetTitle;
#Java_sun_awt_motif_MWindowPeer_pShow;
#Java_sun_awt_motif_MWindowPeer_setResizable;
#Java_sun_awt_motif_MWindowPeer_toBack;
#Java_sun_awt_motif_MWindowPeer_addTextComponentNative;
#Java_sun_awt_motif_MWindowPeer_getState;
#Java_sun_awt_motif_MWindowPeer_pSetIMMOption;
#Java_sun_awt_motif_MWindowPeer_pSetMenuBar;
#Java_sun_awt_motif_MWindowPeer_pShowModal;
#Java_sun_awt_motif_MWindowPeer_removeTextComponentNative;
#Java_sun_awt_motif_MWindowPeer_setSaveUnder;
#Java_sun_awt_motif_MWindowPeer_setState;
#Java_sun_awt_motif_MWindowPeer_resetTargetGC;
#Java_sun_awt_motif_MWindowPeer_registerX11DropTarget;
#Java_sun_awt_motif_MWindowPeer_unregisterX11DropTarget;
#Java_sun_awt_motif_MWindowPeer_updateAlwaysOnTop;
#Java_sun_awt_motif_MWindowPeer_setFocusableWindow;
#Java_sun_awt_motif_MWindowPeer_pToFront;
#Java_sun_awt_motif_MCustomCursor_cacheInit;
#Java_sun_awt_motif_MCustomCursor_createCursor;
#Java_sun_awt_motif_MCustomCursor_queryBestCursor;
Java_sun_awt_motif_X11FontMetrics_bytesWidth;
Java_sun_awt_motif_X11FontMetrics_getMFCharsWidth;
Java_sun_awt_motif_X11FontMetrics_init;
Java_sun_awt_X11InputMethod_disposeXIC;
Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
Java_sun_awt_X11InputMethod_resetXIC;
Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
Java_sun_awt_X11InputMethod_turnoffStatusWindow;
#Java_sun_awt_motif_MInputMethod_openXIMNative;
#Java_sun_awt_motif_MInputMethod_configureStatusAreaNative;
#Java_sun_awt_motif_MInputMethod_createXICNative;
#Java_sun_awt_motif_MInputMethod_reconfigureXICNative;
#Java_sun_awt_motif_MInputMethod_setXICFocusNative;
#Java_sun_awt_motif_X11Clipboard_getClipboardData;
#Java_sun_awt_motif_X11Clipboard_getClipboardFormats;
#Java_sun_awt_motif_X11Clipboard_registerClipboardViewer;
#Java_sun_awt_motif_X11Clipboard_unregisterClipboardViewer;
#Java_sun_awt_motif_X11Selection_init;
#Java_sun_awt_motif_X11Selection_pGetSelectionOwnership;
#Java_sun_awt_motif_X11Selection_clearNativeContext;
Java_sun_awt_SunToolkit_closeSplashScreen;
Java_sun_awt_PlatformFont_initIDs;
Java_sun_awt_X11GraphicsConfig_init;
@ -313,25 +93,6 @@ SUNWprivate_1.1 {
Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
Java_sun_awt_X11GraphicsEnvironment_initXRender;
#Java_sun_awt_motif_MEmbedCanvasPeer_initXEmbedServer;
#Java_sun_awt_motif_MEmbedCanvasPeer_destroyXEmbedServer;
#Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive;
#Java_sun_awt_motif_MEmbedCanvasPeer_initDispatching;
#Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching;
#Java_sun_awt_motif_MEmbedCanvasPeer_embedChild;
#Java_sun_awt_motif_MEmbedCanvasPeer_childDestroyed;
#Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedPreferredSize;
#Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedMinimumSize;
#Java_sun_awt_motif_MEmbedCanvasPeer_getClientBounds;
#Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded;
#Java_sun_awt_motif_MEmbedCanvasPeer_detachChild;
#Java_sun_awt_motif_MEmbedCanvasPeer_forwardKeyEvent;
#Java_sun_awt_motif_MEmbedCanvasPeer_getAWTKeyCodeForKeySym;
#Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__I;
#Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__IJJJ;
#Java_sun_awt_motif_MEmbedCanvasPeer_getWindow;
#Java_sun_awt_motif_GrabbedKey_initKeySymAndModifiers;
#Java_sun_awt_motif_MEmbeddedFramePeer_traverseOut;
Java_java_awt_AWTEvent_initIDs;
Java_java_awt_Button_initIDs;
Java_java_awt_Container_initIDs;
@ -345,41 +106,6 @@ SUNWprivate_1.1 {
Java_java_awt_Insets_initIDs;
Java_java_awt_TextField_initIDs;
Java_java_awt_Window_initIDs;
#Java_sun_awt_motif_MCheckboxPeer_getIndicatorSize;
#Java_sun_awt_motif_MCheckboxPeer_getSpacing;
#Java_sun_awt_motif_MChoicePeer_freeNativeData;
#Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
#Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
#Java_sun_awt_motif_MComponentPeer_initIDs;
#Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
#Java_sun_awt_motif_MComponentPeer_pSetCursor;
#Java_sun_awt_motif_MComponentPeer_pSetInnerForeground;
#Java_sun_awt_motif_MComponentPeer_pSetScrollbarBackground;
#Java_sun_awt_motif_MComponentPeer_setTargetBackground;
#Java_sun_awt_motif_MDataTransferer_dragQueryFile;
#Java_sun_awt_motif_MDataTransferer_getAtomForTarget;
#Java_sun_awt_motif_MDataTransferer_getTargetNameForAtom;
#Java_sun_awt_motif_MFileDialogPeer_insertReplaceFileDialogText;
Java_sun_awt_motif_MFontPeer_initIDs;
#Java_sun_awt_motif_MListPeer_setBackground;
#Java_sun_awt_motif_MMenuBarPeer_initIDs;
#Java_sun_awt_motif_MMenuBarPeer_pDispose;
#Java_sun_awt_motif_MMenuItemPeer_getParent_1NoClientCode;
#Java_sun_awt_motif_MMenuItemPeer_initIDs;
#Java_sun_awt_motif_MMenuItemPeer_pSetShortcut;
#Java_sun_awt_motif_MPopupMenuPeer_initIDs;
#Java_sun_awt_motif_MScrollbarPeer_initIDs;
#Java_sun_awt_motif_MScrollPanePeer_initIDs;
#Java_sun_awt_motif_MTextAreaPeer_pSetCursor;
Java_sun_awt_motif_MToolkit_shutdown;
#Java_sun_awt_motif_MWindowPeer_initIDs;
#Java_sun_awt_motif_MWindowPeer_pCreate;
#Java_sun_awt_motif_MWindowPeer_wrapInSequenced;
Java_sun_awt_motif_X11FontMetrics_initIDs;
#Java_sun_awt_X11InputMethod_initIDs;
#Java_sun_awt_motif_X11Selection_initIDs;
Java_sun_awt_motif_MToolkitThreadBlockedHandler_enter;
Java_sun_awt_motif_MToolkitThreadBlockedHandler_exit;
Java_sun_awt_X11GraphicsConfig_init;
Java_sun_awt_X11GraphicsConfig_initIDs;
Java_sun_awt_X11GraphicsConfig_makeColorModel;

View File

@ -170,7 +170,6 @@ SUNWprivate_1.1 {
GrPrim_Sg2dGetPixel;
GrPrim_Sg2dGetLCDTextContrast;
#Java_sun_awt_motif_MComponentPeer_restoreFocus;
Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
Java_java_awt_AWTEvent_nativeSetSource;
@ -189,216 +188,11 @@ SUNWprivate_1.1 {
Java_java_awt_ScrollPane_initIDs;
Java_java_awt_TextArea_initIDs;
Java_sun_awt_FontDescriptor_initIDs;
#Java_sun_awt_motif_MButtonPeer_create;
#Java_sun_awt_motif_MButtonPeer_setLabel;
#Java_sun_awt_motif_MCanvasPeer_create;
#Java_sun_awt_motif_MCanvasPeer_initIDs;
#Java_sun_awt_motif_MCanvasPeer_resetTargetGC;
#Java_sun_awt_motif_MCheckboxMenuItemPeer_pSetState;
#Java_sun_awt_motif_MCheckboxPeer_create;
#Java_sun_awt_motif_MCheckboxPeer_setCheckboxGroup;
#Java_sun_awt_motif_MCheckboxPeer_setLabel;
#Java_sun_awt_motif_MCheckboxPeer_pSetState;
#Java_sun_awt_motif_MCheckboxPeer_pGetState;
#Java_sun_awt_motif_MChoicePeer_addItem;
#Java_sun_awt_motif_MChoicePeer_appendItems;
#Java_sun_awt_motif_MChoicePeer_create;
#Java_sun_awt_motif_MChoicePeer_pReshape;
#Java_sun_awt_motif_MChoicePeer_remove;
#Java_sun_awt_motif_MChoicePeer_removeAll;
#Java_sun_awt_motif_MChoicePeer_setBackground;
#Java_sun_awt_motif_MChoicePeer_pSelect;
#Java_sun_awt_motif_MChoicePeer_setFont;
#Java_sun_awt_motif_MChoicePeer_setForeground;
#Java_sun_awt_motif_MComponentPeer_addNativeDropTarget;
#Java_sun_awt_motif_MComponentPeer_createBackBuffer;
#Java_sun_awt_motif_MComponentPeer_destroyBackBuffer;
#Java_sun_awt_motif_MComponentPeer_getNativeColor;
#Java_sun_awt_motif_MComponentPeer_getWindow;
#Java_sun_awt_motif_MComponentPeer_pDisable;
#Java_sun_awt_motif_MComponentPeer_pDispose;
#Java_sun_awt_motif_MComponentPeer_pEnable;
#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen;
#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen2;
#Java_sun_awt_motif_MComponentPeer_pHide;
#Java_sun_awt_motif_MComponentPeer_pInitialize;
#Java_sun_awt_motif_MComponentPeer_pMakeCursorVisible;
#Java_sun_awt_motif_MComponentPeer_pReshape;
#Java_sun_awt_motif_MComponentPeer_pShow;
#Java_sun_awt_motif_MComponentPeer_removeNativeDropTarget;
#Java_sun_awt_motif_MComponentPeer_swapBuffers;
#Java_sun_awt_motif_MComponentPeer_pSetBackground;
#Java_sun_awt_motif_MComponentPeer_pSetFont;
#Java_sun_awt_motif_MComponentPeer_processSynchronousLightweightTransfer;
#Java_sun_awt_motif_MComponentPeer__1requestFocus;
#Java_sun_awt_motif_MCheckboxMenuItemPeer_getState;
#Java_sun_awt_motif_MComponentPeer_pSetForeground;
#Java_sun_awt_motif_MDragSourceContextPeer_startDrag;
#Java_sun_awt_motif_MDragSourceContextPeer_setNativeCursor;
#Java_sun_awt_motif_MDropTargetContextPeer_addTransfer;
#Java_sun_awt_motif_MDropTargetContextPeer_dropDone;
#Java_sun_awt_motif_MDropTargetContextPeer_startTransfer;
#Java_sun_awt_motif_X11DragSourceContextPeer_startDrag;
#Java_sun_awt_motif_X11DragSourceContextPeer_setNativeCursor;
#Java_sun_awt_motif_X11DropTargetContextPeer_sendResponse;
#Java_sun_awt_motif_X11DropTargetContextPeer_dropDone;
#Java_sun_awt_motif_X11DropTargetContextPeer_getData;
#Java_sun_awt_motif_MEmbeddedFramePeer_NEFcreate;
#Java_sun_awt_motif_MEmbeddedFramePeer_pShowImpl;
#Java_sun_awt_motif_MEmbeddedFramePeer_pReshapePrivate;
#Java_sun_awt_motif_MEmbeddedFramePeer_getBoundsPrivate;
#Java_sun_awt_motif_MFramePeer_pSetIconImage___3B_3I_3SII;
#Java_sun_awt_motif_MEmbeddedFramePeer_requestXEmbedFocus;
#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedApplicationActive;
#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedActive;
#Java_sun_awt_motif_MEmbeddedFrame_getWidget;
#Java_sun_awt_motif_MEmbeddedFrame_mapWidget;
#Java_sun_awt_motif_MFileDialogPeer_create;
#Java_sun_awt_motif_MFileDialogPeer_pDispose;
#Java_sun_awt_motif_MFileDialogPeer_pHide;
#Java_sun_awt_motif_MFileDialogPeer_pReshape;
#Java_sun_awt_motif_MFileDialogPeer_pShow;
#Java_sun_awt_motif_MFileDialogPeer_setFileEntry;
#Java_sun_awt_motif_MFileDialogPeer_setFont;
#Java_sun_awt_motif_MFramePeer_pGetIconSize;
#Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
#Java_sun_awt_motif_MGlobalCursorManager_findComponentAt;
#Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
#Java_sun_awt_motif_MGlobalCursorManager_getCursorPos;
#Java_sun_awt_motif_MGlobalCursorManager_getLocationOnScreen;
#Java_sun_awt_motif_MLabelPeer_create;
#Java_sun_awt_motif_MLabelPeer_setAlignment;
#Java_sun_awt_motif_MLabelPeer_setText;
#Java_sun_awt_motif_MListPeer_addItem;
#Java_sun_awt_motif_MListPeer_create;
#Java_sun_awt_motif_MListPeer_delItems;
#Java_sun_awt_motif_MListPeer_deselect;
#Java_sun_awt_motif_MListPeer_isSelected;
#Java_sun_awt_motif_MListPeer_makeVisible;
#Java_sun_awt_motif_MListPeer_select;
#Java_sun_awt_motif_MListPeer_setMultipleSelections;
#Java_sun_awt_motif_MMenuBarPeer_create;
#Java_sun_awt_motif_MMenuItemPeer_createMenuItem;
#Java_sun_awt_motif_MMenuItemPeer_pDisable;
#Java_sun_awt_motif_MMenuItemPeer_pDispose;
#Java_sun_awt_motif_MMenuItemPeer_pEnable;
#Java_sun_awt_motif_MMenuItemPeer_pSetLabel;
#Java_sun_awt_motif_MMenuPeer_createMenu;
#Java_sun_awt_motif_MMenuPeer_createSubMenu;
#Java_sun_awt_motif_MMenuPeer_pDispose;
#Java_sun_awt_motif_MPopupMenuPeer_createMenu;
#Java_sun_awt_motif_MPopupMenuPeer_pDispose;
#Java_sun_awt_motif_MPopupMenuPeer_pShow;
#Java_sun_awt_motif_MRobotPeer_getRGBPixelsImpl;
#Java_sun_awt_motif_MRobotPeer_keyPressImpl;
#Java_sun_awt_motif_MRobotPeer_keyReleaseImpl;
#Java_sun_awt_motif_MRobotPeer_mouseMoveImpl;
#Java_sun_awt_motif_MRobotPeer_mousePressImpl;
#Java_sun_awt_motif_MRobotPeer_mouseReleaseImpl;
#Java_sun_awt_motif_MRobotPeer_mouseWheelImpl;
#Java_sun_awt_motif_MRobotPeer_setup;
#Java_sun_awt_motif_MScrollbarPeer_create;
#Java_sun_awt_motif_MScrollbarPeer_setLineIncrement;
#Java_sun_awt_motif_MScrollbarPeer_setPageIncrement;
#Java_sun_awt_motif_MScrollbarPeer_pSetValues;
#Java_sun_awt_motif_MScrollPanePeer_create;
#Java_sun_awt_motif_MScrollPanePeer_pGetBlockIncrement;
#Java_sun_awt_motif_MScrollPanePeer_pGetScrollbarSpace;
#Java_sun_awt_motif_MScrollPanePeer_pGetShadow;
#Java_sun_awt_motif_MScrollPanePeer_pInsets;
#Java_sun_awt_motif_MScrollPanePeer_pSetIncrement;
#Java_sun_awt_motif_MScrollPanePeer_pSetScrollChild;
#Java_sun_awt_motif_MScrollPanePeer_setScrollPosition;
#Java_sun_awt_motif_MTextAreaPeer_initIDs;
#Java_sun_awt_motif_MTextAreaPeer_pCreate;
#Java_sun_awt_motif_MTextAreaPeer_getCaretPosition;
#Java_sun_awt_motif_MTextAreaPeer_getExtraHeight;
#Java_sun_awt_motif_MTextAreaPeer_getExtraWidth;
#Java_sun_awt_motif_MTextAreaPeer_getSelectionEnd;
#Java_sun_awt_motif_MTextAreaPeer_getSelectionStart;
#Java_sun_awt_motif_MTextAreaPeer_getText;
#Java_sun_awt_motif_MTextAreaPeer_insert;
#Java_sun_awt_motif_MTextAreaPeer_pMakeCursorVisible;
#Java_sun_awt_motif_MTextAreaPeer_pSetEditable;
#Java_sun_awt_motif_MTextAreaPeer_pShow2;
#Java_sun_awt_motif_MTextAreaPeer_replaceRange;
#Java_sun_awt_motif_MTextAreaPeer_select;
#Java_sun_awt_motif_MTextAreaPeer_setCaretPosition;
#Java_sun_awt_motif_MTextAreaPeer_setFont;
#Java_sun_awt_motif_MTextAreaPeer_setText;
#Java_sun_awt_motif_MTextAreaPeer_setTextBackground;
#Java_sun_awt_motif_MTextFieldPeer_initIDs;
#Java_sun_awt_motif_MTextFieldPeer_pCreate;
#Java_sun_awt_motif_MTextFieldPeer_getCaretPosition;
#Java_sun_awt_motif_MTextFieldPeer_getSelectionEnd;
#Java_sun_awt_motif_MTextFieldPeer_getSelectionStart;
#Java_sun_awt_motif_MTextFieldPeer_getText;
#Java_sun_awt_motif_MTextFieldPeer_insertReplaceText;
#Java_sun_awt_motif_MTextFieldPeer_preDispose;
#Java_sun_awt_motif_MTextFieldPeer_pSetEditable;
#Java_sun_awt_motif_MTextFieldPeer_select;
#Java_sun_awt_motif_MTextFieldPeer_setCaretPosition;
#Java_sun_awt_motif_MTextFieldPeer_setEchoChar;
#Java_sun_awt_motif_MTextFieldPeer_setFont;
#Java_sun_awt_motif_MTextFieldPeer_setText;
Java_sun_awt_motif_MToolkit_beep;
Java_sun_awt_motif_MToolkit_getLockingKeyStateNative;
Java_sun_awt_motif_MToolkit_getMulticlickTime;
Java_sun_awt_motif_MToolkit_getNumMouseButtons;
Java_sun_awt_motif_MToolkit_getScreenHeight;
Java_sun_awt_motif_MToolkit_getScreenResolution;
Java_sun_awt_motif_MToolkit_getScreenWidth;
Java_sun_awt_motif_MToolkit_init;
Java_sun_awt_motif_MToolkit_isDynamicLayoutSupportedNative;
Java_sun_awt_motif_MToolkit_isFrameStateSupported;
Java_sun_awt_motif_MToolkit_loadSystemColors;
Java_sun_awt_motif_MToolkit_makeColorModel;
Java_sun_awt_motif_MToolkit_run;
Java_sun_awt_motif_MToolkit_sync;
Java_sun_awt_motif_MToolkit_isAlwaysOnTopSupported;
Java_sun_awt_motif_MWindowAttributes_initIDs;
#Java_sun_awt_motif_MWindowPeer_pDispose;
#Java_sun_awt_motif_MWindowPeer_pHide;
#Java_sun_awt_motif_MWindowPeer_pReshape;
#Java_sun_awt_motif_MWindowPeer_pSetTitle;
#Java_sun_awt_motif_MWindowPeer_pShow;
#Java_sun_awt_motif_MWindowPeer_setResizable;
#Java_sun_awt_motif_MWindowPeer_toBack;
#Java_sun_awt_motif_MWindowPeer_addTextComponentNative;
#Java_sun_awt_motif_MWindowPeer_getState;
#Java_sun_awt_motif_MWindowPeer_pSetIMMOption;
#Java_sun_awt_motif_MWindowPeer_pSetMenuBar;
#Java_sun_awt_motif_MWindowPeer_pShowModal;
#Java_sun_awt_motif_MWindowPeer_removeTextComponentNative;
#Java_sun_awt_motif_MWindowPeer_setSaveUnder;
#Java_sun_awt_motif_MWindowPeer_setState;
#Java_sun_awt_motif_MWindowPeer_resetTargetGC;
#Java_sun_awt_motif_MWindowPeer_registerX11DropTarget;
#Java_sun_awt_motif_MWindowPeer_unregisterX11DropTarget;
#Java_sun_awt_motif_MWindowPeer_updateAlwaysOnTop;
#Java_sun_awt_motif_X11CustomCursor_cacheInit;
#Java_sun_awt_motif_X11CustomCursor_createCursor;
#Java_sun_awt_motif_X11CustomCursor_queryBestCursor;
Java_sun_awt_motif_X11FontMetrics_bytesWidth;
Java_sun_awt_motif_X11FontMetrics_getMFCharsWidth;
Java_sun_awt_motif_X11FontMetrics_init;
Java_sun_awt_X11InputMethod_disposeXIC;
Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
Java_sun_awt_X11InputMethod_resetXIC;
Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
Java_sun_awt_X11InputMethod_turnoffStatusWindow;
#Java_sun_awt_motif_MInputMethod_openXIMNative;
#Java_sun_awt_motif_MInputMethod_configureStatusAreaNative;
#Java_sun_awt_motif_MInputMethod_createXICNative;
#Java_sun_awt_motif_MInputMethod_reconfigureXICNative;
#Java_sun_awt_motif_MInputMethod_setXICFocusNative;
#Java_sun_awt_motif_X11Clipboard_getClipboardData;
#Java_sun_awt_motif_X11Clipboard_getClipboardFormats;
#Java_sun_awt_motif_X11Clipboard_registerClipboardViewer;
#Java_sun_awt_motif_X11Clipboard_unregisterClipboardViewer;
#Java_sun_awt_motif_X11Selection_init;
#Java_sun_awt_motif_X11Selection_pGetSelectionOwnership;
#Java_sun_awt_motif_X11Selection_clearNativeContext;
Java_sun_awt_SunToolkit_closeSplashScreen;
Java_sun_awt_PlatformFont_initIDs;
Java_sun_awt_X11GraphicsConfig_init;
@ -444,42 +238,7 @@ SUNWprivate_1.1 {
Java_java_awt_Insets_initIDs;
Java_java_awt_TextField_initIDs;
Java_java_awt_Window_initIDs;
#Java_sun_awt_motif_MCheckboxPeer_getIndicatorSize;
#Java_sun_awt_motif_MCheckboxPeer_getSpacing;
#Java_sun_awt_motif_MChoicePeer_freeNativeData;
#Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
#Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
#Java_sun_awt_motif_MComponentPeer_initIDs;
#Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
#Java_sun_awt_motif_MComponentPeer_pSetCursor;
#Java_sun_awt_motif_MComponentPeer_pSetInnerForeground;
#Java_sun_awt_motif_MComponentPeer_pSetScrollbarBackground;
#Java_sun_awt_motif_MComponentPeer_setTargetBackground;
#Java_sun_awt_motif_MDataTransferer_dragQueryFile;
#Java_sun_awt_motif_MDataTransferer_getAtomForTarget;
#Java_sun_awt_motif_MDataTransferer_getTargetNameForAtom;
#Java_sun_awt_motif_MFileDialogPeer_insertReplaceFileDialogText;
Java_sun_awt_motif_MFontPeer_initIDs;
#Java_sun_awt_motif_MListPeer_setBackground;
#Java_sun_awt_motif_MMenuBarPeer_initIDs;
#Java_sun_awt_motif_MMenuBarPeer_pDispose;
#Java_sun_awt_motif_MMenuItemPeer_getParent_1NoClientCode;
#Java_sun_awt_motif_MMenuItemPeer_initIDs;
#Java_sun_awt_motif_MMenuItemPeer_pSetShortcut;
#Java_sun_awt_motif_MPopupMenuPeer_initIDs;
#Java_sun_awt_motif_MScrollbarPeer_initIDs;
#Java_sun_awt_motif_MScrollPanePeer_initIDs;
#Java_sun_awt_motif_MTextAreaPeer_pSetCursor;
Java_sun_awt_motif_MToolkit_shutdown;
#Java_sun_awt_motif_MWindowPeer_initIDs;
#Java_sun_awt_motif_MWindowPeer_pCreate;
#Java_sun_awt_motif_MWindowPeer_wrapInSequenced;
Java_sun_awt_motif_X11FontMetrics_initIDs;
#Java_sun_awt_X11InputMethod_initIDs;
Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
#Java_sun_awt_motif_X11Selection_initIDs;
Java_sun_awt_motif_MToolkitThreadBlockedHandler_enter;
Java_sun_awt_motif_MToolkitThreadBlockedHandler_exit;
Java_sun_awt_X11GraphicsConfig_init;
Java_sun_awt_X11GraphicsConfig_initIDs;
Java_sun_awt_X11GraphicsConfig_makeColorModel;
@ -505,26 +264,6 @@ SUNWprivate_1.1 {
Java_sun_awt_X11SurfaceData_isDgaAvailable;
Java_sun_awt_X11SurfaceData_setInvalid;
Java_sun_awt_X11SurfaceData_flushNativeSurface;
#Java_sun_awt_motif_MEmbedCanvasPeer_initXEmbedServer;
#Java_sun_awt_motif_MEmbedCanvasPeer_destroyXEmbedServer;
#Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive;
#Java_sun_awt_motif_MEmbedCanvasPeer_initDispatching;
#Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching;
#Java_sun_awt_motif_MEmbedCanvasPeer_embedChild;
#Java_sun_awt_motif_MEmbedCanvasPeer_childDestroyed;
#Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedPreferredSize;
#Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedMinimumSize;
#Java_sun_awt_motif_MEmbedCanvasPeer_getClientBounds;
#Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded;
#Java_sun_awt_motif_MEmbedCanvasPeer_detachChild;
#Java_sun_awt_motif_MEmbedCanvasPeer_forwardKeyEvent;
#Java_sun_awt_motif_MEmbedCanvasPeer_getAWTKeyCodeForKeySym;
#Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__I;
#Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__IJJJ;
#Java_sun_awt_motif_MEmbedCanvasPeer_getWindow;
#Java_sun_awt_motif_MEmbedCanvasPeer_forwardEventToEmbedded;
#Java_sun_awt_motif_GrabbedKey_initKeySymAndModifiers;
#Java_sun_awt_motif_MEmbeddedFramePeer_traverseOut;
awt_display;
awt_lock;
awt_Lock;

View File

@ -41,13 +41,7 @@ include $(BUILDDIR)/sun/awt/FILES_export_unix.gmk
# Check which C files should be built. Headless uses only
# non-motif files. Also, a version-specific motif file is
# compiled based on the motif version.
ifdef HEADLESS
FILES_c = $(FILES_NO_MOTIF_c)
else
# FILES_c = $(FILES_MOTIF_c) $(FILES_NO_MOTIF_c)
# XXX if in FILES_MOTIF_c there are unrelated to motif stuff, create a separate list!
FILES_c = $(FILES_NO_MOTIF_c)
endif
FILES_c = $(FILES_NO_MOTIF_c)
ifeq ($(PLATFORM), solaris)
ifneq ($(ARCH), amd64)
@ -116,32 +110,6 @@ CFLAGS += -DHEADLESS=$(HEADLESS)
CPPFLAGS += -DHEADLESS=$(HEADLESS)
OTHER_LDLIBS =
else
#CFLAGS += -DMOTIF_VERSION=$(MOTIF_VERSION)
#ifeq ($(STATIC_MOTIF),true)
# LIBXM = $(MOTIF_LIB)/libXm.a -lXp -lXmu
# ifeq ($(PLATFORM), linux)
# ifeq ($(ARCH_DATA_MODEL), 64)
# LIBXT = -lXt
# else
# # Allows for builds on Debian GNU Linux, X11 is in a different place
# LIBXT = $(firstword $(wildcard /usr/X11R6/lib/libXt.a) \
# $(wildcard /usr/lib/libXt.a))
# LIBSM = $(firstword $(wildcard /usr/X11R6/lib/libSM.a) \
# $(wildcard /usr/lib/libSM.a))
# LIBICE = $(firstword $(wildcard /usr/X11R6/lib/libICE.a) \
# $(wildcard /usr/lib/libICE.a))
# endif
# endif
#else
# LIBXM = -L$(MOTIF_LIB) -lXm -lXp
# ifeq ($(PLATFORM), linux)
# LIBXT = -lXt
# LIBSM =
# LIBICE =
# endif
#endif
LIBXTST = -lXtst
ifeq ($(PLATFORM), linux)
ifeq ($(ARCH_DATA_MODEL), 64)

View File

@ -1,216 +0,0 @@
data = R0x2000;
text = LOAD ?RXO;
# Test Null
# Test Exit
# Test Hello
# Test Sleep
# Test IntToString
# Test LoadToolkit
text: .text%JNI_OnLoad;
text: .text%awt_util_debug_init;
text: .text%Java_sun_awt_X11GraphicsEnvironment_initDisplay;
text: .text%awt_init_Display;
text: .text%makeDefaultConfig: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_GraphicsEnv.o;
text: .text%awt_allocate_colors;
text: .text%alloc_col: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11Color.o;
text: .text%getVirtCubeSize;
text: .text%uname: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11Color.o;
text: .text%Java_sun_awt_font_NativeFontWrapper_getFontPath;
text: .text%getPlatformFontPathChars: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%getSolarisFontLocations: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%fstat: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%AppendFont: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%freePlatformFontPathChars: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%checkFont: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_Font.o;
text: .text%Java_sun_awt_X11GraphicsEnvironment_getNativeFonts;
text: .text%Java_sun_awt_font_NativeFontWrapper_setNativeFontPath;
text: .text%isDisplayLocal;
text: .text%Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
text: .text%TryInitMITShm: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_GraphicsEnv.o;
text: .text%awt_output_flush;
text: .text%awtJNI_TimeMillis: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%AddFontsToX11FontPath: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
text: .text%Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
text: .text%Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
text: .text%Java_sun_awt_X11GraphicsDevice_isDBESupported;
text: .text%Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
text: .text%Java_sun_awt_X11GraphicsConfig_initIDs;
text: .text%Java_sun_awt_X11GraphicsConfig_init;
text: .text%getAllConfigs: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_GraphicsEnv.o;
text: .text%Java_sun_awt_motif_MToolkit_init;
text: .text%getDefaultConfig;
text: .text%getScreenData;
text: .text%Java_sun_awt_PlatformFont_initIDs;
text: .text%Java_sun_awt_motif_MFontPeer_initIDs;
text: .text%awt_wm_init;
text: .text%awt_wm_initAtoms: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_getRunningWM;
text: .text%xerror_detect_wm: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_prepareIsIceWM: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isNetSupporting: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_checkAnchor: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_getProperty32: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isWinSupporting: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isIceWM: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isEnlightenment: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_getECommsWindowIDProperty: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isSawfish: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isNetWMName: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isKDE2: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isCDE: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_color_match;
text: .text%setup_modifier_map: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%set_mod_mask: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_initialize_DataTransferer;
text: .text%awt_initialize_Xm_DnD;
text: .text%cacheDropDone: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_XmDnD.o;
text: .text%awt_motif_enableSingleDragInitiator;
text: .text%Java_java_awt_Cursor_initIDs;
text: .text%Java_sun_awt_motif_X11CustomCursor_cacheInit;
text: .text%Java_sun_awt_motif_MToolkit_run;
text: .text%awtJNI_GetCurrentThread;
text: .text%awt_MToolkit_loop: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_pipe_init: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_set_poll_timeout: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_events_pending: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%processOneEvent: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%set_toolkit_busy;
text: .text%waitForEvents;
text: .text%performPoll: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_get_poll_timeout: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awtJNI_CleanupGlobalRefs;
text: .text%Java_java_awt_AWTEvent_initIDs;
text: .text%Java_sun_awt_SunToolkit_wakeupEventQueue;
text: .text%Java_sun_awt_motif_MToolkit_shutdown;
text: .text%X11SD_LibDispose;
text: .text%LibDisposeStub: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
# Test LoadFrame
text: .text%Java_java_awt_Component_initIDs;
text: .text%Java_java_awt_Container_initIDs;
text: .text%Java_java_awt_Window_initIDs;
text: .text%Java_java_awt_Frame_initIDs;
text: .text%Java_sun_awt_SunToolkit_getPrivateKey;
text: .text%Java_java_awt_MenuComponent_initIDs;
text: .text%Java_sun_awt_X11GraphicsConfig_pGetBounds;
text: .text%Java_java_awt_Insets_initIDs;
text: .text%Java_sun_awt_motif_MComponentPeer_initIDs;
text: .text%Java_sun_awt_motif_MWindowPeer_initIDs;
text: .text%Java_sun_awt_motif_MWindowAttributes_initIDs;
text: .text%Java_sun_awt_motif_MWindowPeer_pCreate;
text: .text%awtJNI_CreateAndSetGlobalRef;
text: .text%copyGraphicsConfigToPeer;
text: .text%awt_Frame_guessInsets;
text: .text%awtJNI_ChangeInsets: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%getMotifFontList;
text: .text%getMotifFontStruct;
text: .text%setDeleteCallback: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%awt_canvas_create;
text: .text%awt_util_show;
text: .text%addTopLevel;
text: .text%Java_sun_awt_motif_MWindowPeer_pHide;
text: .text%Java_sun_awt_motif_MComponentPeer_pInitialize;
text: .text%awt_addWidget;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetCursor;
text: .text%getCursor;
text: .text%awt_util_setCursor;
text: .text%Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
text: .text%Java_sun_awt_motif_MWindowPeer_pReshape;
text: .text%reshape: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%awtJNI_setMbAndWwHeightAndOffsets: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%awt_wm_configureGravityBuggy;
text: .text%Java_sun_awt_X11SurfaceData_initIDs;
text: .text%Java_sun_awt_motif_MToolkit_loadSystemColors;
text: .text%colorToRGB: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_allocate_systemcolors;
text: .text%Java_sun_awt_X11GraphicsConfig_makeColorModel;
text: .text%awtJNI_GetColorModel;
text: .text%Java_sun_awt_X11SurfaceData_initOps;
text: .text%Java_sun_awt_motif_MWindowPeer_pSetTitle;
text: .text%Java_sun_awt_motif_MWindowPeer_setResizable;
text: .text%Java_java_awt_Font_initIDs;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetFont;
text: .text%awt_util_mapChildren;
text: .text%changeFont: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_Component.o;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetBackground;
text: .text%getGraphicsConfigFromComponentPeer;
text: .text%awtJNI_GetColorForVis;
text: .text%ColorProc;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetForeground;
text: .text%Java_sun_awt_motif_MWindowPeer_pShow;
text: .text%Java_sun_awt_motif_MWindowPeer_pShowModal;
text: .text%awt_wm_setExtendedState;
text: .text%awt_wm_doStateProtocolNet: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_doStateProtocolWin: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_setShellDecor;
text: .text%awt_wm_setMotifDecor: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_setOLDecor: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_normalizeMotifDecor: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_removeSizeHints;
text: .text%shellEH: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%awt_wm_isStateChange;
text: .text%awt_wm_getWMState;
text: .text%Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
text: .text%innerCanvasEH: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%reconfigureOuterCanvas: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%outerCanvasResizeCB: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
text: .text%awt_wm_getInsetsFromProp;
text: .text%syncTopLevelPos;
text: .text%raiseInputMethodWindow;
text: .text%awt_wm_getExtendedState: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_canvas_event_handler;
text: .text%awt_canvas_handleEvent;
text: .text%HandleExposeEvent: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/canvas.o;
text: .text%checkForExpose: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/canvas.o;
text: .text%expandDamageRect: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/canvas.o;
text: .text%getCurComponent;
text: .text%Java_java_awt_KeyboardFocusManager_initIDs;
text: .text%Java_java_awt_event_InputEvent_initIDs;
text: .text%Java_java_awt_event_KeyEvent_initIDs;
text: .text%Java_java_awt_AWTKeyStroke_allocateNewInstance;
text: .text%Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
text: .text%Java_java_awt_Event_initIDs;
# Test LoadJFrame
text: .text%Java_sun_awt_motif_MToolkit_getScreenWidth;
text: .text%Java_sun_awt_motif_MToolkit_getScreenHeight;
text: .text%X11SD_Lock: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%X11SD_InitWindow: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%GetLockStub: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%X11SD_GetRasInfo: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%X11SD_Unlock: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%X11SD_InitClip: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%XRequestSentStub: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
# Test JHello
text: .text%AWTLoadFont;
text: .text%AWTFontMaxByte1;
text: .text%AWTFontMaxCharOrByte2;
text: .text%AWTFontMaxBounds;
text: .text%AWTCharAscent;
text: .text%AWTCharDescent;
text: .text%AWTCharWidth;
text: .text%AWTFontMinByte1;
text: .text%AWTFontMinCharOrByte2;
text: .text%AWTFontPerChar;
text: .text%AWTCharRBearing;
text: .text%AWTCharLBearing;
text: .text%Java_sun_awt_X11SurfaceData_setInvalid;
text: .text%Java_sun_awt_X11SurfaceData_nativeDispose;
text: .text%X11SurfaceData_GetOps;
# SwingSet
text: .text%Java_sun_awt_motif_MWindowPeer_setSaveUnder;
text: .text%Java_sun_awt_motif_MCanvasPeer_create;
text: .text%awt_util_insertCallback;
text: .text%Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
text: .text%Java_sun_awt_motif_MComponentPeer_pReshape;
text: .text%awt_util_reshape;
text: .text%Java_sun_awt_motif_MComponentPeer_pShow;
text: .text%Java_sun_awt_motif_MDataTransferer_getAtomForTarget;
text: .text%Java_sun_awt_motif_MComponentPeer_addNativeDropTarget;
text: .text%register_drop_site;
text: .text%update_drop_site_hierarchy: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_XmDnD.o;
text: .text%AWTFontDefaultChar;
text: .text%AWTFontGenerateImage;
text: .text%CreatePixmapAndGC;
text: .text%isAncestor;
text: .text%xerror_handler;

View File

@ -1,212 +0,0 @@
data = R0x2000;
text = LOAD ?RXO;
# Test Null
# Test Exit
# Test Hello
# Test Sleep
# Test IntToString
# Test LoadToolkit
text: .text%JNI_OnLoad;
text: .text%awt_util_debug_init;
text: .text%Java_sun_awt_X11GraphicsEnvironment_initDisplay;
text: .text%awt_init_Display;
text: .text%makeDefaultConfig: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_GraphicsEnv.o;
text: .text%awt_allocate_colors;
text: .text%Java_sun_awt_font_NativeFontWrapper_getFontPath;
text: .text%getPlatformFontPathChars: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%getSolarisFontLocations: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%AppendFont: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%freePlatformFontPathChars: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%checkFont: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_Font.o;
text: .text%Java_sun_awt_X11GraphicsEnvironment_getNativeFonts;
text: .text%Java_sun_awt_font_NativeFontWrapper_setNativeFontPath;
text: .text%isDisplayLocal;
text: .text%Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
text: .text%TryInitMITShm: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_GraphicsEnv.o;
text: .text%awt_output_flush;
text: .text%awtJNI_TimeMillis: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%AddFontsToX11FontPath: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/fontpath.o;
text: .text%Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
text: .text%Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
text: .text%Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
text: .text%Java_sun_awt_X11GraphicsDevice_isDBESupported;
text: .text%Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
text: .text%Java_sun_awt_X11GraphicsConfig_initIDs;
text: .text%Java_sun_awt_X11GraphicsConfig_init;
text: .text%getAllConfigs: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_GraphicsEnv.o;
text: .text%Java_sun_awt_motif_MToolkit_init;
text: .text%getDefaultConfig;
text: .text%getScreenData;
text: .text%Java_sun_awt_PlatformFont_initIDs;
text: .text%Java_sun_awt_motif_MFontPeer_initIDs;
text: .text%awt_wm_init;
text: .text%awt_wm_initAtoms: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_getRunningWM;
text: .text%xerror_detect_wm: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_prepareIsIceWM: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isNetSupporting: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_checkAnchor: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_getProperty32: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isWinSupporting: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isIceWM: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isEnlightenment: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_getECommsWindowIDProperty: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isSawfish: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isNetWMName: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isKDE2: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_isCDE: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_color_matchTC;
text: .text%setup_modifier_map: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%set_mod_mask: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_initialize_DataTransferer;
text: .text%awt_initialize_Xm_DnD;
text: .text%cacheDropDone: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_XmDnD.o;
text: .text%awt_motif_enableSingleDragInitiator;
text: .text%Java_java_awt_Cursor_initIDs;
text: .text%Java_sun_awt_motif_X11CustomCursor_cacheInit;
text: .text%Java_sun_awt_motif_MToolkit_run;
text: .text%awtJNI_GetCurrentThread;
text: .text%awt_MToolkit_loop: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_pipe_init: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_set_poll_timeout: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_events_pending: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%processOneEvent: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%set_toolkit_busy;
text: .text%waitForEvents;
text: .text%performPoll: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awt_get_poll_timeout: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%awtJNI_CleanupGlobalRefs;
text: .text%Java_java_awt_AWTEvent_initIDs;
text: .text%Java_sun_awt_SunToolkit_wakeupEventQueue;
text: .text%Java_sun_awt_motif_MToolkit_shutdown;
text: .text%X11SD_LibDispose;
text: .text%LibDisposeStub: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
# Test LoadFrame
text: .text%Java_java_awt_Component_initIDs;
text: .text%Java_java_awt_Container_initIDs;
text: .text%Java_java_awt_Window_initIDs;
text: .text%Java_java_awt_Frame_initIDs;
text: .text%Java_sun_awt_SunToolkit_getPrivateKey;
text: .text%Java_java_awt_MenuComponent_initIDs;
text: .text%Java_sun_awt_X11GraphicsConfig_pGetBounds;
text: .text%Java_java_awt_Insets_initIDs;
text: .text%Java_sun_awt_motif_MComponentPeer_initIDs;
text: .text%Java_sun_awt_motif_MWindowPeer_initIDs;
text: .text%Java_sun_awt_motif_MWindowAttributes_initIDs;
text: .text%Java_sun_awt_motif_MWindowPeer_pCreate;
text: .text%awtJNI_CreateAndSetGlobalRef;
text: .text%copyGraphicsConfigToPeer;
text: .text%awt_Frame_guessInsets;
text: .text%awtJNI_ChangeInsets: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%getMotifFontList;
text: .text%getMotifFontStruct;
text: .text%setDeleteCallback: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%ColorProc;
text: .text%awt_canvas_create;
text: .text%awt_util_show;
text: .text%addTopLevel;
text: .text%Java_sun_awt_motif_MWindowPeer_pHide;
text: .text%Java_sun_awt_motif_MComponentPeer_pInitialize;
text: .text%awt_addWidget;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetCursor;
text: .text%getCursor;
text: .text%awt_util_setCursor;
text: .text%Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
text: .text%Java_sun_awt_motif_MWindowPeer_pReshape;
text: .text%reshape: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%awtJNI_setMbAndWwHeightAndOffsets: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%awt_wm_configureGravityBuggy;
text: .text%Java_sun_awt_X11SurfaceData_initIDs;
text: .text%Java_sun_awt_motif_MToolkit_loadSystemColors;
text: .text%colorToRGB: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_MToolkit.o;
text: .text%Java_sun_awt_X11GraphicsConfig_makeColorModel;
text: .text%awtJNI_GetColorModel;
text: .text%Java_sun_awt_X11SurfaceData_initOps;
text: .text%Java_sun_awt_motif_MWindowPeer_pSetTitle;
text: .text%Java_sun_awt_motif_MWindowPeer_setResizable;
text: .text%Java_java_awt_Font_initIDs;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetFont;
text: .text%awt_util_mapChildren;
text: .text%changeFont: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_Component.o;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetBackground;
text: .text%getGraphicsConfigFromComponentPeer;
text: .text%awtJNI_GetColorForVis;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetForeground;
text: .text%Java_sun_awt_motif_MWindowPeer_pShow;
text: .text%Java_sun_awt_motif_MWindowPeer_pShowModal;
text: .text%awt_wm_setExtendedState;
text: .text%awt_wm_doStateProtocolNet: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_doStateProtocolWin: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_setShellDecor;
text: .text%awt_wm_setMotifDecor: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_setOLDecor: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_normalizeMotifDecor: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%awt_wm_removeSizeHints;
text: .text%Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
text: .text%Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
text: .text%getCurComponent;
text: .text%shellEH: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%awt_wm_isStateChange;
text: .text%awt_wm_getWMState;
text: .text%innerCanvasEH: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%reconfigureOuterCanvas: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%outerCanvasResizeCB: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_TopLevel.o;
text: .text%awt_wm_getInsetsFromProp;
text: .text%syncTopLevelPos;
text: .text%raiseInputMethodWindow;
text: .text%awt_canvas_event_handler;
text: .text%awt_canvas_handleEvent;
text: .text%HandleExposeEvent: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/canvas.o;
text: .text%checkForExpose: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/canvas.o;
text: .text%awt_wm_getExtendedState: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_wm.o;
text: .text%expandDamageRect: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/canvas.o;
text: .text%Java_java_awt_KeyboardFocusManager_initIDs;
text: .text%Java_java_awt_event_InputEvent_initIDs;
text: .text%Java_java_awt_event_KeyEvent_initIDs;
text: .text%Java_java_awt_AWTKeyStroke_allocateNewInstance;
text: .text%Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
text: .text%Java_java_awt_Event_initIDs;
# Test LoadJFrame
text: .text%awtJNI_ThreadYield;
text: .text%Java_sun_awt_motif_MToolkit_getScreenWidth;
text: .text%Java_sun_awt_motif_MToolkit_getScreenHeight;
text: .text%X11SD_Lock: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%X11SD_InitWindow: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%GetLockStub: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%X11SD_GetRasInfo: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%X11SD_Unlock: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%X11SD_InitClip: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
text: .text%XRequestSentStub: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/X11SurfaceData.o;
# Test JHello
text: .text%AWTLoadFont;
text: .text%AWTFontMaxByte1;
text: .text%AWTFontMaxCharOrByte2;
text: .text%AWTFontMaxBounds;
text: .text%AWTCharAscent;
text: .text%AWTCharDescent;
text: .text%AWTCharWidth;
text: .text%AWTFontMinByte1;
text: .text%AWTFontMinCharOrByte2;
text: .text%AWTFontPerChar;
text: .text%AWTCharRBearing;
text: .text%AWTCharLBearing;
text: .text%Java_sun_awt_X11SurfaceData_setInvalid;
# SwingSet
text: .text%Java_sun_awt_motif_MWindowPeer_setSaveUnder;
text: .text%Java_sun_awt_X11SurfaceData_nativeDispose;
text: .text%X11SurfaceData_GetOps;
text: .text%Java_sun_awt_motif_MCanvasPeer_create;
text: .text%awt_util_insertCallback;
text: .text%Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
text: .text%Java_sun_awt_motif_MComponentPeer_pReshape;
text: .text%awt_util_reshape;
text: .text%Java_sun_awt_motif_MComponentPeer_pShow;
text: .text%Java_sun_awt_motif_MDataTransferer_getAtomForTarget;
text: .text%Java_sun_awt_motif_MComponentPeer_addNativeDropTarget;
text: .text%register_drop_site;
text: .text%update_drop_site_hierarchy: OUTPUTDIR/tmp/sun/sun.awt/motif12/obj/awt_XmDnD.o;
text: .text%AWTFontDefaultChar;
text: .text%isAncestor;
text: .text%xerror_handler;
text: .text%AWTFontGenerateImage;
text: .text%CreatePixmapAndGC;

View File

@ -1,233 +0,0 @@
data = R0x2000;
text = LOAD ?RXO;
# Test Null
# Test Exit
# Test Hello
# Test Sleep
# Test IntToString
# Test LoadToolkit
text: .text%JNI_OnLoad;
text: .text%awt_util_debug_init;
text: .text%Java_java_awt_Toolkit_initIDs;
text: .text%Java_sun_awt_X11GraphicsEnvironment_initDisplay;
text: .text%awt_init_Display;
text: .text%makeDefaultConfig: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_GraphicsEnv.o;
text: .text%awt_allocate_colors;
text: .text%make_uns_ordered_dither_array;
text: .text%checkFont: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_Font.o;
text: .text%Java_sun_awt_X11GraphicsEnvironment_getNativeFonts;
text: .text%Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
text: .text%Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
text: .text%Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
text: .text%Java_sun_awt_X11GraphicsConfig_initIDs;
text: .text%Java_sun_awt_X11GraphicsConfig_init;
text: .text%getAllConfigs: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_GraphicsEnv.o;
text: .text%awt_output_flush;
text: .text%awtJNI_TimeMillis: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%Java_sun_awt_motif_MToolkit_init;
text: .text%getDefaultConfig;
text: .text%getScreenData;
text: .text%Java_sun_awt_PlatformFont_initIDs;
text: .text%Java_sun_awt_motif_MFontPeer_initIDs;
text: .text%awt_color_matchTC;
text: .text%setup_modifier_map: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%set_mod_mask: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%awt_initialize_Xm_DnD;
text: .text%Java_java_awt_Cursor_initIDs;
text: .text%Java_sun_awt_motif_X11CustomCursor_cacheInit;
text: .text%Java_java_awt_Dimension_initIDs;
text: .text%Java_sun_awt_motif_MToolkit_run;
text: .text%awtJNI_GetCurrentThread;
text: .text%awt_MToolkit_loop: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%awt_pipe_init: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%awt_set_poll_timeout: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%awt_events_pending: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%processOneEvent: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%waitForEvents: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%performPoll: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%awt_get_poll_timeout: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%awtJNI_CleanupGlobalRefs;
# Test LoadFrame
text: .text%Java_java_awt_Component_initIDs;
text: .text%Java_java_awt_Container_initIDs;
text: .text%Java_java_awt_Window_initIDs;
text: .text%Java_java_awt_Frame_initIDs;
text: .text%Java_sun_awt_SunToolkit_getPrivateKey;
text: .text%Java_java_awt_MenuComponent_initIDs;
text: .text%Java_sun_awt_X11GraphicsConfig_pGetBounds;
text: .text%Java_java_awt_Rectangle_initIDs;
text: .text%Java_sun_awt_motif_MComponentPeer_initIDs;
text: .text%Java_sun_awt_motif_MWindowPeer_initIDs;
text: .text%Java_java_awt_Insets_initIDs;
text: .text%Java_sun_awt_motif_MWindowAttributes_initIDs;
text: .text%Java_sun_awt_motif_MWindowPeer_create;
text: .text%awtJNI_CreateAndSetGlobalRef;
text: .text%copyGraphicsConfigToPeer;
text: .text%awt_Frame_guessInsets;
text: .text%awt_util_runningWindowManager;
text: .text%awt_winmgrerr: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_util.o;
text: .text%awtJNI_ChangeInsets: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%getMotifFontList;
text: .text%getMotifFontStruct;
text: .text%setDeleteCallback: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%ColorProc;
text: .text%awt_canvas_create;
text: .text%awt_util_show;
text: .text%addTopLevel;
text: .text%Java_sun_awt_motif_MWindowPeer_pHide;
text: .text%Java_sun_awt_motif_MComponentPeer_pInitialize;
text: .text%awt_addWidget;
text: .text%Java_sun_awt_motif_MComponentPeer_setCursor;
text: .text%getCursor;
text: .text%awt_util_setCursor;
text: .text%Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
text: .text%Java_sun_awt_motif_MWindowPeer_pReshape;
text: .text%reshape: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%awtJNI_setMbAndWwHeightAndOffsets: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%awt_util_wmPositionsShellXY;
text: .text%Java_sun_awt_motif_MWindowPeer_pSetTitle;
text: .text%Java_sun_awt_motif_MWindowPeer_setResizable;
text: .text%Java_java_awt_Font_initIDs;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetFont;
text: .text%awt_util_mapChildren;
text: .text%changeFont: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_Component.o;
text: .text%Java_java_awt_Color_initIDs;
text: .text%Java_sun_awt_motif_MToolkit_loadSystemColors;
text: .text%colorToRGB: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetBackground;
text: .text%getGraphicsConfigFromComponentPeer;
text: .text%awtJNI_GetColorForVis;
text: .text%Java_sun_awt_motif_MComponentPeer_pSetForeground;
text: .text%Java_sun_awt_motif_MWindowPeer_pShow;
text: .text%Java_sun_awt_motif_MWindowPeer_pShowModal;
text: .text%setStateHints: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%awt_util_setMinMaxSizeProps;
text: .text%innerCanvasEH: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%reconfigureOuterCanvas: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%Java_java_awt_AWTEvent_initIDs;
text: .text%outerCanvasResizeCB: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
text: .text%shellEH: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
text: .text%getCurComponent;
text: .text%get_awt_TopLevelInsetsProp;
text: .text%syncTopLevelPos;
text: .text%Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
text: .text%raiseInputMethodWindow;
text: .text%getWindowState: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;
text: .text%awt_canvas_event_handler;
text: .text%awt_canvas_handleEvent;
text: .text%HandleExposeEvent: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/canvas.o;
text: .text%checkForExpose: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/canvas.o;
text: .text%Java_java_awt_Event_initIDs;
text: .text%Java_java_awt_image_ColorModel_initIDs;
text: .text%Java_sun_awt_motif_X11Graphics_cacheInit;
text: .text%InitMITShm: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_Graphics.o;
text: .text%Java_sun_java2d_loops_RasterOutputManager_getPlatformFontVar;
text: .text%Java_sun_awt_motif_X11Graphics_createFromComponent;
text: .text%Java_sun_awt_motif_X11Graphics_pSetForeground;
text: .text%awt_init_gc;
text: .text%Java_sun_awt_motif_X11Graphics_pSetFont;
text: .text%awtJNI_GetFontData;
text: .text%awtJNI_IsMultiFont;
text: .text%Java_sun_awt_FontDescriptor_initIDs;
text: .text%loadFont;
text: .text%Java_sun_awt_motif_X11Graphics_setOrigin;
text: .text%Java_sun_awt_motif_X11Graphics_setLineAttrs;
text: .text%Java_sun_awt_motif_X11Graphics_changeClip;
text: .text%Java_sun_awt_motif_X11Graphics_devClearRect;
text: .text%Java_sun_awt_motif_X11Graphics_disposeImpl;
# Test LoadJFrame
text: .text%Java_java_awt_event_InputEvent_initIDs;
text: .text%Java_java_awt_event_KeyEvent_initIDs;
text: .text%expandDamageRect: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/canvas.o;
text: .text%awtJNI_ThreadYield;
text: .text%Java_sun_awt_motif_X11Graphics_createFromGraphics;
text: .text%Java_sun_awt_motif_MToolkit_getScreenWidth;
text: .text%Java_sun_awt_motif_MToolkit_getScreenHeight;
text: .text%Java_sun_awt_X11GraphicsConfig_makeColorModel;
text: .text%awtJNI_GetColorModel;
text: .text%Java_java_awt_image_BufferedImage_initIDs;
text: .text%Java_java_awt_image_Raster_initIDs;
text: .text%Java_java_awt_image_SampleModel_initIDs;
text: .text%Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
text: .text%Java_sun_awt_image_IntegerComponentRaster_initIDs;
text: .text%Java_sun_java2d_loops_ImageData_initIDs;
text: .text%Java_sun_java2d_loops_IntDiscreteRenderer_devSetRect;
text: .text%Java_sun_awt_motif_X11Graphics_X11LockViewResources;
text: .text%X11DeferredLockViewResources: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_Graphics.o;
text: .text%getLockMethod: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_Graphics.o;
text: .text%DGA_DeferredLockViewResources;
text: .text%setLockMethod: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_Graphics.o;
text: .text%getPrimitiveType: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_Graphics.o;
text: .text%Java_sun_awt_motif_X11Graphics_X11UnLockViewResources;
text: .text%DGA_UnlockViewResources;
text: .text%Java_sun_java2d_loops_DefaultComponent_IntIsomorphicCopy;
text: .text%minImageWidths;
text: .text%minImageRows;
text: .text%getIntImageLockInfo;
text: .text%lockIntImageData;
text: .text%unlockIntImageData;
# Test JHello
text: .text%Java_java_awt_FontMetrics_initIDs;
# SwingSet
text: .text%Java_sun_awt_image_Image_initIDs;
text: .text%Java_sun_awt_image_ImageRepresentation_initIDs;
text: .text%Java_java_awt_image_IndexColorModel_initIDs;
text: .text%Java_sun_awt_motif_MWindowPeer_setSaveUnder;
text: .text%Java_java_awt_AWTEvent_freeNativeData;
text: .text%Java_sun_java2d_loops_DefaultComponent_IntRgbToXbgr;
text: .text%Java_sun_awt_motif_MCanvasPeer_create;
text: .text%awt_util_insertCallback;
text: .text%Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
text: .text%Java_sun_awt_motif_MComponentPeer_pReshape;
text: .text%awt_util_reshape;
text: .text%Java_sun_awt_motif_MComponentPeer_pShow;
text: .text%Java_sun_java2d_loops_IntDiscreteRenderer_devDrawLine;
text: .text%doDrawLine: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/IntDiscreteRenderer.o;
text: .text%adjustLine: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/IntDiscreteRenderer.o;
text: .text%Java_sun_awt_image_GifImageDecoder_initIDs;
text: .text%Java_java_awt_image_ComponentSampleModel_initIDs;
text: .text%Java_sun_awt_image_ByteComponentRaster_initIDs;
text: .text%Java_sun_awt_image_GifImageDecoder_parseImage;
text: .text%Java_sun_awt_image_ImageRepresentation_setBytePixels;
text: .text%Java_sun_java2d_loops_IntDiscreteRenderer_devDrawRect;
text: .text%outcode: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/IntDiscreteRenderer.o;
text: .text%Java_sun_java2d_loops_ImageData_isAllOpaqueGrayICM;
text: .text%Java_sun_java2d_loops_GIFAcceleratorLoops_LUTcopyTo32BitXBgr;
text: .text%getByteIndexedImageLockInfo;
text: .text%lockByteIndexedImageData;
text: .text%unlockByteIndexedImageData;
text: .text%Java_sun_java2d_loops_GIFAcceleratorLoops_LUTxparTo32BitXBgr;
text: .text%shouldDispatchToWidget: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%awtMenuIsActive;
text: .text%awt_util_focusIsOnMenu;
text: .text%awt_isModal;
text: .text%findWidgetInfo: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%awt_copyXEvent;
text: .text%awt_post_java_mouse_event;
text: .text%Java_java_awt_event_MouseEvent_initIDs;
text: .text%sysTimeMillis;
text: .text%updateCursor;
text: .text%awt_setActivatedShell;
text: .text%handleFocusEvent;
text: .text%awt_post_java_focus_event;
text: .text%getModifiers;
text: .text%Java_java_awt_AWTEvent_copyDataFieldInto;
text: .text%Java_sun_awt_motif_X11InputMethod_initIDs;
text: .text%Java_sun_awt_motif_X11InputMethod_openXIM;
text: .text%awt_put_back_event;
text: .text%awt_get_next_put_back_event: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%null_event_handler: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_MToolkit.o;
text: .text%Java_sun_awt_motif_MGlobalCursorManager_getCursorPos;
text: .text%Java_sun_awt_motif_MGlobalCursorManager_findComponentAt;
text: .text%Java_sun_awt_motif_MWindowPeer_hasTextComponents;
text: .text%Java_sun_awt_motif_X11InputMethod_createXICNative;
text: .text%findClass: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_InputMethod.o;
text: .text%createXIC: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_InputMethod.o;
text: .text%Java_sun_awt_motif_X11InputMethod_setXICFocus;
text: .text%setXICWindowFocus: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_InputMethod.o;
text: .text%setXICFocus: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_InputMethod.o;
text: .text%getAncestorShell;
text: .text%Java_sun_awt_motif_X11InputMethod_turnoffStatusWindow;
text: .text%Frame_quit: ../../../build/solaris-sparcv9/tmp/sun/sun.awt/motif12/obj64/awt_TopLevel.o;

View File

@ -256,8 +256,6 @@ SUNWprivate_1.1 {
Java_sun_awt_X11_XToolkit_waitForEvents;
Java_java_awt_Event_initIDs;
Java_sun_awt_motif_X11FontMetrics_initIDs;
Java_sun_awt_motif_X11FontMetrics_init;
Java_sun_awt_X11_XWindow_x11inputMethodLookupString;
Java_sun_awt_X11_XWindow_haveCurrentX11InputMethodInstance;
Java_java_awt_AWTEvent_nativeSetSource;
@ -265,7 +263,6 @@ SUNWprivate_1.1 {
Java_sun_awt_PlatformFont_initIDs;
Java_sun_awt_FontDescriptor_initIDs;
Java_sun_awt_X11_XFontPeer_initIDs;
Java_sun_awt_motif_X11FontMetrics_getMFCharsWidth;
Java_sun_awt_X11InputMethod_initIDs;
Java_sun_awt_X11InputMethod_resetXIC;
Java_sun_awt_X11InputMethod_disposeXIC;

View File

@ -29,10 +29,8 @@ import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import java.awt.event.AdjustmentEvent;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import sun.awt.motif.X11FontMetrics;
import sun.util.logging.PlatformLogger;
// FIXME: implement multi-select

View File

@ -35,7 +35,6 @@ import java.awt.image.ImageProducer;
import java.awt.image.VolatileImage;
import java.awt.peer.*;
import sun.awt.*;
import sun.awt.motif.X11FontMetrics;
import java.lang.reflect.*;
import sun.util.logging.PlatformLogger;
import java.util.*;

View File

@ -34,8 +34,6 @@ import java.awt.image.VolatileImage;
import java.awt.peer.*;
import sun.java2d.pipe.Region;
import sun.awt.*;
import sun.awt.motif.MToolkit;
import sun.awt.motif.X11FontMetrics;
public class XEmbedChildProxyPeer implements ComponentPeer, XEventDispatcher{
XEmbeddingContainer container;

View File

@ -1,34 +0,0 @@
/*
* Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt.motif;
final class AWTLockAccess {
static native void awtLock();
static native void awtUnlock();
static void awtWait() { awtWait(0); }
static native void awtWait(long timeout);
static native void awtNotifyAll();
}

View File

@ -25,26 +25,19 @@
package sun.awt.motif;
import java.awt.Font;
import java.io.BufferedReader;
import sun.awt.FontConfiguration;
import sun.awt.X11FontManager;
import sun.font.FontUtilities;
import sun.font.SunFontManager;
import sun.util.logging.PlatformLogger;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Properties;
import java.util.Scanner;
import sun.awt.FontConfiguration;
import sun.awt.X11FontManager;
import sun.awt.X11GraphicsEnvironment;
import sun.font.FontManager;
import sun.font.SunFontManager;
import sun.font.FontManagerFactory;
import sun.font.FontUtilities;
import sun.java2d.SunGraphicsEnvironment;
import sun.util.logging.PlatformLogger;
public class MFontConfiguration extends FontConfiguration {
@ -258,47 +251,6 @@ public class MFontConfiguration extends FontConfiguration {
return Charset.forName("ISO8859_1");
}
/* methods for Motif support *********************************************/
private String[][] motifFontSets = new String[NUM_FONTS][NUM_STYLES];
public String getMotifFontSet(String fontName, int style) {
assert isLogicalFontFamilyName(fontName);
fontName = fontName.toLowerCase(Locale.ENGLISH);
int fontIndex = getFontIndex(fontName);
int styleIndex = getStyleIndex(style);
return getMotifFontSet(fontIndex, styleIndex);
}
private String getMotifFontSet(int fontIndex, int styleIndex) {
String fontSet = motifFontSets[fontIndex][styleIndex];
if (fontSet == null) {
fontSet = buildMotifFontSet(fontIndex, styleIndex);
motifFontSets[fontIndex][styleIndex] = fontSet;
}
return fontSet;
}
private String buildMotifFontSet(int fontIndex, int styleIndex) {
StringBuilder buffer = new StringBuilder();
short[] scripts = getCoreScripts(fontIndex);
for (int i = 0; i < scripts.length; i++) {
short nameID = getComponentFontIDMotif(scripts[i], fontIndex, styleIndex);
if (nameID == 0) {
nameID = getComponentFontID(scripts[i], fontIndex, styleIndex);
}
String name = getComponentFontName(nameID);
if (name == null || name.endsWith("fontspecific")) {
continue;
}
if (buffer.length() > 0) {
buffer.append(',');
}
buffer.append(name);
}
return buffer.toString();
}
protected String getFaceNameFromComponentFontName(String componentFontName) {
return null;
}
@ -315,36 +267,6 @@ public class MFontConfiguration extends FontConfiguration {
return ((X11FontManager) fontManager).getFileNameFromXLFD(componentFontName);
}
/**
* Get default font for Motif widgets to use, preventing them from
* wasting time accessing inappropriate X resources. This is called
* only from native code.
*
* This is part of a Motif specific performance enhancement. By
* default, when Motif widgets are created and initialized, Motif will
* set up default fonts for the widgets, which we ALWAYS override.
* This set up includes finding the default font in the widget's X
* resources and fairly expensive requests of the X server to identify
* the specific font or fontset. We avoid all of this overhead by
* providing a well known font to use at the creation of widgets, where
* possible.
*
* The X11 fonts are specified by XLFD strings which have %d as a
* marker to indicate where the fontsize should be substituted. [The
* libc function sprintf() is used to replace it.] The value 140
* specifies a font size of 14 points.
*/
private static String getDefaultMotifFontSet() {
String font = ((MFontConfiguration) getFontConfiguration()).getMotifFontSet("sansserif", Font.PLAIN);
if (font != null) {
int i;
while ((i = font.indexOf("%d")) >= 0) {
font = font.substring(0, i) + "140" + font.substring(i+2);
}
}
return font;
}
public HashSet<String> getAWTFontPathSet() {
HashSet<String> fontDirs = new HashSet<String>();
short[] scripts = getCoreScripts(0);

View File

@ -1,65 +0,0 @@
/*
* Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt.motif;
import java.awt.GraphicsEnvironment;
import sun.awt.PlatformFont;
public class MFontPeer extends PlatformFont {
/*
* XLFD name for XFontSet.
*/
private String xfsname;
/*
* converter name for this XFontSet encoding.
*/
private String converter;
static {
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
}
/**
* Initialize JNI field and method IDs for fields that may be
accessed from C.
*/
private static native void initIDs();
public MFontPeer(String name, int style){
super(name, style);
if (fontConfig != null) {
xfsname = ((MFontConfiguration) fontConfig).getMotifFontSet(familyName, style);
}
}
protected char getMissingGlyphCharacter() {
return '\u274F';
}
}

View File

@ -1,849 +0,0 @@
/*
* Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt.motif;
import java.awt.*;
import java.awt.im.InputMethodHighlight;
import java.awt.im.spi.InputMethodDescriptor;
import java.awt.image.*;
import java.awt.peer.*;
import java.awt.datatransfer.Clipboard;
import java.awt.event.*;
import java.lang.reflect.*;
import java.lang.Math;
import java.io.*;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.Properties;
import java.util.Map;
import java.util.Iterator;
import sun.awt.AppContext;
import sun.awt.AWTAutoShutdown;
import sun.awt.SunToolkit;
import sun.awt.UNIXToolkit;
import sun.awt.GlobalCursorManager;
import sun.awt.datatransfer.DataTransferer;
import java.awt.dnd.DragSource;
import java.awt.dnd.DragGestureListener;
import java.awt.dnd.DragGestureEvent;
import java.awt.dnd.DragGestureRecognizer;
import java.awt.dnd.MouseDragGestureRecognizer;
import java.awt.dnd.InvalidDnDOperationException;
import java.awt.dnd.peer.DragSourceContextPeer;
//import sun.awt.motif.MInputMethod;
import sun.awt.X11FontManager;
import sun.awt.X11GraphicsConfig;
import sun.awt.X11GraphicsEnvironment;
import sun.awt.XSettings;
//import sun.awt.motif.MDragSourceContextPeer;
import sun.print.PrintJob2D;
import sun.misc.PerformanceLogger;
import sun.misc.Unsafe;
import sun.security.action.GetBooleanAction;
import sun.util.logging.PlatformLogger;
public class MToolkit extends UNIXToolkit implements Runnable {
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.motif.MToolkit");
// the system clipboard - CLIPBOARD selection
//X11Clipboard clipboard;
// the system selection - PRIMARY selection
//X11Clipboard selection;
// Dynamic Layout Resize client code setting
protected static boolean dynamicLayoutSetting = false;
/**
* True when the x settings have been loaded.
*/
private boolean loadedXSettings;
/**
* XSETTINGS for the default screen.
* <p>
* <strong>XXX:</strong> see <code>MToolkit.parseXSettings</code>
* and <code>awt_xsettings_update</code> in
* <samp>awt_MToolkit.c</samp>
*/
private XSettings xs;
/*
* Note: The MToolkit object depends on the static initializer
* of X11GraphicsEnvironment to initialize the connection to
* the X11 server.
*/
static final X11GraphicsConfig config;
private static final boolean motifdnd;
static {
if (GraphicsEnvironment.isHeadless()) {
config = null;
} else {
config = (X11GraphicsConfig) (GraphicsEnvironment.
getLocalGraphicsEnvironment().
getDefaultScreenDevice().
getDefaultConfiguration());
}
motifdnd = ((Boolean)java.security.AccessController.doPrivileged(
new GetBooleanAction("awt.dnd.motifdnd"))).booleanValue();
}
//public static final String DATA_TRANSFERER_CLASS_NAME = "sun.awt.motif.MDataTransferer";
public MToolkit() {
super();
if (PerformanceLogger.loggingEnabled()) {
PerformanceLogger.setTime("MToolkit construction");
}
if (!GraphicsEnvironment.isHeadless()) {
String mainClassName = null;
StackTraceElement trace[] = (new Throwable()).getStackTrace();
int bottom = trace.length - 1;
if (bottom >= 0) {
mainClassName = trace[bottom].getClassName();
}
if (mainClassName == null || mainClassName.equals("")) {
mainClassName = "AWT";
}
init(mainClassName);
//SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME);
Thread toolkitThread = new Thread(this, "AWT-Motif");
toolkitThread.setPriority(Thread.NORM_PRIORITY + 1);
toolkitThread.setDaemon(true);
PrivilegedAction<Void> a = new PrivilegedAction<Void>() {
public Void run() {
ThreadGroup mainTG = Thread.currentThread().getThreadGroup();
ThreadGroup parentTG = mainTG.getParent();
while (parentTG != null) {
mainTG = parentTG;
parentTG = mainTG.getParent();
}
Thread shutdownThread = new Thread(mainTG, new Runnable() {
public void run() {
shutdown();
}
}, "Shutdown-Thread");
shutdownThread.setContextClassLoader(null);
Runtime.getRuntime().addShutdownHook(shutdownThread);
return null;
}
};
AccessController.doPrivileged(a);
/*
* Fix for 4701990.
* AWTAutoShutdown state must be changed before the toolkit thread
* starts to avoid race condition.
*/
AWTAutoShutdown.notifyToolkitThreadBusy();
toolkitThread.start();
}
}
public native void init(String mainClassName);
public native void run();
private native void shutdown();
/*
* Create peer objects.
*/
public ButtonPeer createButton(Button target) {
//ButtonPeer peer = new MButtonPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public TextFieldPeer createTextField(TextField target) {
//TextFieldPeer peer = new MTextFieldPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public LabelPeer createLabel(Label target) {
//LabelPeer peer = new MLabelPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public ListPeer createList(List target) {
//ListPeer peer = new MListPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public CheckboxPeer createCheckbox(Checkbox target) {
//CheckboxPeer peer = new MCheckboxPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public ScrollbarPeer createScrollbar(Scrollbar target) {
//ScrollbarPeer peer = new MScrollbarPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public ScrollPanePeer createScrollPane(ScrollPane target) {
//ScrollPanePeer peer = new MScrollPanePeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public TextAreaPeer createTextArea(TextArea target) {
//TextAreaPeer peer = new MTextAreaPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public ChoicePeer createChoice(Choice target) {
//ChoicePeer peer = new MChoicePeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public FramePeer createFrame(Frame target) {
//FramePeer peer = new MFramePeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public CanvasPeer createCanvas(Canvas target) {
//CanvasPeer peer = (isXEmbedServerRequested() ? new MEmbedCanvasPeer(target) : new MCanvasPeer(target));
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public PanelPeer createPanel(Panel target) {
//PanelPeer peer = new MPanelPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public WindowPeer createWindow(Window target) {
//WindowPeer peer = new MWindowPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public DialogPeer createDialog(Dialog target) {
//DialogPeer peer = new MDialogPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public FileDialogPeer createFileDialog(FileDialog target) {
//FileDialogPeer peer = new MFileDialogPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public MenuBarPeer createMenuBar(MenuBar target) {
//MenuBarPeer peer = new MMenuBarPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public MenuPeer createMenu(Menu target) {
//MenuPeer peer = new MMenuPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public PopupMenuPeer createPopupMenu(PopupMenu target) {
//PopupMenuPeer peer = new MPopupMenuPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public MenuItemPeer createMenuItem(MenuItem target) {
//MenuItemPeer peer = new MMenuItemPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target) {
//CheckboxMenuItemPeer peer = new MCheckboxMenuItemPeer(target);
//targetCreatedPeer(target, peer);
//return peer;
return null;
}
public KeyboardFocusManagerPeer createKeyboardFocusManagerPeer(KeyboardFocusManager manager) {
return null;
}
//public MEmbeddedFramePeer createEmbeddedFrame(MEmbeddedFrame target)
//{
//MEmbeddedFramePeer peer = new MEmbeddedFramePeer(target);
//targetCreatedPeer(target, peer);
//return peer;
// return null;
//}
public FontPeer getFontPeer(String name, int style){
return new MFontPeer(name, style);
}
/*
* On X, support for dynamic layout on resizing is governed by the
* window manager. If the window manager supports it, it happens
* automatically. The setter method for this property is
* irrelevant on X.
*/
public void setDynamicLayout(boolean b) {
dynamicLayoutSetting = b;
}
protected boolean isDynamicLayoutSet() {
return dynamicLayoutSetting;
}
/* Called from isDynamicLayoutActive() and from
* lazilyLoadDynamicLayoutSupportedProperty()
*/
protected native boolean isDynamicLayoutSupportedNative();
public boolean isDynamicLayoutActive() {
return isDynamicLayoutSupportedNative();
}
public native boolean isFrameStateSupported(int state);
public TrayIconPeer createTrayIcon(TrayIcon target) throws HeadlessException {
return null;
}
public SystemTrayPeer createSystemTray(SystemTray target) throws HeadlessException {
return null;
}
public boolean isTraySupported() {
return false;
}
static native ColorModel makeColorModel();
static ColorModel screenmodel;
static ColorModel getStaticColorModel() {
if (screenmodel == null) {
screenmodel = config.getColorModel ();
}
return screenmodel;
}
public ColorModel getColorModel() {
return getStaticColorModel();
}
public native int getScreenResolution();
public Insets getScreenInsets(GraphicsConfiguration gc) {
return new Insets(0,0,0,0);
}
protected native int getScreenWidth();
protected native int getScreenHeight();
public FontMetrics getFontMetrics(Font font) {
/*
// REMIND: platform font flag should be obsolete soon
if (!RasterOutputManager.usesPlatformFont()) {
return super.getFontMetrics(font);
} else {
return X11FontMetrics.getFontMetrics(font);
}
*/
return super.getFontMetrics(font);
}
public PrintJob getPrintJob(final Frame frame, final String doctitle,
final Properties props) {
if (GraphicsEnvironment.isHeadless()) {
throw new IllegalArgumentException();
}
PrintJob2D printJob = new PrintJob2D(frame, doctitle, props);
if (printJob.printDialog() == false) {
printJob = null;
}
return printJob;
}
public PrintJob getPrintJob(final Frame frame, final String doctitle,
final JobAttributes jobAttributes,
final PageAttributes pageAttributes) {
if (GraphicsEnvironment.isHeadless()) {
throw new IllegalArgumentException();
}
PrintJob2D printJob = new PrintJob2D(frame, doctitle,
jobAttributes, pageAttributes);
if (printJob.printDialog() == false) {
printJob = null;
}
return printJob;
}
public native void beep();
public Clipboard getSystemClipboard() {
//SecurityManager security = System.getSecurityManager();
//if (security != null) {
// security.checkSystemClipboardAccess();
//}
//synchronized (this) {
// if (clipboard == null) {
// clipboard = new X11Clipboard("System", "CLIPBOARD");
// }
//}
//return clipboard;
return null;
}
public Clipboard getSystemSelection() {
//SecurityManager security = System.getSecurityManager();
//if (security != null) {
// security.checkSystemClipboardAccess();
//}
//synchronized (this) {
// if (selection == null) {
// selection = new X11Clipboard("Selection", "PRIMARY");
// }
//}
//return selection;
return null;
}
public boolean getLockingKeyState(int key) {
if (! (key == KeyEvent.VK_CAPS_LOCK || key == KeyEvent.VK_NUM_LOCK ||
key == KeyEvent.VK_SCROLL_LOCK || key == KeyEvent.VK_KANA_LOCK)) {
throw new IllegalArgumentException("invalid key for Toolkit.getLockingKeyState");
}
return getLockingKeyStateNative(key);
}
public native boolean getLockingKeyStateNative(int key);
public native void loadSystemColors(int[] systemColors);
/**
* Give native peers the ability to query the native container
* given a native component (e.g. the direct parent may be lightweight).
*/
public static Container getNativeContainer(Component c) {
return Toolkit.getNativeContainer(c);
}
protected static final Object targetToPeer(Object target) {
return SunToolkit.targetToPeer(target);
}
protected static final void targetDisposedPeer(Object target, Object peer) {
SunToolkit.targetDisposedPeer(target, peer);
}
public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException {
//if (MToolkit.useMotifDnD()) {
// return MDragSourceContextPeer.createDragSourceContextPeer(dge);
//} else {
// return X11DragSourceContextPeer.createDragSourceContextPeer(dge);
//}
return null;
}
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> abstractRecognizerClass,
DragSource ds, Component c, int srcActions,
DragGestureListener dgl)
{
//if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass))
// return (T)new MMouseDragGestureRecognizer(ds, c, srcActions, dgl);
//else
return null;
}
/**
* Returns a new input method adapter descriptor for native input methods.
*/
public InputMethodDescriptor getInputMethodAdapterDescriptor() throws AWTException {
return null; // return new MInputMethodDescriptor();
}
/**
* Returns a style map for the input method highlight.
*/
public Map mapInputMethodHighlight(InputMethodHighlight highlight) {
return null; //return MInputMethod.mapInputMethodHighlight(highlight);
}
/**
* Returns a new custom cursor.
*/
public Cursor createCustomCursor(Image cursor, Point hotSpot, String name)
throws IndexOutOfBoundsException {
return null; //return new MCustomCursor(cursor, hotSpot, name);
}
/**
* Returns the supported cursor size
*/
public Dimension getBestCursorSize(int preferredWidth, int preferredHeight) {
return null; //MCustomCursor.getBestCursorSize(
//java.lang.Math.max(1,preferredWidth), java.lang.Math.max(1,preferredHeight));
}
public int getMaximumCursorColors() {
return 2; // Black and white.
}
private final static String prefix = "DnD.Cursor.";
private final static String postfix = ".32x32";
private static final String dndPrefix = "DnD.";
protected Object lazilyLoadDesktopProperty(String name) {
if (name.startsWith(prefix)) {
String cursorName = name.substring(prefix.length(), name.length()) + postfix;
try {
return Cursor.getSystemCustomCursor(cursorName);
} catch (AWTException awte) {
System.err.println("cannot load system cursor: " + cursorName);
return null;
}
}
if (name.equals("awt.dynamicLayoutSupported")) {
return lazilyLoadDynamicLayoutSupportedProperty(name);
}
if (!loadedXSettings &&
(name.startsWith("gnome.") ||
name.equals(SunToolkit.DESKTOPFONTHINTS) ||
name.startsWith(dndPrefix))) {
loadedXSettings = true;
if (!GraphicsEnvironment.isHeadless()) {
loadXSettings();
desktopProperties.put(SunToolkit.DESKTOPFONTHINTS,
SunToolkit.getDesktopFontHints());
return desktopProperties.get(name);
}
}
return super.lazilyLoadDesktopProperty(name);
}
/*
* Called from lazilyLoadDesktopProperty because we may not know if
* the user has quit the previous window manager and started another.
*/
protected Boolean lazilyLoadDynamicLayoutSupportedProperty(String name) {
boolean nativeDynamic = isDynamicLayoutSupportedNative();
if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("nativeDynamic == " + nativeDynamic);
}
return Boolean.valueOf(nativeDynamic);
}
private native int getMulticlickTime();
protected void initializeDesktopProperties() {
desktopProperties.put("DnD.Autoscroll.initialDelay", Integer.valueOf(50));
desktopProperties.put("DnD.Autoscroll.interval", Integer.valueOf(50));
desktopProperties.put("DnD.Autoscroll.cursorHysteresis", Integer.valueOf(5));
/* As of 1.4, no wheel mice are supported on Solaris
* however, they are on Linux, and there isn't a way to detect them,
* so we leave this property unset to indicate we're not sure if there's
* a wheel mouse or not.
*/
//desktopProperties.put("awt.wheelMousePresent", Boolean.valueOf(false));
// We don't want to call getMultilclickTime() if we're headless
if (!GraphicsEnvironment.isHeadless()) {
desktopProperties.put("awt.multiClickInterval",
Integer.valueOf(getMulticlickTime()));
desktopProperties.put("awt.mouse.numButtons",
Integer.valueOf(getNumberOfButtons()));
}
}
public RobotPeer createRobot(Robot target, GraphicsDevice screen) {
/* 'target' is unused for now... */
//return new MRobotPeer(screen.getDefaultConfiguration());
return null;
}
static boolean useMotifDnD() {
return motifdnd;
}
//
// The following support Gnome's equivalent of desktop properties.
// A writeup of this can be found at:
// http://www.freedesktop.org/standards/xsettings/xsettings.html
//
/**
* Triggers a callback to parseXSettings with the x settings values
* from the window server. Note that this will NOT call
* parseXSettings if we are not running on a GNOME desktop.
*/
private native void loadXSettings();
/**
* Callback from the native side indicating some, or all, of the
* desktop properties have changed and need to be reloaded.
* <code>data</code> is the byte array directly from the x server and
* may be in little endian format.
* <p>
* NB: This could be called from any thread if triggered by
* <code>loadXSettings</code>. It is called from the toolkit
* thread if triggered by an XSETTINGS change.
*/
private void parseXSettings(int screen_XXX_ignored, byte[] data) {
// XXX: notyet: map screen -> per screen XSettings object
// for now native code only calls us for default screen
// see awt_MToolkit.c awt_xsettings_update().
if (xs == null) {
xs = new XSettings();
}
Map updatedSettings = xs.update(data);
if (updatedSettings == null || updatedSettings.isEmpty()) {
return;
}
Iterator i = updatedSettings.entrySet().iterator();
while (i.hasNext()) {
Map.Entry e = (Map.Entry)i.next();
String name = (String)e.getKey();
name = "gnome." + name;
setDesktopProperty(name, e.getValue());
// XXX: we probably want to do something smarter. In
// particular, "Net" properties are of interest to the
// "core" AWT itself. E.g.
//
// Net/DndDragThreshold -> ???
// Net/DoubleClickTime -> awt.multiClickInterval
}
setDesktopProperty(SunToolkit.DESKTOPFONTHINTS,
SunToolkit.getDesktopFontHints());
Integer dragThreshold = null;
synchronized (this) {
dragThreshold = (Integer)desktopProperties.get("gnome.Net/DndDragThreshold");
}
if (dragThreshold != null) {
setDesktopProperty("DnD.gestureMotionThreshold", dragThreshold);
}
}
protected boolean needsXEmbedImpl() {
return true;
}
public boolean isModalityTypeSupported(Dialog.ModalityType modalityType) {
return (modalityType == Dialog.ModalityType.MODELESS) ||
(modalityType == Dialog.ModalityType.APPLICATION_MODAL);
}
public boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType exclusionType) {
return (exclusionType == Dialog.ModalExclusionType.NO_EXCLUDE);
}
private native boolean isSyncUpdated();
private native boolean isSyncFailed();
private native int getEventNumber();
private native void updateSyncSelection();
private static final long WORKAROUND_SLEEP = 100;
/**
* @inheritDoc
*/
protected boolean syncNativeQueue(final long timeout) {
awtLock();
try {
long event_number = getEventNumber();
updateSyncSelection();
// Wait for selection notify for oops on win
long start = System.currentTimeMillis();
while (!isSyncUpdated() && !isSyncFailed()) {
try {
awtLockWait(timeout);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
// This "while" is a protection from spurious
// wake-ups. However, we shouldn't wait for too long
if (((System.currentTimeMillis() - start) > timeout) && (timeout >= 0)) {
throw new OperationTimedOut();
}
}
if (isSyncFailed() && getEventNumber() - event_number == 1) {
awtUnlock();
try {
Thread.sleep(WORKAROUND_SLEEP);
} catch (InterruptedException ie) {
throw new RuntimeException(ie);
} finally {
awtLock();
}
}
return getEventNumber() - event_number > 2;
} finally {
awtUnlock();
}
}
public void grab(Window w) {
WindowPeer peer = (WindowPeer)w.getPeer();
if (peer != null) {
nativeGrab(peer);
}
}
public void ungrab(Window w) {
WindowPeer peer = (WindowPeer)w.getPeer();
if (peer != null) {
nativeUnGrab(peer);
}
}
private native void nativeGrab(WindowPeer peer);
private native void nativeUnGrab(WindowPeer peer);
public boolean isDesktopSupported(){
return false;
}
public DesktopPeer createDesktopPeer(Desktop target)
throws HeadlessException{
throw new UnsupportedOperationException();
}
public final static int
UNDETERMINED_WM = 1,
NO_WM = 2,
OTHER_WM = 3,
OPENLOOK_WM = 4,
MOTIF_WM = 5,
CDE_WM = 6,
ENLIGHTEN_WM = 7,
KDE2_WM = 8,
SAWFISH_WM = 9,
ICE_WM = 10,
METACITY_WM = 11,
COMPIZ_WM = 12,
LG3D_WM = 13;
public static int getWMID() {
String wmName = getWMName();
if ("NO_WM".equals(wmName)) {
return NO_WM;
} else if ("OTHER_WM".equals(wmName)) {
return OTHER_WM;
} else if ("ENLIGHTEN_WM".equals(wmName)) {
return ENLIGHTEN_WM;
} else if ("KDE2_WM".equals(wmName)) {
return KDE2_WM;
} else if ("SAWFISH_WM".equals(wmName)) {
return SAWFISH_WM;
} else if ("ICE_WM".equals(wmName)) {
return ICE_WM;
} else if ("METACITY_WM".equals(wmName)) {
return METACITY_WM;
} else if ("OPENLOOK_WM".equals(wmName)) {
return OPENLOOK_WM;
} else if ("MOTIF_WM".equals(wmName)) {
return MOTIF_WM;
} else if ("CDE_WM".equals(wmName)) {
return CDE_WM;
} else if ("COMPIZ_WM".equals(wmName)) {
return COMPIZ_WM;
} else if ("LG3D_WM".equals(wmName)) {
return LG3D_WM;
}
return UNDETERMINED_WM;
}
private static native String getWMName();
} // class MToolkit

View File

@ -1,49 +0,0 @@
/*
* Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt.motif;
import sun.awt.datatransfer.ToolkitThreadBlockedHandler;
import sun.awt.SunToolkit;
final class MToolkitThreadBlockedHandler implements
ToolkitThreadBlockedHandler {
private static ToolkitThreadBlockedHandler priveleged_lock = null;
static {
priveleged_lock = new MToolkitThreadBlockedHandler();
}
private MToolkitThreadBlockedHandler() {}
static ToolkitThreadBlockedHandler getToolkitThreadBlockedHandler() {
return priveleged_lock;
}
public void lock() {
SunToolkit.awtLock();
}
public void unlock() {
SunToolkit.awtUnlock();
}
public native void enter();
public native void exit();
}

View File

@ -1,72 +0,0 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt.motif;
import java.awt.Image;
class MWindowAttributes {
static int NORMAL = 0;
static int ICONIC = 1;
static int MAXIMIZED = 2;
static int AWT_DECOR_NONE = 0;
static int AWT_DECOR_ALL = 1;
static int AWT_DECOR_BORDER = 2;
static int AWT_DECOR_RESIZEH = 4;
static int AWT_DECOR_TITLE = 8;
static int AWT_DECOR_MENU = 0x10;
static int AWT_DECOR_MINIMIZE = 0x20;
static int AWT_DECOR_MAXIMIZE = 0x40;
static int AWT_UNOBSCURED = 0; // X11 VisibilityUnobscured
static int AWT_PARTIALLY_OBSCURED = 1; // X11 VisibilityPartiallyObscured
static int AWT_FULLY_OBSCURED = 2; // X11 VisibilityFullyObscured
static int AWT_UNKNOWN_OBSCURITY = 3;
boolean nativeDecor;
boolean initialFocus;
boolean isResizable;
int initialState;
int visibilityState; // updated by native X11 event handling code.
String title;
java.awt.Image icon;
int decorations; // for future expansion to be able to
// specify native decorations
private static native void initIDs();
static {
initIDs();
}
MWindowAttributes() {
nativeDecor = false;
initialFocus = false;
isResizable = false;
initialState = NORMAL;
visibilityState = AWT_UNKNOWN_OBSCURITY;
title = null;
icon = null;
decorations = 0;
}
}

View File

@ -1,230 +0,0 @@
/*
* Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt.motif;
import java.awt.*;
import java.util.Hashtable;
import sun.awt.PlatformFont;
/**
* A font metrics object for a WServer font.
*
* @author Jim Graham
*/
public class X11FontMetrics extends FontMetrics {
/**
* The widths of the first 256 characters.
*/
int widths[];
/**
* The standard ascent of the font. This is the logical height
* above the baseline for the Alphanumeric characters and should
* be used for determining line spacing. Note, however, that some
* characters in the font may extend above this height.
*/
int ascent;
/**
* The standard descent of the font. This is the logical height
* below the baseline for the Alphanumeric characters and should
* be used for determining line spacing. Note, however, that some
* characters in the font may extend below this height.
*/
int descent;
/**
* The standard leading for the font. This is the logical amount
* of space to be reserved between the descent of one line of text
* and the ascent of the next line. The height metric is calculated
* to include this extra space.
*/
int leading;
/**
* The standard height of a line of text in this font. This is
* the distance between the baseline of adjacent lines of text.
* It is the sum of the ascent+descent+leading. There is no
* guarantee that lines of text spaced at this distance will be
* disjoint; such lines may overlap if some characters overshoot
* the standard ascent and descent metrics.
*/
int height;
/**
* The maximum ascent for all characters in this font. No character
* will extend further above the baseline than this metric.
*/
int maxAscent;
/**
* The maximum descent for all characters in this font. No character
* will descend further below the baseline than this metric.
*/
int maxDescent;
/**
* The maximum possible height of a line of text in this font.
* Adjacent lines of text spaced this distance apart will be
* guaranteed not to overlap. Note, however, that many paragraphs
* that contain ordinary alphanumeric text may look too widely
* spaced if this metric is used to determine line spacing. The
* height field should be preferred unless the text in a given
* line contains particularly tall characters.
*/
int maxHeight;
/**
* The maximum advance width of any character in this font.
*/
int maxAdvance;
static {
initIDs();
}
/**
* Initialize JNI field and method IDs for fields that may be
accessed from C.
*/
private static native void initIDs();
/**
* Calculate the metrics from the given WServer and font.
*/
public X11FontMetrics(Font font) {
super(font);
init();
}
/**
* Get leading
*/
public int getLeading() {
return leading;
}
/**
* Get ascent.
*/
public int getAscent() {
return ascent;
}
/**
* Get descent
*/
public int getDescent() {
return descent;
}
/**
* Get height
*/
public int getHeight() {
return height;
}
/**
* Get maxAscent
*/
public int getMaxAscent() {
return maxAscent;
}
/**
* Get maxDescent
*/
public int getMaxDescent() {
return maxDescent;
}
/**
* Get maxAdvance
*/
public int getMaxAdvance() {
return maxAdvance;
}
/**
* Return the width of the specified string in this Font.
*/
public int stringWidth(String string) {
return charsWidth(string.toCharArray(), 0, string.length());
}
/**
* Return the width of the specified char[] in this Font.
*/
public int charsWidth(char chars[], int offset, int length) {
Font font = getFont();
PlatformFont pf = ((PlatformFont) font.getPeer());
if (pf.mightHaveMultiFontMetrics()) {
return getMFCharsWidth(chars, offset, length, font);
} else {
if (widths != null) {
int w = 0;
for (int i = offset; i < offset + length; i++) {
int ch = chars[i];
if (ch < 0 || ch >= widths.length) {
w += maxAdvance;
} else {
w += widths[ch];
}
}
return w;
} else {
return maxAdvance * length;
}
}
}
private native int getMFCharsWidth(char chars[], int offset, int length, Font font);
/**
* Return the width of the specified byte[] in this Font.
*/
public native int bytesWidth(byte data[], int off, int len);
/**
* Get the widths of the first 256 characters in the font.
*/
public int[] getWidths() {
return widths;
}
native void init();
static Hashtable table = new Hashtable();
static synchronized FontMetrics getFontMetrics(Font font) {
FontMetrics fm = (FontMetrics)table.get(font);
if (fm == null) {
table.put(font, fm = new X11FontMetrics(font));
}
return fm;
}
}

View File

@ -1,141 +0,0 @@
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifdef HEADLESS
#error This file should not be included in headless library
#endif
#include "awt_p.h"
#include "awt_Component.h"
#include <jni.h>
#include <jni_util.h>
extern int awt_numScreens;
extern AwtScreenDataPtr x11Screens;
extern struct ComponentIDs componentIDs;
extern struct MComponentPeerIDs mComponentPeerIDs;
/*
* Class: sun_awt_DefaultMouseInfoPeer
* Method: fillPointWithCoords
* Signature: (Ljava/awt/Point)I
*/
JNIEXPORT jint JNICALL
Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords(JNIEnv *env, jclass cls,
jobject point)
{
static jclass pointClass = NULL;
jclass pointClassLocal;
static jfieldID xID, yID;
Window rootWindow, childWindow;
int i;
int32_t xr, yr, xw, yw;
uint32_t keys;
Bool pointerFound;
AWT_LOCK();
if (pointClass == NULL) {
pointClassLocal = (*env)->FindClass(env, "java/awt/Point");
DASSERT(pointClassLocal != NULL);
if (pointClassLocal == NULL) {
AWT_UNLOCK();
return (jint)0;
}
pointClass = (jclass)(*env)->NewGlobalRef(env, pointClassLocal);
(*env)->DeleteLocalRef(env, pointClassLocal);
xID = (*env)->GetFieldID(env, pointClass, "x", "I");
yID = (*env)->GetFieldID(env, pointClass, "y", "I");
}
for (i = 0; i < awt_numScreens; i++) {
pointerFound = XQueryPointer(awt_display, x11Screens[i].root,
&rootWindow, &childWindow,
&xr, &yr, &xw, &yw, &keys);
if (pointerFound) {
(*env)->SetIntField(env, point, xID, xr);
(*env)->SetIntField(env, point, yID, yr);
AWT_UNLOCK();
return (jint)i;
}
}
/* This should never happen */
DASSERT(FALSE);
AWT_UNLOCK();
return (jint)0;
}
/*
* Class: sun_awt_DefaultMouseInfoPeer
* Method: isWindowUnderMouse
* Signature: (Ljava/awt/Window)Z
*/
JNIEXPORT jboolean JNICALL Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse
(JNIEnv * env, jclass cls, jobject window)
{
Window rootWindow = None, parentWindow = None, siblingWindow = None;
Window * children = NULL;
int i = 0;
int is_the_same_screen = 0;
int32_t xr = 0, yr = 0, xw = 0, yw = 0;
uint32_t keys = 0;
uint32_t nchildren = 0;
Bool pointerFound = 0;
struct FrameData *wdata = NULL;
jobject winPeer = NULL;
if ((*env)->EnsureLocalCapacity(env, 1) < 0) {
return JNI_FALSE;
}
winPeer = (*env)->GetObjectField(env, window, componentIDs.peer);
if (JNU_IsNull(env, winPeer)) {
return JNI_FALSE;
}
wdata = (struct FrameData *)
JNU_GetLongFieldAsPtr(env, winPeer, mComponentPeerIDs.pData);
(*env)->DeleteLocalRef(env, winPeer);
if (wdata == NULL) {
return JNI_FALSE;
}
AWT_LOCK();
XQueryTree(awt_display, XtWindow(wdata->winData.comp.widget),
&rootWindow, &parentWindow, &children, &nchildren);
is_the_same_screen = XQueryPointer(awt_display, parentWindow,
&rootWindow, &siblingWindow, &xr, &yr, &xw, &yw, &keys);
if (siblingWindow == XtWindow(wdata->winData.comp.widget) && is_the_same_screen) {
AWT_UNLOCK();
return JNI_TRUE;
}
AWT_UNLOCK();
return JNI_FALSE ;
}

View File

@ -1,163 +0,0 @@
/*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*/
#include <X11/IntrinsicP.h>
#include "XDrawingAreaP.h"
#include <Xm/XmP.h>
#include <stdio.h>
#include <malloc.h>
#ifdef DEBUG
#include <jvm.h> /* To get jio_fprintf() */
#endif
/******************************************************************
*
* Provides Canvas widget which allows the X11 visual to be
* changed (the Motif DrawingArea restricts the visual to that
* of the parent widget).
*
******************************************************************/
static XmNavigability WidgetNavigable();
static void ClassInitialize();
static XmBaseClassExtRec baseClassExtRec = {
NULL,
NULLQUARK,
XmBaseClassExtVersion,
sizeof(XmBaseClassExtRec),
NULL, /* InitializePrehook */
NULL, /* SetValuesPrehook */
NULL, /* InitializePosthook */
NULL, /* SetValuesPosthook */
NULL, /* secondaryObjectClass */
NULL, /* secondaryCreate */
NULL, /* getSecRes data */
{ 0 }, /* fastSubclass flags */
NULL, /* getValuesPrehook */
NULL, /* getValuesPosthook */
NULL, /* classPartInitPrehook */
NULL, /* classPartInitPosthook*/
NULL, /* ext_resources */
NULL, /* compiled_ext_resources*/
0, /* num_ext_resources */
FALSE, /* use_sub_resources */
WidgetNavigable, /* widgetNavigable */
NULL /* focusChange */
};
XDrawingAreaClassRec xDrawingAreaClassRec = {
{
/* Core class part */
/* superclass */ (WidgetClass)&xmDrawingAreaClassRec,
/* class_name */ "XDrawingArea",
/* widget_size */ sizeof(XDrawingAreaRec),
/* class_initialize */ ClassInitialize,
/* class_part_initialize*/ NULL,
/* class_inited */ FALSE,
/* initialize */ NULL,
/* initialize_hook */ NULL,
/* realize */ XtInheritRealize,
/* actions */ NULL,
/* num_actions */ 0,
/* resources */ NULL,
/* num_resources */ 0,
/* xrm_class */ NULLQUARK,
/* compress_motion */ FALSE,
/* compress_exposure */ FALSE,
/* compress_enterleave*/ FALSE,
/* visible_interest */ FALSE,
/* destroy */ NULL,
/* resize */ XtInheritResize,
/* expose */ XtInheritExpose,
/* set_values */ NULL,
/* set_values_hook */ NULL,
/* set_values_almost */ XtInheritSetValuesAlmost,
/* get_values_hook */ NULL,
/* accept_focus */ NULL,
/* version */ XtVersion,
/* callback_offsets */ NULL,
/* tm_table */ NULL,
/* query_geometry */ NULL,
/* display_accelerator */ NULL,
/* extension */ (XtPointer)&baseClassExtRec
},
{ /* composite_class fields */
XtInheritGeometryManager, /* geometry_manager */
XtInheritChangeManaged, /* change_managed */
XtInheritInsertChild, /* insert_child */
XtInheritDeleteChild, /* delete_child */
NULL, /* extension */
},
{ /* constraint_class fields */
NULL, /* resource list */
0, /* num resources */
0, /* constraint size */
NULL, /* init proc */
NULL, /* destroy proc */
NULL, /* set values proc */
NULL, /* extension */
},
{ /* manager_class fields */
XtInheritTranslations, /* translations */
NULL, /* syn_resources */
0, /* num_get_resources */
NULL, /* syn_cont_resources */
0, /* num_get_cont_resources */
XmInheritParentProcess, /* parent_process */
NULL, /* extension */
},
{ /* drawingArea class */
/* extension */ NULL
},
/* XDrawingArea class part */
{
/* extension */ NULL
}
};
WidgetClass xDrawingAreaClass = (WidgetClass)&xDrawingAreaClassRec;
static void ClassInitialize( void )
{
baseClassExtRec.record_type = XmQmotif ;
}
static XmNavigability WidgetNavigable(Widget wid)
{
return XmCONTROL_NAVIGABLE;
}

View File

@ -1,37 +0,0 @@
/*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*/
#ifndef _XDrawingArea_h_
#define _XDrawingArea_h_
extern WidgetClass xDrawingAreaClass;
typedef struct _XDrawingAreaClassRec *XDrawingAreaWidgetClass;
typedef struct _XDrawingAreaRec *XDrawingAreaWidget;
#endif /* !_VDrawingArea_h_ */

View File

@ -1,77 +0,0 @@
/*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*/
#ifndef _XDrawingAreaP_h_
#define _XDrawingAreaP_h_
#include <Xm/DrawingAP.h>
#include "XDrawingArea.h"
/***************************************************************
* VDrawingArea Widget Data Structures
*
*
**************************************************************/
/* Define part class structure */
typedef struct _XDrawingAreaClass {
XtPointer extension;
} XDrawingAreaClassPart;
/* Define the full class record */
typedef struct _XDrawingAreaClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
XmManagerClassPart manager_class;
XmDrawingAreaClassPart drawing_area_class;
XDrawingAreaClassPart xdrawingarea_class;
} XDrawingAreaClassRec;
/* External definition for class record */
extern XDrawingAreaClassRec xDrawingAreaClassRec;
/****************************************************************
*
* Full instance record declaration
*
****************************************************************/
typedef struct _XDrawingAreaRec
{
CorePart core;
CompositePart composite;
ConstraintPart constraint;
XmManagerPart manager;
XmDrawingAreaPart drawing_area;
} XDrawingAreaRec;
#endif /* !_VDrawingAreaP_h_ */

View File

@ -90,74 +90,12 @@ extern void awt_output_flush();
* Unfortunately AWT_LOCK debugging does not work with XAWT due to mixed
* Java/C use of AWT lock.
*/
#if defined(DEBUG_AWT_LOCK) && !defined(XAWT)
extern int awt_locked;
extern char *lastF;
extern int lastL;
#define AWT_LOCK() do { \
if (!awtLockInited) { \
jio_fprintf(stderr, "AWT lock error, awt_lock is null\n"); \
} \
if (awt_locked < 0) { \
jio_fprintf(stderr, \
"AWT lock error (%s,%d) (last held by %s,%d) %d\n", \
__FILE__, __LINE__, lastF, lastL, awt_locked); \
} \
lastF = __FILE__; \
lastL = __LINE__; \
AWT_LOCK_IMPL(); \
++awt_locked; \
} while (0)
#define AWT_NOFLUSH_UNLOCK() do { \
lastF = ""; \
lastL = -1; \
if (awt_locked < 1) { \
jio_fprintf(stderr, "AWT unlock error (%s,%d,%d)\n", \
__FILE__, __LINE__, awt_locked); \
} \
--awt_locked; \
AWT_NOFLUSH_UNLOCK_IMPL(); \
} while (0)
#define AWT_WAIT(tm) do { \
int old_lockcount = awt_locked; \
if (awt_locked < 1) { \
jio_fprintf(stderr, "AWT wait error (%s,%d,%d)\n", \
__FILE__, __LINE__, awt_locked); \
} \
awt_locked = 0; \
AWT_WAIT_IMPL(tm); \
awt_locked = old_lockcount; \
} while (0)
#define AWT_NOTIFY() do { \
if (awt_locked < 1) { \
jio_fprintf(stderr, "AWT notify error (%s,%d,%d)\n", \
__FILE__, __LINE__, awt_locked); \
} \
AWT_NOTIFY_IMPL(); \
} while(0)
#define AWT_NOTIFY_ALL() do { \
if (awt_locked < 1) { \
jio_fprintf(stderr, "AWT notify all error (%s,%d,%d)\n", \
__FILE__, __LINE__, awt_locked); \
} \
AWT_NOTIFY_ALL_IMPL(); \
} while (0)
#else
#define AWT_LOCK() AWT_LOCK_IMPL()
#define AWT_NOFLUSH_UNLOCK() AWT_NOFLUSH_UNLOCK_IMPL()
#define AWT_WAIT(tm) AWT_WAIT_IMPL(tm)
#define AWT_NOTIFY() AWT_NOTIFY_IMPL()
#define AWT_NOTIFY_ALL() AWT_NOTIFY_ALL_IMPL()
#endif /* DEBUG_AWT_LOCK && !XAWT */
#ifndef HEADLESS
extern Display *awt_display; /* awt_GraphicsEnv.c */
extern Boolean awt_ModLockIsShiftLock; /* XToolkit.c */

View File

@ -40,14 +40,11 @@
#include "java_awt_event_KeyEvent.h"
#include "jni_util.h"
#include "canvas.h"
#include "awt_AWTEvent.h"
#include "awt_Component.h"
struct AWTEventIDs awtEventIDs;
struct InputEventIDs inputEventIDs;
struct KeyEventIDs keyEventIDs;
struct MComponentPeerIDs mComponentPeerIDs;
JNIEXPORT void JNICALL
Java_java_awt_AWTEvent_initIDs(JNIEnv *env, jclass cls)
@ -69,61 +66,10 @@ Java_java_awt_event_KeyEvent_initIDs(JNIEnv *env, jclass cls)
keyEventIDs.keyCode = (*env)->GetFieldID(env, cls, "keyCode", "I");
keyEventIDs.keyChar = (*env)->GetFieldID(env, cls, "keyChar", "C");
}
#ifndef XAWT
JNIEXPORT void JNICALL
Java_java_awt_AWTEvent_nativeSetSource(JNIEnv *env, jobject self,
jobject newSource)
{
jbyteArray bdata;
AWT_LOCK();
bdata = (jbyteArray)(*env)->GetObjectField(env, self, awtEventIDs.bdata);
if (bdata != NULL) {
XEvent *xev;
Window w;
jboolean dummy;
/* get the widget out of the peer newSource */
struct ComponentData *cdata = (struct ComponentData *)
JNU_GetLongFieldAsPtr(env, newSource, mComponentPeerIDs.pData);
if (JNU_IsNull(env, cdata) || (cdata == NULL) ||
((cdata->widget != NULL) && (XtIsObject(cdata->widget)) &&
(cdata->widget->core.being_destroyed))) {
JNU_ThrowNullPointerException(env, "null widget");
AWT_UNLOCK();
return;
}
/* get the Window out of the widget */
w = XtWindow(cdata->widget);
if (w == None) {
JNU_ThrowNullPointerException(env, "null window");
AWT_UNLOCK();
return;
}
/* reset the filed in the event */
xev = (XEvent *)(*env)->GetPrimitiveArrayCritical(env, bdata, &dummy);
if (xev == NULL) {
JNU_ThrowNullPointerException(env, "null data");
AWT_UNLOCK();
return;
}
xev->xany.window = w;
(*env)->ReleasePrimitiveArrayCritical(env, bdata, (void *)xev, 0);
}
AWT_UNLOCK();
}
#else
JNIEXPORT void JNICALL
Java_java_awt_AWTEvent_nativeSetSource(JNIEnv *env, jobject self,
jobject newSource)
{
}
#endif

View File

@ -42,25 +42,3 @@ struct ComponentIDs {
jmethodID getParent;
jmethodID getLocationOnScreen;
};
/* field and method IDs for Container */
struct ContainerIDs {
jfieldID layoutMgr;
jmethodID getComponents;
jmethodID findComponentAt;
};
/* fieldIDs for MComponentPeer fields that may be accessed from C */
struct MComponentPeerIDs {
jfieldID pData;
jfieldID target;
jfieldID jniGlobalRef;
jfieldID graphicsConfig;
jfieldID drawState;
jmethodID isFocusableMID;
};
#ifndef HEADLESS
extern void processTree(Widget from, Widget to, Boolean action);
#endif // HEADLESS

View File

@ -1,43 +0,0 @@
/*
* Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "jni_util.h"
#include "awt_p.h"
#define CACHE_UPDATE 0 /* cache the component and update cursor */
#define UPDATE_ONLY 1 /* update cursor, but not cache component */
#define CACHE_ONLY 2 /* cache the component, no cursor update */
/* fieldIDs for Cursor fields that may be accessed from C */
struct CursorIDs {
jfieldID type;
jmethodID mSetPData;
jfieldID pData;
};
#ifndef HEADLESS
Cursor getCursor(JNIEnv *env, jobject jCur);
void updateCursor(XPointer client_data, int32_t replace);
#endif /* !HEADLESS */

View File

@ -29,30 +29,21 @@
#include "awt_p.h"
#include "java_awt_Component.h"
//#include "sun_awt_motif_MComponentPeer.h"
#include "awt_Component.h"
#include <jni.h>
#include <jni_util.h>
#include <jawt_md.h>
extern struct MComponentPeerIDs mComponentPeerIDs;
extern struct ComponentIDs componentIDs;
#ifndef XAWT
extern AwtGraphicsConfigDataPtr
getGraphicsConfigFromComponentPeer(JNIEnv *env, jobject this);
#endif
#ifdef XAWT
#include "awt_GraphicsEnv.h"
extern jfieldID windowID;
extern jfieldID targetID;
extern jfieldID graphicsConfigID;
extern jfieldID drawStateID;
extern struct X11GraphicsConfigIDs x11GraphicsConfigIDs;
#endif
/*
* Lock the surface of the target component for native rendering.
@ -109,13 +100,8 @@ JNIEXPORT jint JNICALL awt_DrawingSurface_Lock(JAWT_DrawingSurface* ds)
return (jint)JAWT_LOCK_ERROR;
}
#ifndef XAWT
drawState = (*env)->GetIntField(env, peer, mComponentPeerIDs.drawState);
(*env)->SetIntField(env, peer, mComponentPeerIDs.drawState, 0);
#else
drawState = (*env)->GetIntField(env, peer, drawStateID);
(*env)->SetIntField(env, peer, drawStateID, 0);
#endif
return drawState;
}
@ -127,9 +113,7 @@ JNIEXPORT int32_t JNICALL
jclass componentClass;
AwtGraphicsConfigDataPtr adata;
int32_t result;
#ifdef XAWT
jobject gc_object;
#endif
if (ds == NULL) {
#ifdef DEBUG
fprintf(stderr, "Drawing Surface is NULL\n");
@ -164,9 +148,6 @@ JNIEXPORT int32_t JNICALL
AWT_UNLOCK();
return (int32_t) 0;
}
#ifndef XAWT
adata = getGraphicsConfigFromComponentPeer(env, peer);
#else
/* GraphicsConfiguration object of MComponentPeer */
gc_object = (*env)->GetObjectField(env, peer, graphicsConfigID);
@ -177,7 +158,6 @@ JNIEXPORT int32_t JNICALL
} else {
adata = getDefaultConfig(DefaultScreen(awt_display));
}
#endif
result = adata->AwtColorMatch(r, g, b, adata);
AWT_UNLOCK();
@ -201,9 +181,6 @@ awt_DrawingSurface_GetDrawingSurfaceInfo(JAWT_DrawingSurface* ds)
jclass componentClass;
JAWT_X11DrawingSurfaceInfo* px;
JAWT_DrawingSurfaceInfo* p;
#ifndef XAWT
struct ComponentData *cdata;
#endif
XWindowAttributes attrs;
if (ds == NULL) {
@ -241,31 +218,14 @@ awt_DrawingSurface_GetDrawingSurfaceInfo(JAWT_DrawingSurface* ds)
return NULL;
}
#ifndef XAWT
/* Get the component data from the peer */
cdata = (struct ComponentData *)
JNU_GetLongFieldAsPtr(env, peer, mComponentPeerIDs.pData);
if (cdata == NULL) {
#ifdef DEBUG
fprintf(stderr, "Component data is NULL\n");
#endif
AWT_UNLOCK();
return NULL;
}
#endif
AWT_UNLOCK();
AWT_UNLOCK();
/* Allocate platform-specific data */
px = (JAWT_X11DrawingSurfaceInfo*)
malloc(sizeof(JAWT_X11DrawingSurfaceInfo));
/* Set drawable and display */
#ifndef XAWT
px->drawable = XtWindow(cdata->widget);
#else
px->drawable = (*env)->GetLongField(env, peer, windowID);
#endif
px->display = awt_display;
/* Get window attributes to set other values */
@ -392,21 +352,7 @@ JNIEXPORT jobject JNICALL
AWT_LOCK();
#ifndef XAWT
if (window != None) {
widget = XtWindowToWidget(awt_display, window);
}
if (widget != NULL) {
XtVaGetValues (widget, XmNuserData, &peer, NULL);
}
if (peer != NULL) {
target = (*env)->GetObjectField(env, peer, mComponentPeerIDs.target);
}
#else
target = (*env)->GetObjectField(env, peer, targetID);
#endif
if (target == NULL) {
JNU_ThrowNullPointerException(env, "NullPointerException");

View File

@ -30,8 +30,6 @@
#include "java_awt_Component.h"
#include "java_awt_Font.h"
#include "java_awt_FontMetrics.h"
#include "sun_awt_motif_MToolkit.h"
#include "sun_awt_motif_X11FontMetrics.h"
#include "sun_awt_X11GraphicsEnvironment.h"
#include "awt_Font.h"
@ -100,57 +98,6 @@ Java_java_awt_Font_initIDs
}
#ifndef HEADLESS
/* fieldIDs for X11FontMetrics fields that may be accessed from C */
static struct X11FontMetricsIDs {
jfieldID widths;
jfieldID font;
jfieldID ascent;
jfieldID descent;
jfieldID leading;
jfieldID height;
jfieldID maxAscent;
jfieldID maxDescent;
jfieldID maxHeight;
jfieldID maxAdvance;
} x11FontMetricsIDs;
/*
* Class: sun_awt_motif_X11FontMetrics
* Method: initIDs
* Signature: ()V
*/
/* This function gets called from the static initializer for
X11FontMetrics.java to initialize the fieldIDs for fields
that may be accessed from C */
JNIEXPORT void JNICALL
Java_sun_awt_motif_X11FontMetrics_initIDs
(JNIEnv *env, jclass cls)
{
x11FontMetricsIDs.widths = (*env)->GetFieldID(env, cls, "widths", "[I");
x11FontMetricsIDs.font =
(*env)->GetFieldID(env, cls, "font", "Ljava/awt/Font;");
x11FontMetricsIDs.ascent =
(*env)->GetFieldID(env, cls, "ascent", "I");
x11FontMetricsIDs.descent =
(*env)->GetFieldID(env, cls, "descent", "I");
x11FontMetricsIDs.leading =
(*env)->GetFieldID(env, cls, "leading", "I");
x11FontMetricsIDs.height =
(*env)->GetFieldID(env, cls, "height", "I");
x11FontMetricsIDs.maxAscent =
(*env)->GetFieldID(env, cls, "maxAscent", "I");
x11FontMetricsIDs.maxDescent =
(*env)->GetFieldID(env, cls, "maxDescent", "I");
x11FontMetricsIDs.maxHeight =
(*env)->GetFieldID(env, cls, "maxHeight", "I");
x11FontMetricsIDs.maxAdvance =
(*env)->GetFieldID(env, cls, "maxAdvance", "I");
}
/* fieldIDs for FontDescriptor fields that may be accessed from C */
static struct FontDescriptorIDs {
jfieldID nativeName;
@ -182,27 +129,6 @@ Java_sun_awt_FontDescriptor_initIDs
#endif /* !HEADLESS */
}
#ifndef HEADLESS
struct MFontPeerIDs mFontPeerIDs;
/*
* Class: sun_awt_motif_MFontPeer
* Method: initIDs
* Signature: ()V
*/
/* This function gets called from the static initializer for
MFontPeer.java to initialize the fieldIDs for fields
that may be accessed from C */
JNIEXPORT void JNICALL
Java_sun_awt_motif_MFontPeer_initIDs
(JNIEnv *env, jclass cls)
{
mFontPeerIDs.xfsname =
(*env)->GetFieldID(env, cls, "xfsname", "Ljava/lang/String;");
}
#endif /* !HEADLESS */
/*
* Class: sun_awt_PlatformFont
* Method: initIDs
@ -746,193 +672,6 @@ awtJNI_GetFontData(JNIEnv * env, jobject font, char **errmsg)
}
}
/*
* Class: sun_awt_motif_X11FontMetrics
* Method: getMFCharsWidth
* Signature: ([CIILjava/awt/Font;)I
*/
JNIEXPORT jint JNICALL Java_sun_awt_motif_X11FontMetrics_getMFCharsWidth
(JNIEnv *env, jobject this, jcharArray data, jint offset, jint length, jobject font)
{
jint retVal = 0;
AWT_LOCK();
retVal = awtJNI_GetMFStringWidth(env, data, offset, length, font);
AWT_UNLOCK();
return retVal;
}
/*
* Class: sun_awt_motif_X11FontMetrics
* Method: bytesWidth
* Signature: ([BII)I
*/
JNIEXPORT jint JNICALL Java_sun_awt_motif_X11FontMetrics_bytesWidth
(JNIEnv *env, jobject this, jbyteArray str, jint off, jint len)
{
jint w = 0;
unsigned char *s = NULL, *tmpPointer = NULL;
int32_t ch = 0;
int32_t cnt = 0;
jobject widths = NULL;
jint tempWidths[256];
jint maxAdvance = 0;
int32_t widlen = 0;
if (JNU_IsNull(env, str)) {
JNU_ThrowNullPointerException(env, "NullPointerException");
return 0;
}
cnt = (*env)->GetArrayLength(env, str);
if (cnt == 0) {
return 0;
}
widths = (*env)->GetObjectField(env, this, x11FontMetricsIDs.widths);
maxAdvance = (*env)->GetIntField(env, this, x11FontMetricsIDs.maxAdvance);
if (!JNU_IsNull(env, widths)) {
w = 0;
widlen = (*env)->GetArrayLength(env, widths);
(*env)->GetIntArrayRegion(env, widths, 0, widlen, (jint *) tempWidths);
s = tmpPointer = (unsigned char *) (*env)->GetPrimitiveArrayCritical(env, str, NULL);
if (s == NULL) {
return 0;
}
while (--cnt >= 0) {
ch = *tmpPointer++;
if (ch < widlen) {
w += tempWidths[ch];
} else {
w += maxAdvance;
}
}
(*env)->ReleasePrimitiveArrayCritical(env, str, (jchar *) s, JNI_ABORT);
} else {
w = maxAdvance * cnt;
}
return w;
}
/*
* Class: sun_awt_motif_X11FontMetrics
* Method: init
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_sun_awt_motif_X11FontMetrics_init
(JNIEnv *env, jobject this)
{
jobject font = NULL;
struct FontData *fdata = NULL;
jint tempWidths[256];
jintArray widths = NULL;
int32_t ccount = 0;
int32_t i = 0;
int32_t tempWidthsIndex = 0;
char *err = NULL;
if (JNU_IsNull(env, this)) {
JNU_ThrowNullPointerException(env, "NullPointerException");
return;
}
AWT_LOCK();
font = (*env)->GetObjectField(env, this, x11FontMetricsIDs.font);
if (JNU_IsNull(env, this)) {
JNU_ThrowNullPointerException(env, "NullPointerException");
AWT_UNLOCK();
return;
}
fdata = awtJNI_GetFontData(env, font, &err);
if (fdata == NULL) {
JNU_ThrowInternalError(env, err);
AWT_UNLOCK();
return;
}
/*
* Bug 4103248, 4120310. We must take all of the fonts into
* consideration in providing the metrics, not just the 8859-1 font,
* because the underlying Motif widgets are.
*/
if (awtJNI_IsMultiFont(env, font) && fdata->xfs == NULL) {
fdata->xfs = awtJNI_MakeFontSet(env, font);
}
if (fdata->xfs != NULL) {
XFontSetExtents *fs_extents = NULL;
fs_extents = XExtentsOfFontSet(fdata->xfs);
(*env)->SetIntField(env, this, x11FontMetricsIDs.maxAscent,
(jint)(-fs_extents->max_logical_extent.y));
(*env)->SetIntField(env, this, x11FontMetricsIDs.maxDescent,
(jint)(fs_extents->max_logical_extent.height +
fs_extents->max_logical_extent.y));
(*env)->SetIntField(env, this, x11FontMetricsIDs.maxAdvance,
(jint)(fs_extents->max_logical_extent.width));
(*env)->SetIntField(env, this, x11FontMetricsIDs.ascent,
(jint)(-fs_extents->max_ink_extent.y));
(*env)->SetIntField(env, this, x11FontMetricsIDs.descent,
(jint)(fs_extents->max_ink_extent.height +
fs_extents->max_ink_extent.y));
} else {
(*env)->SetIntField(env, this, x11FontMetricsIDs.maxAscent,
(jint) fdata->xfont->max_bounds.ascent);
(*env)->SetIntField(env, this, x11FontMetricsIDs.maxDescent,
(jint) fdata->xfont->max_bounds.descent);
(*env)->SetIntField(env, this, x11FontMetricsIDs.maxAdvance,
(jint) fdata->xfont->max_bounds.width);
(*env)->SetIntField(env, this, x11FontMetricsIDs.ascent,
(jint) fdata->xfont->ascent);
(*env)->SetIntField(env, this, x11FontMetricsIDs.descent,
(jint) fdata->xfont->descent);
}
(*env)->SetIntField(env, this, x11FontMetricsIDs.leading, (jint) 1);
(*env)->SetIntField(env, this, x11FontMetricsIDs.height,
(jint) fdata->xfont->ascent + fdata->xfont->descent + 1);
(*env)->SetIntField(env, this, x11FontMetricsIDs.maxHeight,
(jint) fdata->xfont->max_bounds.ascent
+ fdata->xfont->max_bounds.descent + 1);
widths = (*env)->NewIntArray(env, 256);
(*env)->SetObjectField(env, this, x11FontMetricsIDs.widths, widths);
if (JNU_IsNull(env, widths)) {
JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError");
AWT_UNLOCK();
return;
}
/*
* We could pin the array and then release it, but I believe this method
* is faster and perturbs the VM less
*
*/
memset(tempWidths, 0, 256 * sizeof(jint));
tempWidthsIndex = fdata->xfont->min_char_or_byte2;
ccount = fdata->xfont->max_char_or_byte2 - fdata->xfont->min_char_or_byte2;
if (fdata->xfont->per_char) {
for (i = 0; i <= ccount; i++) {
tempWidths[tempWidthsIndex++] = (jint) fdata->xfont->per_char[i].width;
}
} else {
for (i = 0; i <= ccount; i++) {
tempWidths[tempWidthsIndex++] = (jint) fdata->xfont->max_bounds.width;
}
}
(*env)->SetIntArrayRegion(env, widths, 0, 256, (jint *) tempWidths);
AWT_UNLOCK();
}
/*
* Registered with the 2D disposer to be called after the Font is GC'd.
*/

View File

@ -34,8 +34,8 @@ struct FontIDs {
jmethodID getFamily;
};
/* fieldIDs for MFontPeer fields that may be accessed from C */
struct MFontPeerIDs {
/* fieldIDs for XFontPeer fields that may be accessed from C */
struct XFontPeerIDs {
jfieldID xfsname;
};

View File

@ -45,7 +45,6 @@
#include <stdlib.h>
#include "awt_GraphicsEnv.h"
#include "awt_Window.h"
#include "awt_util.h"
#include "gdefs.h"
#include <dlfcn.h>
@ -94,8 +93,6 @@ jboolean awtLockInited = JNI_FALSE;
struct X11GraphicsConfigIDs x11GraphicsConfigIDs;
struct X11GraphicsDeviceIDs x11GraphicsDeviceIDs;
extern struct WindowIDs mWindowIDs;
extern struct MWindowPeerIDs mWindowPeerIDs;
#ifndef HEADLESS
int awtCreateX11Colormap(AwtGraphicsConfigDataPtr adata);
@ -570,75 +567,6 @@ getAllConfigs (JNIEnv *env, int screen, AwtScreenDataPtr screenDataPtr) {
AWT_UNLOCK ();
}
/*
* Determing if this top-level has been moved onto another Xinerama screen.
* Called from awt_TopLevel.c
*
* ASSUME: wdata != null
*/
#ifndef HEADLESS
void checkNewXineramaScreen(JNIEnv* env, jobject peer, struct FrameData* wdata,
int32_t newX, int32_t newY,
int32_t newWidth, int32_t newHeight) {
int i;
int amt;
int totAmt = 0;
int largestAmt = 0;
int largestAmtScr = 0;
int horiz;
int vert;
if (!usingXinerama) { return; }
totAmt = newWidth * newHeight;
/* assert that peer implements WindowPeer */
DASSERT(JNU_IsInstanceOfByName(env, peer, "java/awt/peer/WindowPeer"));
DTRACE_PRINTLN4("checkNewXineramaScreen() x=%i y=%i w=%i h=%i\n",newX, newY, newWidth, newHeight);
/* decide which screen we're on
* if we're spanning, figure out which screen we're most on
*/
for (i = 0; i < awt_numScreens; i++) {
if (INTERSECTS(newX, newX + newWidth, newY, newY + newHeight,
fbrects[i].x, fbrects[i].x + fbrects[i].width,
fbrects[i].y, fbrects[i].y + fbrects[i].height)) {
/* calc how much of window is on this screen */
horiz = MIN(newX + newWidth, fbrects[i].x + fbrects[i].width) -
MAX(newX, fbrects[i].x);
vert = MIN(newY + newHeight, fbrects[i].y + fbrects[i].height) -
MAX(newY, fbrects[i].y);
DASSERT(horiz > 0);
DASSERT(vert > 0);
amt = horiz * vert;
if (amt == totAmt) {
/* completely on this screen - done! */
largestAmtScr = i;
break;
}
if (amt > largestAmt) {
largestAmt = amt;
largestAmtScr = i;
}
}
}
#ifndef XAWT
/* check if we're on a new screen */
if (largestAmtScr != wdata->screenNum) {
wdata->screenNum = largestAmtScr;
/* update peer, target Comp */
(*env)->CallVoidMethod(env, peer,
mWindowPeerIDs.draggedToScreenMID, largestAmtScr);
}
#endif /* XAWT */
}
#endif /* HEADLESS */
#ifndef HEADLESS
#ifdef __linux__
static void xinerama_init_linux()

View File

@ -30,28 +30,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#ifdef XAWT
#include <sys/time.h>
#else /* !XAWT */
#include <Xm/Xm.h>
#include <Xm/RowColumn.h>
#include <Xm/MwmUtil.h>
#include <Xm/MenuShell.h>
#endif /* XAWT */
#include "awt.h"
#include "awt_p.h"
#include <sun_awt_X11InputMethod.h>
#ifdef XAWT
#include <sun_awt_X11_XComponentPeer.h>
#include <sun_awt_X11_XInputMethod.h>
#else /* !XAWT */
#include <sun_awt_motif_MComponentPeer.h>
#include <sun_awt_motif_MInputMethod.h>
#define MCOMPONENTPEER_CLASS_NAME "sun/awt/motif/MComponentPeer"
#endif /* XAWT */
#define THROW_OUT_OF_MEMORY_ERROR() \
JNU_ThrowOutOfMemoryError((JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2), NULL)
@ -111,11 +97,7 @@ static XIMProc callback_funcs[NCALLBACKS] = {
typedef struct {
Window w; /*status window id */
Window root; /*the root window id */
#ifdef XAWT
Window parent; /*parent shell window */
#else
Widget parent; /*parent shell window */
#endif
int x, y; /*parent's upperleft position */
int width, height; /*parent's width, height */
GC lightGC; /*gc for light border */
@ -141,17 +123,10 @@ typedef struct _X11InputMethodData {
XIC ic_active; /* X Input Context for active clients */
XIC ic_passive; /* X Input Context for passive clients */
XIMCallback *callbacks; /* callback parameters */
#ifndef XAWT
jobject peer; /* MComponentPeer of client Window */
#endif /* XAWT */
jobject x11inputmethod; /* global ref to X11InputMethod instance */
/* associated with the XIC */
#ifdef __linux__
StatusWindow *statusWindow; /* our own status window */
#else
#ifndef XAWT
Widget statusWidget; /* IM status window widget */
#endif /* XAWT */
#endif
char *lookup_buf; /* buffer used for XmbLookupString */
int lookup_buf_len; /* lookup buffer size in bytes */
@ -191,12 +166,6 @@ Display * dpy = NULL;
#define GetJNIEnv() (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2)
#ifndef XAWT
static jobject mcompClass = NULL;
static jobject awteventClass = NULL;
static jfieldID mcompPDataID = NULL;
#endif /* XAWT */
static void DestroyXIMCallback(XIM, XPointer, XPointer);
static void OpenXIMCallback(Display *, XPointer, XPointer);
/* Solaris XIM Extention */
@ -261,28 +230,6 @@ wcstombsdmp(wchar_t *wcs, int len)
return mbs;
}
#ifndef XAWT
/*
* Find a class for the given class name and return a global reference to the
* class.
*/
static jobject
findClass(const char *className)
{
JNIEnv *env = GetJNIEnv();
jclass classClass;
jobject objectClass;
classClass = (*env)->FindClass(env, className);
objectClass = (*env)->NewGlobalRef(env,classClass);
if (JNU_IsNull(env, objectClass)) {
JNU_ThrowClassNotFoundException(env, className);
}
return objectClass;
}
#endif /* XAWT */
/*
* Returns True if the global reference is still in the list,
* otherwise False.
@ -444,9 +391,6 @@ freeX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData)
free((void *)pX11IMData->callbacks);
if (env) {
#ifndef XAWT
(*env)->DeleteGlobalRef(env, pX11IMData->peer);
#endif /* XAWT */
/* Remove the global reference from the list, so that
the callback function or whoever refers to it could know.
*/
@ -580,23 +524,10 @@ awt_x11inputmethod_lookupString(XKeyPressedEvent *event, KeySym *keysymp)
/* Get keysym without taking modifiers into account first to map
* to AWT keyCode table.
*/
#ifndef XAWT
if (((event->state & ShiftMask) ||
(event->state & LockMask)) &&
keysym >= 'A' && keysym <= 'Z')
{
keysym = XLookupKeysym(event, 0);
}
#endif
switch (status) {
case XLookupBoth:
if (!composing) {
#ifdef XAWT
if (event->keycode != 0) {
#else
if (keysym < 128 || ((keysym & 0xff00) == 0xff00)) {
#endif
*keysymp = keysym;
result = False;
break;
@ -650,11 +581,7 @@ awt_x11inputmethod_lookupString(XKeyPressedEvent *event, KeySym *keysymp)
#ifdef __linux__
static StatusWindow *createStatusWindow(
#ifdef XAWT
Window parent) {
#else
Widget parent) {
#endif
StatusWindow *statusWindow;
XSetWindowAttributes attrib;
unsigned long attribmask;
@ -682,22 +609,12 @@ static StatusWindow *createStatusWindow(
Window *ignoreWindowPtr;
unsigned int ignoreUnit;
#ifdef XAWT
XGetGeometry(dpy, parent, &rootWindow, &x, &y, &w, &h, &bw, &depth);
#else
while (!XtIsShell(parent)){
parent = XtParent(parent);
}
#endif
attrib.override_redirect = True;
attribmask = CWOverrideRedirect;
for (i = 0; i < awt_numScreens; i++) {
#ifdef XAWT
if (RootWindow(dpy, i) == rootWindow) {
#else
if (ScreenOfDisplay(dpy, i) == XtScreen(parent)) {
#endif
screen = i;
break;
}
@ -798,11 +715,7 @@ static StatusWindow *createStatusWindow(
/* This method is to turn off or turn on the status window. */
static void onoffStatusWindow(X11InputMethodData* pX11IMData,
#ifdef XAWT
Window parent,
#else
Widget parent,
#endif
Bool ON){
XWindowAttributes xwa;
Window child;
@ -820,15 +733,9 @@ static void onoffStatusWindow(X11InputMethodData* pX11IMData,
statusWindow->on = False;
return;
}
#ifdef XAWT
parent = JNU_CallMethodByName(GetJNIEnv(), NULL, pX11IMData->x11inputmethod,
"getCurrentParentWindow",
"()J").j;
#else
while (!XtIsShell(parent)){
parent = XtParent(parent);
}
#endif
if (statusWindow->parent != parent){
statusWindow->parent = parent;
}
@ -941,11 +848,7 @@ void statusWindowEventHandler(XEvent event){
}
}
#ifdef XAWT
static void adjustStatusWindow(Window shell){
#else
void adjustStatusWindow(Widget shell){
#endif
JNIEnv *env = GetJNIEnv();
X11InputMethodData *pX11IMData = NULL;
StatusWindow *statusWindow;
@ -957,11 +860,7 @@ void adjustStatusWindow(Widget shell){
|| !statusWindow->on) {
return;
}
#ifdef XAWT
{
#else
if (statusWindow->parent == shell) {
#endif
XWindowAttributes xwa;
int x, y;
Window child;
@ -1009,12 +908,7 @@ void adjustStatusWindow(Widget shell){
* fallback to None styles.
*/
static Bool
#ifdef XAWT
createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w)
#else /* !XAWT */
createXIC(Widget w, X11InputMethodData *pX11IMData,
jobject tc, jobject peer)
#endif /* XAWT */
{
XIC active_ic, passive_ic;
XVaNestedList preedit = NULL;
@ -1031,17 +925,9 @@ createXIC(Widget w, X11InputMethodData *pX11IMData,
if (X11im == NULL) {
return False;
}
#ifdef XAWT
if (!w) {
return False;
}
#else /* !XAWT */
/*
* If the parent window has one or more TextComponents, the status
* area of Motif will be shared with the created XIC. Otherwise,
* root-window style status is used.
*/
#endif /* XAWT */
ret = XGetIMValues(X11im, XNQueryInputStyle, &im_styles, NULL);
@ -1064,28 +950,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData,
}
}
#else /*! __linux__ */
#ifdef XAWT
on_the_spot_styles |= XIMStatusNothing;
#else /* !XAWT */
/*
* If the parent window has one or more TextComponents, the status
* area of Motif will be shared with the created XIC. Otherwise,
* root-window style status is used.
*/
if (tc != NULL){
XVaNestedList status = NULL;
status = awt_motif_getXICStatusAreaList(w, tc);
if (status != NULL){
on_the_spot_styles |= XIMStatusArea;
XFree(status);
}
else
on_the_spot_styles |= XIMStatusNothing;
}
else
on_the_spot_styles |= XIMStatusNothing;
#endif /* XAWT */
#endif /* __linux__ */
for (i = 0; i < im_styles->count_styles; i++) {
@ -1157,32 +1022,12 @@ createXIC(Widget w, X11InputMethodData *pX11IMData,
XFree((void *)preedit);
}
#else /* !__linux__ */
#ifndef XAWT
if (on_the_spot_styles & XIMStatusArea) {
Widget parent;
status = awt_motif_getXICStatusAreaList(w, tc);
if (status == NULL)
goto err;
pX11IMData->statusWidget = awt_util_getXICStatusAreaWindow(w);
pX11IMData->ic_active = XCreateIC(X11im,
XNClientWindow, pX11IMData->statusWidget,
XNFocusWindow, w,
XNInputStyle, active_styles,
XNPreeditAttributes, preedit,
XNStatusAttributes, status,
NULL);
XFree((void *)status);
} else {
#endif /* XAWT */
pX11IMData->ic_active = XCreateIC(X11im,
XNClientWindow, w,
XNFocusWindow, w,
XNInputStyle, active_styles,
XNPreeditAttributes, preedit,
NULL);
#ifndef XAWT
}
#endif /* XAWT */
XFree((void *)preedit);
#endif /* __linux__ */
pX11IMData->ic_passive = XCreateIC(X11im,
@ -1479,7 +1324,7 @@ static void DestroyXIMCallback(XIM im, XPointer client_data, XPointer call_data)
}
/*
* Class: java_sun_awt_motif_X11InputMethod
* Class: sun_awt_X11InputMethod
* Method: initIDs
* Signature: ()V
*/
@ -1495,24 +1340,15 @@ Java_sun_awt_X11InputMethod_initIDs(JNIEnv *env, jclass cls)
JNIEXPORT jboolean JNICALL
#ifdef XAWT
Java_sun_awt_X11_XInputMethod_openXIMNative(JNIEnv *env,
jobject this,
jlong display)
#else
Java_sun_awt_motif_MInputMethod_openXIMNative(JNIEnv *env,
jobject this)
#endif
{
Bool registered;
AWT_LOCK();
#ifdef XAWT
dpy = (Display *)jlong_to_ptr(display);
#else
dpy = awt_display;
#endif
/* Use IMInstantiate call back only on Linux, as there is a bug in Solaris
(4768335)
@ -1534,30 +1370,17 @@ Java_sun_awt_motif_MInputMethod_openXIMNative(JNIEnv *env,
}
JNIEXPORT jboolean JNICALL
#ifdef XAWT
Java_sun_awt_X11_XInputMethod_createXICNative(JNIEnv *env,
jobject this,
jlong window)
{
#else /* !XAWT */
Java_sun_awt_motif_MInputMethod_createXICNative(JNIEnv *env,
jobject this,
jobject comp,
jobject tc)
{
struct ComponentData *cdata;
#endif /* XAWT */
X11InputMethodData *pX11IMData;
jobject globalRef;
XIC ic;
AWT_LOCK();
#ifdef XAWT
if (!window) {
#else /* !XAWT */
if (JNU_IsNull(env, comp)) {
#endif /* XAWT */
JNU_ThrowNullPointerException(env, "NullPointerException");
AWT_UNLOCK();
return JNI_FALSE;
@ -1570,40 +1393,16 @@ Java_sun_awt_motif_MInputMethod_createXICNative(JNIEnv *env,
return JNI_FALSE;
}
#ifndef XAWT
if (mcompClass == NULL) {
mcompClass = findClass(MCOMPONENTPEER_CLASS_NAME);
mcompPDataID = (*env)->GetFieldID(env, mcompClass, "pData", "J");
}
cdata = (struct ComponentData *) JNU_GetLongFieldAsPtr(env,comp,mcompPDataID);
if (cdata == 0) {
free((void *)pX11IMData);
JNU_ThrowNullPointerException(env, "createXIC");
AWT_UNLOCK();
return JNI_FALSE;
}
pX11IMData->peer = (*env)->NewGlobalRef(env, comp);
#endif /* XAWT */
globalRef = (*env)->NewGlobalRef(env, this);
pX11IMData->x11inputmethod = globalRef;
#ifdef __linux__
pX11IMData->statusWindow = NULL;
#else /* __linux__ */
#ifndef XAWT
pX11IMData->statusWidget = (Widget) NULL;
#endif /* XAWT */
#endif /* __linux__ */
pX11IMData->lookup_buf = 0;
pX11IMData->lookup_buf_len = 0;
#ifdef XAWT
if (createXIC(env, pX11IMData, (Window)window)
#else /* !XAWT */
if (createXIC(cdata->widget, pX11IMData, tc, comp)
#endif /* XAWT */
== False) {
destroyX11InputMethodData((JNIEnv *) NULL, pX11IMData);
pX11IMData = (X11InputMethodData *) NULL;
@ -1615,77 +1414,6 @@ Java_sun_awt_motif_MInputMethod_createXICNative(JNIEnv *env,
return (pX11IMData != NULL);
}
#ifndef XAWT
JNIEXPORT void JNICALL
Java_sun_awt_motif_MInputMethod_reconfigureXICNative(JNIEnv *env,
jobject this,
jobject comp,
jobject tc)
{
X11InputMethodData *pX11IMData;
AWT_LOCK();
pX11IMData = getX11InputMethodData(env, this);
if (pX11IMData == NULL) {
AWT_UNLOCK();
return;
}
if (pX11IMData->current_ic == (XIC)0) {
destroyX11InputMethodData(env, pX11IMData);
pX11IMData = (X11InputMethodData *)NULL;
} else {
Bool active;
struct ComponentData *cdata;
active = pX11IMData->current_ic == pX11IMData->ic_active;
if (mcompClass == NULL) {
mcompClass = findClass(MCOMPONENTPEER_CLASS_NAME);
mcompPDataID = (*env)->GetFieldID(env, mcompClass, "pData", "J");
}
cdata = (struct ComponentData *) JNU_GetLongFieldAsPtr(env,comp,mcompPDataID);
if (cdata == 0) {
JNU_ThrowNullPointerException(env, "reconfigureXICNative");
destroyX11InputMethodData(env, pX11IMData);
pX11IMData = (X11InputMethodData *)NULL;
}
XDestroyIC(pX11IMData->ic_active);
if (pX11IMData->ic_active != pX11IMData->ic_passive)
XDestroyIC(pX11IMData->ic_passive);
pX11IMData->current_ic = (XIC)0;
pX11IMData->ic_active = (XIC)0;
pX11IMData->ic_passive = (XIC)0;
if (createXIC(cdata->widget, pX11IMData, tc, comp)) {
pX11IMData->current_ic = active ?
pX11IMData->ic_active : pX11IMData->ic_passive;
/*
* On Solaris2.6, setXICWindowFocus() has to be invoked
* before setting focus.
*/
setXICWindowFocus(pX11IMData->current_ic, cdata->widget);
setXICFocus(pX11IMData->current_ic, True);
} else {
destroyX11InputMethodData((JNIEnv *) NULL, pX11IMData);
pX11IMData = (X11InputMethodData *)NULL;
}
}
setX11InputMethodData(env, this, pX11IMData);
AWT_UNLOCK();
}
JNIEXPORT void JNICALL
Java_sun_awt_motif_MInputMethod_setXICFocusNative(JNIEnv *env,
jobject this,
jobject comp,
jboolean req,
jboolean active)
{
struct ComponentData *cdata;
Widget w;
#else /* !XAWT */
JNIEXPORT void JNICALL
Java_sun_awt_X11_XInputMethod_setXICFocusNative(JNIEnv *env,
jobject this,
@ -1693,7 +1421,6 @@ Java_sun_awt_X11_XInputMethod_setXICFocusNative(JNIEnv *env,
jboolean req,
jboolean active)
{
#endif /* XAWT */
X11InputMethodData *pX11IMData;
AWT_LOCK();
pX11IMData = getX11InputMethodData(env, this);
@ -1703,40 +1430,16 @@ Java_sun_awt_X11_XInputMethod_setXICFocusNative(JNIEnv *env,
}
if (req) {
#ifdef XAWT
if (!w) {
AWT_UNLOCK();
return;
}
#else /* !XAWT */
struct ComponentData *cdata;
if (JNU_IsNull(env, comp)) {
AWT_UNLOCK();
return;
}
if (mcompClass == NULL) {
mcompClass = findClass(MCOMPONENTPEER_CLASS_NAME);
mcompPDataID = (*env)->GetFieldID(env, mcompClass, "pData", "J");
}
cdata = (struct ComponentData *)JNU_GetLongFieldAsPtr(env, comp,
mcompPDataID);
if (cdata == 0) {
JNU_ThrowNullPointerException(env, "setXICFocus pData");
AWT_UNLOCK();
return;
}
#endif /* XAWT */
pX11IMData->current_ic = active ?
pX11IMData->ic_active : pX11IMData->ic_passive;
/*
* On Solaris2.6, setXICWindowFocus() has to be invoked
* before setting focus.
*/
#ifndef XAWT
w = cdata->widget;
#endif /* XAWT */
setXICWindowFocus(pX11IMData->current_ic, w);
setXICFocus(pX11IMData->current_ic, req);
currentX11InputMethodInstance = pX11IMData->x11inputmethod;
@ -1853,40 +1556,6 @@ Java_sun_awt_X11InputMethod_resetXIC(JNIEnv *env,
return jText;
}
#ifndef XAWT
JNIEXPORT void JNICALL
Java_sun_awt_motif_MInputMethod_configureStatusAreaNative(JNIEnv *env,
jobject this,
jobject tc)
{
X11InputMethodData *pX11IMData;
XVaNestedList status;
#ifdef __linux__
/*do nothing for linux? */
#else
AWT_LOCK();
pX11IMData = getX11InputMethodData(env, this);
if ((pX11IMData == NULL) || (pX11IMData->ic_active == (XIC)0)) {
AWT_UNLOCK();
return;
}
if (pX11IMData->statusWidget) {
status = awt_motif_getXICStatusAreaList(pX11IMData->statusWidget, tc);
if (status != (XVaNestedList)NULL) {
XSetICValues(pX11IMData->ic_active,
XNStatusAttributes, status,
NULL);
XFree((void *)status);
}
}
AWT_UNLOCK();
#endif
}
#endif /* XAWT */
/*
* Class: sun_awt_X11InputMethod
* Method: setCompositionEnabledNative
@ -1964,7 +1633,6 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_X11InputMethod_isCompositionEnabledNativ
return (jboolean)(state == XIMPreeditEnable);
}
#ifdef XAWT
JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow
(JNIEnv *env, jobject this, jlong window)
{
@ -1974,4 +1642,3 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow
AWT_UNLOCK();
#endif
}
#endif

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "jni.h"
struct KeyboardFocusManagerIDs {
jclass keyboardFocusManagerCls;
jmethodID shouldNativelyFocusHeavyweightMID;
jmethodID heavyweightButtonDownMID;
jmethodID heavyweightButtonDownZMID;
jmethodID markClearGlobalFocusOwnerMID;
jmethodID processSynchronousTransferMID;
jfieldID isProxyActive;
};

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +0,0 @@
/*
* Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef _MTOOLKIT_H_
#define _MTOOLKIT_H_
#ifndef HEADLESS
extern void *findPeer(Widget * pwidget);
extern Widget findWindowsProxy(jobject window, JNIEnv *env);
extern struct WidgetInfo *findWidgetInfo(Widget widget);
extern Boolean isAncestor(Window ancestor, Window child);
extern void clearFocusPath(Widget shell);
extern void globalClearFocusPath(Widget focusOwnerShell);
extern Boolean isFrameOrDialog(jobject target, JNIEnv * env);
extern jobject getOwningFrameOrDialog(jobject target, JNIEnv *env);
#define SPECIAL_KEY_EVENT 2
#endif /* !HEADLESS */
#endif /* _MTOOLKIT_H_ */

View File

@ -1,41 +0,0 @@
/*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <jni_util.h>
/* fieldIDs for MenuItem fields that may be accessed from C */
struct MenuItemIDs {
jfieldID label;
jfieldID enabled;
jfieldID shortcut;
};
/* fieldIDs for MMenuItemPeer fields that may be accessed from C */
struct MMenuItemPeerIDs {
jfieldID target;
jfieldID pData;
jfieldID isCheckbox;
jfieldID jniGlobalRef;
};

View File

@ -1,29 +0,0 @@
/*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* methodsIDs for MPopupMenuPeer methods that may be accessed from C */
struct MPopupMenuPeerIDs {
jmethodID destroyNativeWidgetAfterGettingTreeLock;
};

View File

@ -28,7 +28,6 @@
#endif
#include "awt_p.h"
#include "awt_Component.h"
#include "awt_GraphicsEnv.h"
#define XK_MISCELLANY
#include <X11/keysymdef.h>

View File

@ -1,41 +0,0 @@
/*
* Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*/
#ifndef _TOPLEVEL_H_
#define _TOPLEVEL_H_
#ifndef HEADLESS
extern Widget findFocusProxy(Widget widget);
extern Widget findTopLevelByShell(Widget widget);
extern jobject findTopLevel(jobject peer, JNIEnv *env);
extern void shellEH(Widget w, XtPointer data, XEvent *event, Boolean *continueToDispatch);
extern Boolean isFocusableWindowByShell(JNIEnv * env, Widget shell);
extern Boolean isFocusableWindowByPeer(JNIEnv * env, jobject peer);
extern Widget getShellWidget(Widget child);
extern Boolean isFocusableComponentTopLevelByWidget(JNIEnv * env, Widget child);
#endif /* !HEADLESS */
#endif /* _TOPLEVEL_H_ */

View File

@ -1,47 +0,0 @@
/*
* Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <jni_util.h>
/* fieldIDs for Window fields that may be accessed from C */
struct WindowIDs {
jfieldID warningString;
jfieldID locationByPlatform;
jfieldID isAutoRequestFocus;
};
/* fieldIDs for MWindowPeer fields that may be accessed from C */
struct MWindowPeerIDs {
jfieldID insets;
jfieldID iconWidth;
jfieldID iconHeight;
jfieldID winAttr;
jmethodID handleWindowFocusIn;
jmethodID handleWindowFocusOut;
jmethodID handleIconify;
jmethodID handleDeiconify;
jmethodID handleStateChange;
jmethodID draggedToScreenMID;
};

View File

@ -1,449 +0,0 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifdef HEADLESS
#error This file should not be included in headless library
#endif
#include "awt_mgrsel.h"
static Atom XA_MANAGER = None;
/*
* Structures that describes the manager selection AWT listens to with
* callabacks to the subsytems interested in the selection. (We only
* listen to a couple of selections, so linear search is enough).
*/
struct AwtMgrsel {
char *selname; /* base name of selection atoms */
Atom *per_scr_atoms; /* per-screen selection atoms (ICCCM 1.2.6) */
Atom *per_scr_owners; /* windows currently owning the selection */
long extra_mask; /* extra events to listen to on owners */
void *cookie;
void (*callback_event)(int, XEvent *, void *); /* extra_mask events */
void (*callback_owner)(int, Window, long *, void *); /* owner changes */
struct AwtMgrsel *next;
};
static struct AwtMgrsel *mgrsel_list = NULL;
static int awt_mgrsel_screen(Window w);
static Window awt_mgrsel_select_per_screen(Atom, long);
static int awt_mgrsel_managed(XClientMessageEvent *mgrown);
static int awt_mgrsel_unmanaged(XDestroyWindowEvent *ev);
#ifdef DEBUG
static void awt_mgrsel_dtraceManaged(XClientMessageEvent *mgrown);
#endif
/*
* Find which screen the window W is the root of.
* Returns the screen number, or -1 if W is not a root.
*/
static int
awt_mgrsel_screen(Window w)
{
Display *dpy = awt_display;
int scr;
for (scr = 0; scr < ScreenCount(dpy); ++scr) {
if (w == RootWindow(dpy, scr)) {
return (scr);
}
}
return (-1);
}
/************************************************************************
* For every one that asketh receiveth; and he that seeketh findeth;
* and to him that knocketh it shall be opened. (Luke 11:10).
*/
/*
* A method for a subsytem to express its interest in a certain
* manager selection.
*
* If owner changes, the callback_owner will be called with the screen
* number and the new owning window when onwership is established, or
* None if the owner is gone.
*
* Events in extra_mask are selected for on owning windows (exsiting
* ones and on new owners when established) and callback_event will be
* called with the screen number and an event.
*
* The function returns an array of current owners. The size of the
* array is ScreenCount(awt_display). The array is "owned" by this
* module and should be considered by the caller as read-only.
*/
const Window *
awt_mgrsel_select(const char *selname, long extra_mask,
void *cookie,
void (*callback_event)(int, XEvent *, void *),
void (*callback_owner)(int, Window, long *, void *))
{
Display *dpy = awt_display;
struct AwtMgrsel *mgrsel;
Atom *per_scr_atoms;
Window *per_scr_owners;
char *namesbuf;
char **names;
int per_scr_sz;
int nscreens = ScreenCount(dpy);
int scr;
Status status;
DASSERT(selname != NULL);
DTRACE_PRINTLN1("MG: select: %s", selname);
/* buffer size for one per-screen atom name */
per_scr_sz = strlen(selname) + /* "_S" */ 2 + /* %2d */ + 2 /* '\0' */+ 1;
namesbuf = malloc(per_scr_sz * nscreens); /* actual storage for names */
names = malloc(sizeof(char *) * nscreens); /* pointers to names */
per_scr_atoms = malloc(sizeof(Atom) * nscreens);
per_scr_owners = malloc(sizeof(Window) * nscreens);
mgrsel = malloc(sizeof(struct AwtMgrsel));
if (namesbuf == NULL || names == NULL || per_scr_atoms == NULL
|| per_scr_owners == NULL || mgrsel == NULL)
{
DTRACE_PRINTLN("MG: select: unable to allocate memory");
if (namesbuf != NULL) free(namesbuf);
if (names != NULL) free(names);
if (per_scr_atoms != NULL) free(per_scr_atoms);
if (per_scr_owners != NULL) free(per_scr_owners);
if (mgrsel != NULL) free(mgrsel);
return (NULL);
}
for (scr = 0; scr < nscreens; ++scr) {
size_t sz;
names[scr] = &namesbuf[per_scr_sz * scr];
sz = snprintf(names[scr], per_scr_sz, "%s_S%-d", selname, scr);
DASSERT(sz < per_scr_sz);
}
status = XInternAtoms(dpy, names, nscreens, False, per_scr_atoms);
free(names);
free(namesbuf);
if (status == 0) {
DTRACE_PRINTLN("MG: select: XInternAtoms failed");
free(per_scr_atoms);
free(per_scr_owners);
return (NULL);
}
mgrsel->selname = strdup(selname);
mgrsel->per_scr_atoms = per_scr_atoms;
mgrsel->per_scr_owners = per_scr_owners;
mgrsel->extra_mask = extra_mask;
mgrsel->cookie = cookie;
mgrsel->callback_event = callback_event;
mgrsel->callback_owner = callback_owner;
for (scr = 0; scr < nscreens; ++scr) {
Window owner;
owner = awt_mgrsel_select_per_screen(per_scr_atoms[scr], extra_mask);
mgrsel->per_scr_owners[scr] = owner;
#ifdef DEBUG
if (owner == None) {
DTRACE_PRINTLN1("MG: screen %d - None", scr);
} else {
DTRACE_PRINTLN2("MG: screen %d - 0x%08lx", scr, owner);
}
#endif
}
mgrsel->next = mgrsel_list;
mgrsel_list = mgrsel;
return (per_scr_owners);
}
static Window
awt_mgrsel_select_per_screen(Atom selection, long extra_mask)
{
Display *dpy = awt_display;
Window owner;
XGrabServer(dpy);
owner = XGetSelectionOwner(dpy, selection);
if (owner == None) {
/* we'll get notified later if one arrives */
XUngrabServer(dpy);
/* Workaround for bug 5039226 */
XSync(dpy, False);
return (None);
}
/*
* Select for StructureNotifyMask to get DestroyNotify when owner
* is gone. Also select for any additional events caller is
* interested in (e.g. PropertyChangeMask). Caller will be
* notifed of these events via ... XXX ...
*/
XSelectInput(dpy, owner, StructureNotifyMask | extra_mask);
XUngrabServer(dpy);
/* Workaround for bug 5039226 */
XSync(dpy, False);
return (owner);
}
/************************************************************************
* And so I saw the wicked buried, who had come and gone from the
* place of the holy, and they were forgotten in the city where they
* had so done: this is also vanity. (Eccl 8:10)
*/
#ifdef DEBUG
/*
* Print the message from the new manager that announces it acquired
* ownership.
*/
static void
awt_mgrsel_dtraceManaged(XClientMessageEvent *mgrown)
{
Display *dpy = awt_display;
Atom selection;
char *selname, *print_selname;
int scr;
scr = awt_mgrsel_screen(mgrown->window);
selection = mgrown->data.l[1];
print_selname = selname = XGetAtomName(dpy, selection);
if (selname == NULL) {
if (selection == None) {
print_selname = "<None>";
} else {
print_selname = "<Unknown>";
}
}
DTRACE_PRINTLN4("MG: new MANAGER for %s: screen %d, owner 0x%08lx (@%lu)",
print_selname, scr,
mgrown->data.l[2], /* the window owning the selection */
mgrown->data.l[0]); /* timestamp */
DTRACE_PRINTLN4("MG: %ld %ld / 0x%lx 0x%lx", /* extra data */
mgrown->data.l[3], mgrown->data.l[4],
mgrown->data.l[3], mgrown->data.l[4]);
if (selname != NULL) {
XFree(selname);
}
}
#endif /* DEBUG */
static int
awt_mgrsel_managed(XClientMessageEvent *mgrown)
{
Display *dpy = awt_display;
struct AwtMgrsel *mgrsel;
int scr;
long timestamp;
Atom selection;
Window owner;
long *data;
if (mgrown->message_type != XA_MANAGER) {
DTRACE_PRINTLN("MG: ClientMessage type != MANAGER, ignoring");
return (0);
}
scr = awt_mgrsel_screen(mgrown->window);
#ifdef DEBUG
awt_mgrsel_dtraceManaged(mgrown);
#endif
if (scr < 0) {
DTRACE_PRINTLN("MG: MANAGER ClientMessage with a non-root window!");
return (0);
}
timestamp = mgrown->data.l[0];
selection = mgrown->data.l[1];
owner = mgrown->data.l[2];
data = &mgrown->data.l[3]; /* long[2], selection specific */
/* is this a selection we are intrested in? */
for (mgrsel = mgrsel_list; mgrsel != NULL; mgrsel = mgrsel->next) {
if (selection == mgrsel->per_scr_atoms[scr])
break;
}
if (mgrsel == NULL) {
DTRACE_PRINTLN("MG: not interested in this selection, ignoring");
return (0);
}
mgrsel->per_scr_owners[scr] = owner;
XSelectInput(dpy, owner, StructureNotifyMask | mgrsel->extra_mask);
/* notify the listener */
if (mgrsel->callback_owner != NULL) {
(*mgrsel->callback_owner)(scr, owner, data, mgrsel->cookie);
}
return (1);
}
static int
awt_mgrsel_unmanaged(XDestroyWindowEvent *ev)
{
Display *dpy = awt_display;
struct AwtMgrsel *mgrsel;
Window exowner;
int scr;
exowner = ev->window; /* selection owner that's gone */
/* is this a selection we are intrested in? */
for (mgrsel = mgrsel_list; mgrsel != NULL; mgrsel = mgrsel->next) {
for (scr = 0; scr < ScreenCount(dpy); ++scr) {
if (exowner == mgrsel->per_scr_owners[scr]) {
/* can one window own selections for more than one screen? */
goto out; /* XXX??? */
}
}
}
out:
if (mgrsel == NULL) {
DTRACE_PRINTLN1("MG: DestroyNotify for 0x%08lx ignored", exowner);
return (0);
}
DTRACE_PRINTLN3("MG: DestroyNotify for 0x%08lx, owner of %s at screen %d",
exowner, mgrsel->selname, scr);
/* notify the listener (pass exowner as data???) */
if (mgrsel->callback_owner != NULL) {
(*mgrsel->callback_owner)(scr, None, NULL, mgrsel->cookie);
}
return (1);
}
/*
* Hook to be called from toolkit event loop.
*/
int
awt_mgrsel_processEvent(XEvent *ev)
{
Display *dpy = awt_display;
struct AwtMgrsel *mgrsel;
int scr;
if (ev->type == ClientMessage) { /* new manager announces ownership? */
if (awt_mgrsel_managed(&ev->xclient))
return (1);
}
if (ev->type == DestroyNotify) { /* manager gives up selection? */
if (awt_mgrsel_unmanaged(&ev->xdestroywindow))
return (1);
}
/* is this an event selected on one of selection owners? */
for (mgrsel = mgrsel_list; mgrsel != NULL; mgrsel = mgrsel->next) {
for (scr = 0; scr < ScreenCount(dpy); ++scr) {
if (ev->xany.window == mgrsel->per_scr_owners[scr]) {
/* can one window own selections for more than one screen? */
goto out; /* XXX??? */
}
}
}
out:
DTRACE_PRINT2("MG: screen %d, event %d ... ",
scr, ev->xany.type);
if (mgrsel == NULL) {
DTRACE_PRINTLN("ignored");
return (0); /* not interested */
}
DTRACE_PRINT1("%s ... ", mgrsel->selname);
if (mgrsel->callback_event != NULL) {
DTRACE_PRINTLN("dispatching");
(*mgrsel->callback_event)(scr, ev, mgrsel->cookie);
}
#ifdef DEBUG
else {
DTRACE_PRINTLN("no callback");
}
#endif
return (1);
}
void
awt_mgrsel_init(void)
{
static Boolean inited = False;
Display *dpy = awt_display;
int scr;
if (inited) {
return;
}
XA_MANAGER = XInternAtom(dpy, "MANAGER", False);
DASSERT(XA_MANAGER != None);
/*
* Listen for ClientMessage's on each screen's root. We hook into
* the message loop in the toolkit (with awt_mgrsel_processEvent)
* to get the events processed. We need this for notifications of
* new manager acquiring ownership of the manager selection.
*/
for (scr = 0; scr < ScreenCount(dpy); ++scr) {
XSelectInput(dpy, RootWindow(dpy, scr), StructureNotifyMask);
}
inited = True;
}

View File

@ -1,42 +0,0 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef _AWT_MGRSEL_H_
#define _AWT_MGRSEL_H_
#ifndef HEADLESS
#include "awt_p.h"
extern void awt_mgrsel_init(void);
extern int awt_mgrsel_processEvent(XEvent *);
extern const Window * awt_mgrsel_select(const char *, long,
void *,
void (*)(int, XEvent *, void *),
void (*)(int, Window, long *, void *));
#endif /* !HEADLESS */
#endif /* _AWT_MGRSEL_H_ */

View File

@ -1,59 +0,0 @@
/*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef _SWITCHXM_P_H_
#define _SWITCHXM_P_H_
#include <sun_awt_motif_MComponentPeer.h>
#include "gdefs.h"
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
#define MOTIF_NA sun_awt_motif_MComponentPeer_MOTIF_NA
#define MOTIF_V1 sun_awt_motif_MComponentPeer_MOTIF_V1
#define MOTIF_V2 sun_awt_motif_MComponentPeer_MOTIF_V2
extern int32_t awt_motif_getIMStatusHeight(Widget w, jobject tc);
extern XVaNestedList awt_motif_getXICStatusAreaList(Widget w, jobject tc);
extern void awt_motif_Scrollbar_ButtonReleaseHandler (Widget,
XtPointer,
XEvent *,
Boolean *) ;
/* This function causes an UnsatisfiedLinkError on Linux.
* It's a no-op for Motif 2.1.
* Since Linux only links against Motif 2.1, we can safely remove
* this function altogether from the Linux build.
* bchristi 1/22/2001
*/
#ifdef __solaris__
extern void awt_motif_adjustDragTriggerEvent(XEvent* xevent);
#endif
void awt_motif_enableSingleDragInitiator(Widget w);
#endif /* _SWITCHXM_P_H_ */

View File

@ -49,28 +49,6 @@
#include <X11/keysym.h>
#include <X11/keysymdef.h>
#include <X11/extensions/Xrender.h>
#ifndef XAWT
#include <Xm/CascadeB.h>
#include <Xm/DrawingA.h>
#include <Xm/FileSB.h>
#include <Xm/BulletinB.h>
#include <Xm/Form.h>
#include <Xm/Frame.h>
#include <Xm/Label.h>
#include <Xm/PushB.h>
#include <Xm/PushBG.h>
#include <Xm/RowColumn.h>
#include <Xm/ScrollBar.h>
#include <Xm/ScrolledW.h>
#include <Xm/SelectioB.h>
#include <Xm/SeparatoG.h>
#include <Xm/ToggleB.h>
#include <Xm/TextF.h>
#include <Xm/Text.h>
#include <Xm/List.h>
#include <Xm/Xm.h>
#include <Xm/MainW.h>
#endif
#endif /* !HEADLESS */
#include "awt.h"
#include "awt_util.h"
@ -78,33 +56,13 @@
#include "colordata.h"
#include "gdefs.h"
#ifndef XAWT
#include "GLXGraphicsConfig.h"
//#include <sun_awt_motif_MComponentPeer.h>
#endif
#ifndef HEADLESS
#ifndef XAWT
#include "awt_motif.h"
#endif
#ifndef min
#define min(a,b) ((a) <= (b)? (a):(b))
#endif
#ifndef max
#define max(a,b) ((a) >= (b)? (a):(b))
#endif
extern Pixel awt_pixel_by_name(Display *dpy, char *color, char *defaultColor);
typedef struct DropSiteInfo* DropSitePtr;
struct WidgetInfo {
Widget widget;
Widget origin;
void* peer;
jlong event_mask;
struct WidgetInfo* next;
};
#endif /* !HEADLESS */
#define RepaintPending_NONE 0
@ -112,13 +70,6 @@ struct WidgetInfo {
#define RepaintPending_EXPOSE (1 << 1)
#define LOOKUPSIZE 32
typedef struct _DamageRect {
int x1;
int y1;
int x2;
int y2;
} DamageRect;
#ifndef HEADLESS
typedef XRenderPictFormat *
@ -157,110 +108,9 @@ typedef struct _AwtScreenData {
typedef AwtScreenData* AwtScreenDataPtr;
struct ComponentData {
Widget widget;
int repaintPending;
DamageRect repaintRect;
DamageRect exposeRect;
DropSitePtr dsi;
};
struct MessageDialogData {
struct ComponentData comp;
int isModal;
};
struct CanvasData {
struct ComponentData comp;
Widget shell;
int flags;
};
struct MenuItemData {
struct ComponentData comp;
int index;
};
struct MenuData {
struct ComponentData comp;
struct MenuItemData itemData;
};
#define W_GRAVITY_INITIALIZED 1
#define W_IS_EMBEDDED 2
struct FrameData {
struct CanvasData winData;
int isModal;
Widget mainWindow;
Widget focusProxy; /* for all key events */
Widget menuBar;
Widget warningWindow;
int top; /* these four are the insets... */
int bottom;
int left;
int right;
int topGuess; /* these four are the guessed insets */
int bottomGuess;
int leftGuess;
int rightGuess;
int mbHeight; /* height of the menubar window */
int wwHeight; /* height of the warning window */
jint state; /* java.awt.Frame.state bits */
Boolean reparented;
Boolean configure_seen;
Boolean shellResized; /* frame shell has been resized */
Boolean canvasResized; /* frame inner canvas resized */
Boolean menuBarReset; /* frame menu bar added/removed */
Boolean isResizable; /* is this window resizable ? */
Boolean isFixedSizeSet; /* is fixed size already set ? */
Boolean isShowing; /* is this window now showing ? */
Boolean hasTextComponentNative;
Boolean need_reshape;
Boolean callbacksAdded; /* needed for fix for 4078176 */
Pixmap iconPixmap; /* Pixmap to hold icon image */
int iconWidth;
int iconHeight;
int imHeight; /* imStatusBar's height */
Boolean imRemove; /* ImStatusBar is being removed */
Boolean fixInsets; /* [jk] REMINDER: remove if possible */
int decor; /* type of native decorations */
Boolean initialFocus; /* does Window take focus initially */
Boolean isInputMethodWindow;
/*
* Fix for BugTraq ID 4060975.
* firstShellEH() stores to this field handle of the widget that had
* focus before the shell was resized so that we can later restore it.
*/
Widget focusWidget;
int screenNum; /* Which screen this Window is on. Xinerama-aware. */
Boolean isDisposeScheduled;
Boolean isFocusableWindow; /* a cache of Window.isFocusableWindow() return value */
};
struct ListData {
struct ComponentData comp;
Widget list;
};
struct TextAreaData {
struct ComponentData comp;
Widget txt;
};
struct TextFieldData {
struct ComponentData comp;
int echoContextID;
Boolean echoContextIDInit;
};
struct FileDialogData {
struct ComponentData comp;
char *file;
};
typedef struct awtFontList {
char *xlfd;
int index_length;
@ -276,33 +126,6 @@ struct FontData {
XFontStruct *xfont; /* Latin1 font */
};
#ifndef XAWT
extern XmFontList getMotifFontList(void);
extern XFontSet getMotifFontSet(void);
extern XFontStruct *getMotifFontStruct(void);
extern Boolean awt_isAwtWidget(Widget widget);
#endif
struct ChoiceData {
struct ComponentData comp;
Widget menu;
Widget *items;
int maxitems;
int n_items;
short n_columns;
/* Bug 4255631 Solaris: Size returned by Choice.getSize() does not match
* actual size
* y and height which Choice takes in pReshape
*/
jint bounds_y;
jint bounds_height;
};
struct MenuList {
Widget menu;
struct MenuList* next;
};
extern struct FontData *awtJNI_GetFontData(JNIEnv *env,jobject font, char **errmsg);
extern AwtGraphicsConfigDataPtr getDefaultConfig(int screen);
@ -315,20 +138,6 @@ extern AwtScreenDataPtr getScreenData(int screen);
#ifndef HEADLESS
#define XDISPLAY awt_display;
extern Boolean awt_currentThreadIsPrivileged(JNIEnv *env);
extern void null_event_handler(Widget w, XtPointer client_data,
XEvent * event, Boolean * cont);
extern void awt_put_back_event(JNIEnv *env, XEvent *event);
extern void awt_MToolkit_modalWait(int (*terminateFn)(void *data), void *data);
extern void awt_Frame_guessInsets(struct FrameData *fdata);
extern void awt_addWidget(Widget w, Widget origin, void *peer, jlong event_mask);
extern void awt_delWidget(Widget w);
extern void awt_addMenuWidget(Widget w);
extern void awt_delMenuWidget(Widget w);
extern int awt_allocate_colors(AwtGraphicsConfigDataPtr);
extern void awt_allocate_systemcolors(XColor *, int, AwtGraphicsConfigDataPtr);
extern void awt_allocate_systemrgbcolors(jint *, int, AwtGraphicsConfigDataPtr);
@ -338,24 +147,5 @@ extern int awtJNI_GetColorForVis (JNIEnv *, jobject, AwtGraphicsConfigDataPtr);
extern jobject awtJNI_GetColorModel(JNIEnv *, AwtGraphicsConfigDataPtr);
extern void awtJNI_CreateColorData (JNIEnv *, AwtGraphicsConfigDataPtr, int lock);
extern Boolean awtJNI_isSelectionOwner(JNIEnv *env, char *sel_str);
extern void awtJNI_notifySelectionLost(JNIEnv *env, char *sel_str);
extern void removePopupMenus();
extern Boolean awtMenuIsActive();
#endif /* !HEADLESS */
extern void awtJNI_DeleteGlobalRef(JNIEnv *env,jobject thiscomp);
extern void awtJNI_DeleteGlobalMenuRef(JNIEnv *env,jobject thismenu);
extern jobject awtJNI_CreateAndSetGlobalRef(JNIEnv *env,jobject thiscomp);
extern void awtJNI_CleanupGlobalRefs(void);
#ifndef HEADLESS
/* XXX: Motif internals. Need to fix 4090493. */
#define MOTIF_XmINVALID_DIMENSION ((Dimension) 0xFFFF)
#define MOTIF_XmDEFAULT_INDICATOR_DIM ((Dimension) 9)
extern Dimension awt_computeIndicatorSize(struct FontData *fdata);
extern Dimension awt_adjustIndicatorSizeForMenu(Dimension indSize);
#endif /* !HEADLESS */
#endif /* _AWT_P_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -27,58 +27,8 @@
#define _AWT_UTIL_H_
#ifndef HEADLESS
#ifndef XAWT
#include <Xm/VendorSEP.h>
#include <Xm/VendorSP.h>
#endif
#include "gdefs.h"
typedef struct ConvertEventTimeAndModifiers {
jlong when;
jint modifiers;
} ConvertEventTimeAndModifiers;
Boolean awt_util_focusIsOnMenu(Display *display);
int32_t awt_util_sendButtonClick(Display *display, Window window);
Widget awt_util_createWarningWindow(Widget parent, char *warning);
void awt_util_show(Widget w);
void awt_util_hide(Widget w);
void awt_util_enable(Widget w);
void awt_util_disable(Widget w);
void awt_util_reshape(Widget w, jint x, jint y, jint wd, jint ht);
void awt_util_mapChildren(Widget w, void (*func)(Widget,void *),
int32_t applyToSelf, void *data);
int32_t awt_util_setCursor(Widget w, Cursor c);
void awt_util_convertEventTimeAndModifiers
(XEvent *event, ConvertEventTimeAndModifiers *output);
Widget awt_WidgetAtXY(Widget root, Position x, Position y);
char *awt_util_makeWMMenuItem(char *target, Atom protocol);
Cardinal awt_util_insertCallback(Widget w);
void awt_util_consumeAllXEvents(Widget widget);
void awt_util_cleanupBeforeDestroyWidget(Widget widget);
void awt_util_debug_init();
Time awt_util_getCurrentServerTime();
jlong awt_util_nowMillisUTC();
jlong awt_util_nowMillisUTC_offset(Time server_offset);
void awt_util_do_wheel_scroll(Widget scrolled_window, jint scrollType,
jint scrollAmt, jint wheelAmt);
Widget awt_util_get_scrollbar_to_scroll(Widget window);
typedef struct _EmbeddedFrame {
Widget embeddedFrame;
Window frameContainer;
jobject javaRef;
Boolean eventSelectedPreviously;
struct _EmbeddedFrame * next;
struct _EmbeddedFrame * prev;
} EmbeddedFrame;
void awt_util_addEmbeddedFrame(Widget embeddedFrame, jobject javaRef);
void awt_util_delEmbeddedFrame(Widget embeddedFrame);
Boolean awt_util_processEventForEmbeddedFrame(XEvent *ev);
#define WITH_XERROR_HANDLER(f) do { \
XSync(awt_display, False); \
xerror_code = Success; \
@ -115,8 +65,6 @@ extern XErrorHandler xerror_saved_handler;
*/
extern unsigned char xerror_code;
extern int xerror_ignore_bad_window(Display *dpy, XErrorEvent *err);
#endif /* !HEADLESS */
#ifndef INTERSECTS
@ -143,13 +91,8 @@ struct DPos {
int32_t echoC;
};
extern jobject awtJNI_GetCurrentThread(JNIEnv *env);
extern void awtJNI_ThreadYield(JNIEnv *env);
#ifndef HEADLESS
extern Widget prevWidget;
#endif /* !HEADLESS */
/*
* Functions for accessing fields by name and signature
*/
@ -183,69 +126,4 @@ JNU_SetBooleanField(JNIEnv *env, jobject self, const char *name, jboolean val);
JNIEXPORT jint JNICALL
JNU_GetCharField(JNIEnv *env, jobject self, const char *name);
#ifndef HEADLESS
#ifdef __solaris__
extern Widget awt_util_getXICStatusAreaWindow(Widget w);
#else
int32_t awt_util_getIMStatusHeight(Widget vw);
XVaNestedList awt_util_getXICStatusAreaList(Widget w);
Widget awt_util_getXICStatusAreaWindow(Widget w);
#endif
#ifdef __linux__
typedef struct _XmImRefRec {
Cardinal num_refs; /* Number of referencing widgets. */
Cardinal max_refs; /* Maximum length of refs array. */
Widget* refs; /* Array of referencing widgets. */
XtPointer **callbacks;
} XmImRefRec, *XmImRefInfo;
typedef struct _PreeditBufferRec {
unsigned short length;
wchar_t *text;
XIMFeedback *feedback;
int32_t caret;
XIMCaretStyle style;
} PreeditBufferRec, *PreeditBuffer;
typedef struct _XmImXICRec {
struct _XmImXICRec *next; /* Links all have the same XIM. */
XIC xic; /* The XIC. */
Window focus_window; /* Cached information about the XIC. */
XIMStyle input_style; /* ...ditto... */
int32_t status_width; /* ...ditto... */
int32_t preedit_width; /* ...ditto... */
int32_t sp_height; /* ...ditto... */
Boolean has_focus; /* Does this XIC have keyboard focus. */
Boolean anonymous; /* Do we have exclusive rights to this XIC. */
XmImRefRec widget_refs; /* Widgets referencing this XIC. */
struct _XmImXICRec **source; /* Original source of shared XICs. */
PreeditBuffer preedit_buffer;
} XmImXICRec, *XmImXICInfo;
typedef struct _XmImShellRec {
/* per-Shell fields. */
Widget im_widget; /* Dummy widget to make intrinsics behave. */
Widget current_widget; /* Widget whose visual we're matching. */
/* per <Shell,XIM> fields. */
XmImXICInfo shell_xic; /* For PER_SHELL sharing policy. */
XmImXICInfo iclist; /* All known XICs for this <XIM,Shell>. */
} XmImShellRec, *XmImShellInfo;
typedef struct {
/* per-Display fields. */
XContext current_xics; /* Map widget -> current XmImXICInfo. */
/* per-XIM fields. */
XIM xim; /* The XIM. */
XIMStyles *styles; /* XNQueryInputStyle result. */
XmImRefRec shell_refs; /* Shells referencing this XIM. */
} XmImDisplayRec, *XmImDisplayInfo;
#endif
#endif /* !HEADLESS */
#endif /* _AWT_UTIL_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,84 +0,0 @@
/*
* Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef _AWT_WM_H_
#define _AWT_WM_H_
#ifndef HEADLESS
#include "awt_p.h"
/*
* Window Managers we care to distinguish.
* See awt_wm_getRunningWM()
*/
enum wmgr_t {
UNDETERMINED_WM,
NO_WM,
OTHER_WM,
OPENLOOK_WM,
MOTIF_WM,
CDE_WM,
ENLIGHTEN_WM,
KDE2_WM,
SAWFISH_WM,
ICE_WM,
METACITY_WM
};
extern void awt_wm_init(void);
extern enum wmgr_t awt_wm_getRunningWM(void);
extern Boolean awt_wm_configureGravityBuggy(void);
extern Boolean awt_wm_supportsExtendedState(jint state);
/* XWMHints.flags is declared long, so 'mask' argument is declared long too */
extern void awt_wm_removeSizeHints(Widget shell, long mask);
extern void awt_wm_setShellDecor(struct FrameData *wdata, Boolean resizable);
extern void awt_wm_setShellResizable(struct FrameData *wdata);
extern void awt_wm_setShellNotResizable(struct FrameData *wdata,
int32_t width, int32_t height,
Boolean justChangeSize);
extern Boolean awt_wm_getInsetsFromProp(Window w,
int32_t *top, int32_t *left, int32_t *bottom, int32_t *right);
/*
* WM_STATE: WithdrawnState, NormalState, IconicState.
* Absence of WM_STATE is treated as WithdrawnState.
*/
extern int awt_wm_getWMState(Window w);
extern void awt_wm_setExtendedState(struct FrameData *wdata, jint state);
extern Boolean awt_wm_isStateChange(struct FrameData *wdata, XPropertyEvent *e,
jint *pstate);
extern void awt_wm_unshadeKludge(struct FrameData *wdata);
extern void awt_wm_updateAlwaysOnTop(struct FrameData *wdata, jboolean bLayerState);
extern Boolean awt_wm_supportsAlwaysOnTop();
#endif /* !HEADLESS */
#endif /* _AWT_WM_H_ */

View File

@ -1,80 +0,0 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef _AWT_XEMBED_H_
#define _AWT_XEMBED_H_
#ifndef HEADLESS
#include "awt_p.h"
#define XEMBED_VERSION 0
#define XEMBED_MAPPED (1 << 0)
/* XEMBED messages */
#define XEMBED_EMBEDDED_NOTIFY 0
#define XEMBED_WINDOW_ACTIVATE 1
#define XEMBED_WINDOW_DEACTIVATE 2
#define XEMBED_REQUEST_FOCUS 3
#define XEMBED_FOCUS_IN 4
#define XEMBED_FOCUS_OUT 5
#define XEMBED_FOCUS_NEXT 6
#define XEMBED_FOCUS_PREV 7
/* 8-9 were used for XEMBED_GRAB_KEY/XEMBED_UNGRAB_KEY */
#define XEMBED_MODALITY_ON 10
#define XEMBED_MODALITY_OFF 11
#define XEMBED_REGISTER_ACCELERATOR 12
#define XEMBED_UNREGISTER_ACCELERATOR 13
#define XEMBED_ACTIVATE_ACCELERATOR 14
#define XEMBED_LAST_MSG XEMBED_ACTIVATE_ACCELERATOR
#define NON_STANDARD_XEMBED_GTK_GRAB_KEY 108
#define NON_STANDARD_XEMBED_GTK_UNGRAB_KEY 109
// Sun internal special message, to resolve start race condition
#define _SUN_XEMBED_START 1119
// A detail code is required for XEMBED_FOCUS_IN. The following values are valid:
/* Details for XEMBED_FOCUS_IN: */
#define XEMBED_FOCUS_CURRENT 0
#define XEMBED_FOCUS_FIRST 1
#define XEMBED_FOCUS_LAST 2
extern void init_xembed();
extern void xembed_eventHandler(XEvent *event);
extern void requestXEmbedFocus(struct FrameData * wdata);
extern void install_xembed(Widget client, struct FrameData* wdata);
extern void deinstall_xembed(struct FrameData* wdata);
extern Boolean isXEmbedActive(struct FrameData * wdata);
extern Boolean isXEmbedActiveByWindow(Window client);
extern Boolean isXEmbedApplicationActive(struct FrameData * wdata);
extern void sendMessageHelper(Window window, int message, long detail,
long data1, long data2);
extern void sendMessage(Window window, int message);
extern void xembed_traverse_out(struct FrameData * wdata, jboolean);
#endif
#endif

View File

@ -1,969 +0,0 @@
/*
* Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// TODO: Propogate applicationActive from Java
#ifdef HEADLESS
#error This file should not be included in headless library
#endif
#include "awt_p.h"
#include <X11/Xproto.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <Xm/MwmUtil.h>
#ifdef __linux__
#include <execinfo.h>
#endif
#include <stdio.h>
#include <stdlib.h>
/* JNI headers */
#include "java_awt_Frame.h" /* for frame state constants */
#include "java_awt_event_KeyEvent.h"
#include "awt_wm.h"
#include "awt_util.h" /* for X11 error handling macros */
#include "awt_xembed.h"
#include "awt_Component.h"
#include "awt_AWTEvent.h"
#include "canvas.h"
#include "sun_awt_motif_MEmbedCanvasPeer.h"
#ifdef DOTRACE
#define MTRACE(param) fprintf(stderr, param)
#define MTRACEP1(format, p1) fprintf(stderr, format, p1)
#define MTRACEP2(format, p1, p2) fprintf(stderr, format, p1, p2)
#define MTRACEP3(format, p1, p2, p3) fprintf(stderr, format, p1, p2, p3)
#define MTRACEP4(format, p1, p2, p3, p4) fprintf(stderr, format, p1, p2, p3, p4)
#define MTRACEP5(format, p1, p2, p3, p4, p5) fprintf(stderr, format, p1, p2, p3, p4, p5)
#define MTRACEP6(format, p1, p2, p3, p4, p5, p6) fprintf(stderr, format, p1, p2, p3, p4, p5, p6)
#define MTRACEP7(format, p1, p2, p3, p4, p5, p6, p7) fprintf(stderr, format, p1, p2, p3, p4, p5, p6, p7)
#else
#define MTRACE(param)
#define MTRACEP1(format, p1)
#define MTRACEP2(format, p1, p2)
#define MTRACEP3(format, p1, p2, p3)
#define MTRACEP4(format, p1, p2, p3, p4)
#define MTRACEP5(format, p1, p2, p3, p4, p5)
#define MTRACEP6(format, p1, p2, p3, p4, p5, p6)
#define MTRACEP7(format, p1, p2, p3, p4, p5, p6, p7)
#endif
/**************************** XEmbed server DnD support ***********************/
extern Atom XA_XdndAware;
extern Boolean
register_xembed_drop_site(JNIEnv* env, Display* dpy, jobject server,
Window serverHandle, Window clientHandle);
extern Boolean
unregister_xembed_drop_site(JNIEnv* env, Display* dpy, jobject server,
Window serverHandle, Window clientHandle);
extern void
forward_event_to_embedded(Window embedded, jlong ctxt, jint eventID);
extern const char * msg_to_str(int msg);
void
set_xembed_drop_target(JNIEnv* env, jobject server);
void
remove_xembed_drop_target(JNIEnv* env, jobject server);
Boolean
is_xembed_client(Window window);
/******************************************************************************/
extern struct MComponentPeerIDs mComponentPeerIDs;
static jobject createRectangle(JNIEnv* env, int x, int y, int width, int height);
static jobject createDimension(JNIEnv* env, int width, int height);
static void processXEmbedInfo(JNIEnv* env, jobject this);
static Atom XA_XEmbedInfo;
static Atom XA_XEmbed;
static jmethodID requestXEmbedFocusMID, focusNextMID, focusPrevMID,
registerAcceleratorMID, unregisterAcceleratorMID,
grabKeyMID, ungrabKeyMID, childResizedMID,
setXEmbedDropTargetMID, removeXEmbedDropTargetMID;
static jfieldID keysymFID, modifiersFID, applicationActiveFID;
typedef struct _xembed_server_data {
Window handle; // pointer to plugin intermediate widget, XEmbed client
Window serverHandle;
Widget serverWidget;
Boolean dispatching; // whether we dispatch messages for handle
int version;
jobject server;
struct _xembed_server_data * next;
} xembed_server_data, * pxembed_server_data;
static pxembed_server_data xembed_list = NULL;
static pxembed_server_data
getData(Window handle) {
pxembed_server_data temp = xembed_list;
while (temp != NULL) {
if (temp->handle == handle) {
return temp;
}
temp = temp->next;
}
return NULL;
}
static pxembed_server_data
getDataByEmbedder(jobject server) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
pxembed_server_data temp = xembed_list;
DASSERT(server != NULL);
while (temp != NULL) {
if ((*env)->IsSameObject(env, temp->server, server)) {
return temp;
}
temp = temp->next;
}
return NULL;
}
static pxembed_server_data
getDataByServerHandle(Window serverHandle) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
pxembed_server_data temp = xembed_list;
Widget serverWidget = NULL;
if (serverHandle == None) {
return NULL;
}
serverWidget = XtWindowToWidget(awt_display, serverHandle);
while (temp != NULL) {
if (temp->serverHandle == serverHandle || temp->serverWidget == serverWidget) {
temp->serverHandle = serverWidget;
return temp;
}
temp = temp->next;
}
return NULL;
}
static pxembed_server_data
addData(jobject server) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
struct ComponentData *cdata;
xembed_server_data * data = malloc(sizeof(xembed_server_data));
DASSERT(server != NULL);
memset(data, 0, sizeof(xembed_server_data));
data->server = server;
cdata = (struct ComponentData *)
JNU_GetLongFieldAsPtr(env, server, mComponentPeerIDs.pData);
DASSERT(cdata != NULL);
data->serverHandle = XtWindow(cdata->widget);
data->serverWidget = cdata->widget;
data->next = xembed_list;
xembed_list = data;
return data;
}
static void
removeData(jobject server) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
pxembed_server_data * temp = &xembed_list;
DASSERT(server != NULL);
while (*temp != NULL) {
if ((*env)->IsSameObject(env, (*temp)->server, server)) {
xembed_server_data * data = *temp;
*temp = (*temp)->next;
DASSERT(data->server != NULL);
(*env)->DeleteGlobalRef(env, data->server);
free(data);
return;
}
temp = &(*temp)->next;
}
}
void
initXEmbedServerData() {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
jclass clazz;
MTRACE("initXEmbedServerData\n");
XA_XEmbedInfo = XInternAtom(awt_display, "_XEMBED_INFO", False);
XA_XEmbed = XInternAtom(awt_display, "_XEMBED", False);
clazz = (*env)->FindClass(env, "sun/awt/motif/MEmbedCanvasPeer");
DASSERT(clazz != NULL);
requestXEmbedFocusMID = (*env)->GetMethodID(env, clazz, "requestXEmbedFocus", "()V");
DASSERT(requestXEmbedFocusMID != NULL);
focusNextMID = (*env)->GetMethodID(env, clazz, "focusNext", "()V");
DASSERT(focusNextMID != NULL);
focusPrevMID = (*env)->GetMethodID(env, clazz, "focusPrev", "()V");
DASSERT(focusPrevMID != NULL);
registerAcceleratorMID = (*env)->GetMethodID(env, clazz, "registerAccelerator", "(JJJ)V");
DASSERT(registerAcceleratorMID != NULL);
unregisterAcceleratorMID = (*env)->GetMethodID(env, clazz, "unregisterAccelerator", "(J)V");
DASSERT(unregisterAcceleratorMID != NULL);
grabKeyMID = (*env)->GetMethodID(env, clazz, "grabKey", "(JJ)V");
DASSERT(grabKeyMID != NULL);
ungrabKeyMID = (*env)->GetMethodID(env, clazz, "ungrabKey", "(JJ)V");
DASSERT(ungrabKeyMID != NULL);
childResizedMID = (*env)->GetMethodID(env, clazz, "childResized", "()V");
DASSERT(childResizedMID != NULL);
setXEmbedDropTargetMID =
(*env)->GetMethodID(env, clazz, "setXEmbedDropTarget", "()V");
DASSERT(setXEmbedDropTargetMID != NULL);
removeXEmbedDropTargetMID =
(*env)->GetMethodID(env, clazz, "removeXEmbedDropTarget", "()V");
DASSERT(removeXEmbedDropTargetMID != NULL);
applicationActiveFID = (*env)->GetFieldID(env, clazz, "applicationActive", "Z");
DASSERT(applicationActiveFID != NULL);
(*env)->DeleteLocalRef(env, clazz);
clazz = (*env)->FindClass(env, "sun/awt/motif/GrabbedKey");
DASSERT(clazz != NULL);
keysymFID = (*env)->GetFieldID(env, clazz, "keysym", "J");
DASSERT(keysymFID != NULL);
modifiersFID = (*env)->GetFieldID(env, clazz, "modifiers", "J");
DASSERT(modifiersFID != NULL);
(*env)->DeleteLocalRef(env, clazz);
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: initXEmbedServer
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_initXEmbedServer(JNIEnv *env, jobject this) {
struct ComponentData *cdata;
AWT_LOCK();
MTRACE("initXEmbedServer\n");
addData((*env)->NewGlobalRef(env, this));
if (XA_XEmbedInfo == None) {
initXEmbedServerData();
}
cdata = (struct ComponentData *)
JNU_GetLongFieldAsPtr(env, this, mComponentPeerIDs.pData);
/* XSelectInput(awt_display, XtWindow(cdata->widget), SubstructureNotifyMask); */
XtAddEventHandler(cdata->widget,
SubstructureNotifyMask,
False, null_event_handler, NULL);
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: destroyXEmbedServer
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_destroyXEmbedServer(JNIEnv *env, jobject this) {
AWT_LOCK();
MTRACE("destroyXEmbedServer\n");
removeData(this);
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: isXEmbedActive
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive(JNIEnv *env, jobject this) {
pxembed_server_data sdata;
jboolean res = JNI_FALSE;
AWT_LOCK();
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
res = (sdata->handle != None)?JNI_TRUE:JNI_FALSE;
}
AWT_UNLOCK();
return res;
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: initDispatching
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_initDispatching (JNIEnv *env, jobject this) {
pxembed_server_data sdata;
AWT_LOCK();
MTRACE("initDispatching\n");
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
XSelectInput(awt_display, sdata->handle, StructureNotifyMask | PropertyChangeMask);
sdata->dispatching = True;
register_xembed_drop_site(env, awt_display, sdata->server,
sdata->serverHandle, sdata->handle);
}
processXEmbedInfo(env, this);
Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded(env, this);
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: endDispatching
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching (JNIEnv *env, jobject this) {
pxembed_server_data sdata;
AWT_LOCK();
MTRACE("endDispatching\n");
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
unregister_xembed_drop_site(env, awt_display, sdata->server,
sdata->serverHandle, sdata->handle);
sdata->dispatching = False;
}
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: embedChild
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_embedChild (JNIEnv * env, jobject this, jlong handle) {
pxembed_server_data sdata;
AWT_LOCK();
MTRACE("embedChild\n");
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
if (sdata->handle != None) {
Java_sun_awt_motif_MEmbedCanvasPeer_detachChild(env, this);
}
sdata->handle = (Window)handle;
Java_sun_awt_motif_MEmbedCanvasPeer_initDispatching(env, this);
}
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: childDestroyed
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_childDestroyed (JNIEnv *env, jobject this) {
pxembed_server_data sdata;
AWT_LOCK();
MTRACE("childDestroyed\n");
Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching(env, this);
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
sdata->handle = None;
}
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: getEmbedPreferredSize
* Signature: ()Ljava/awt/Dimension;
*/
JNIEXPORT jobject JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedPreferredSize (JNIEnv *env, jobject this) {
pxembed_server_data sdata;
jobject res = NULL;
XSizeHints * hints;
long dummy;
AWT_LOCK();
MTRACE("getPreferredSize\n");
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
hints = XAllocSizeHints();
DASSERT(hints != NULL);
DASSERT(sdata->handle != None);
if (XGetWMNormalHints(awt_display, sdata->handle, hints, &dummy) == Success) {
res = createDimension(env, hints->width, hints->height);
}
XFree(hints);
}
AWT_UNLOCK();
return res;
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: getEmbedMinimumSize
* Signature: ()Ljava/awt/Dimension;
*/
JNIEXPORT jobject JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedMinimumSize (JNIEnv *env, jobject this) {
pxembed_server_data sdata;
jobject res = NULL;
XSizeHints * hints;
long dummy;
AWT_LOCK();
MTRACE("getMinimumSize\n");
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
hints = XAllocSizeHints();
DASSERT(hints != NULL);
DASSERT(sdata->handle != None);
if (XGetWMNormalHints(awt_display, sdata->handle, hints, &dummy) == Success) {
res = createDimension(env, hints->min_width, hints->min_height);
}
XFree(hints);
}
AWT_UNLOCK();
return res;
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: getClientBounds
* Signature: ()Ljava/awt/Rectangle;
*/
JNIEXPORT jobject JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_getClientBounds (JNIEnv *env, jobject this) {
pxembed_server_data sdata;
jobject res = NULL;
AWT_LOCK();
MTRACE("getClientBounds\n");
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
XWindowAttributes attrs;
DASSERT(sdata->handle != None);
if (XGetWindowAttributes(awt_display, sdata->handle, &attrs) == Success) {
res = createRectangle(env, attrs.x, attrs.y, attrs.width, attrs.height);
}
}
AWT_UNLOCK();
return res;
}
Boolean
isApplicationActive(JNIEnv * env, jobject this) {
return (*env)->GetBooleanField(env, this, applicationActiveFID);
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: notifyChildEmbedded
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded (JNIEnv *env, jobject this) {
struct ComponentData *cdata;
pxembed_server_data sdata;
AWT_LOCK();
MTRACE("notifyChildEmbedded\n");
cdata = (struct ComponentData *)
JNU_GetLongFieldAsPtr(env, this, mComponentPeerIDs.pData);
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
DASSERT(sdata->handle != None);
DASSERT(cdata != NULL);
DASSERT(XtWindow(cdata->widget) != None);
sendMessageHelper(sdata->handle, XEMBED_EMBEDDED_NOTIFY, XtWindow(cdata->widget), min(sdata->version, XEMBED_VERSION), 0);
if (isApplicationActive(env, this)) {
sendMessage(sdata->handle, XEMBED_WINDOW_ACTIVATE);
}
}
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: detachChild
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_detachChild (JNIEnv *env, jobject this) {
pxembed_server_data sdata;
AWT_LOCK();
MTRACE("detachChild\n");
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
/**
* XEmbed specification:
* "The embedder can unmap the client and reparent the client window to the root window. If the
* client receives an ReparentNotify event, it should check the parent field of the XReparentEvent
* structure. If this is the root window of the window's screen, then the protocol is finished and
* there is no further interaction. If it is a window other than the root window, then the protocol
* continues with the new parent acting as the embedder window."
*/
DASSERT(sdata->handle != None);
XUnmapWindow(awt_display, sdata->handle);
XReparentWindow(awt_display, sdata->handle, DefaultRootWindow(awt_display), 0, 0);
Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching(env, this);
sdata->handle = None;
}
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: forwardKeyEvent
* Signature: (Ljava/awt/event/KeyEvent;)V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_forwardKeyEvent (JNIEnv *env, jobject this, jobject event) {
pxembed_server_data sdata;
jbyteArray array;
XEvent *xevent;
AWT_LOCK();
MTRACE("forwardKeyEvent\n");
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
DASSERT(sdata->handle != None);
array = (jbyteArray)(*env)->GetObjectField(env, event, awtEventIDs.bdata);
if (array == NULL) {
MTRACE("array is null\n");
AWT_UNLOCK();
return;
}
xevent = (XEvent *)(*env)->GetByteArrayElements(env, array, NULL);
if (xevent == NULL) {
(*env)->DeleteLocalRef(env, array);
MTRACE("xevent is null\n");
AWT_UNLOCK();
return;
}
xevent->xany.window = sdata->handle;
XSendEvent(awt_display, sdata->handle, False, NoEventMask, xevent);
(*env)->DeleteLocalRef(env, array);
}
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: getAWTKeyCodeForKeySym
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_getAWTKeyCodeForKeySym (JNIEnv *env, jobject this, jint keysym) {
jint keycode = java_awt_event_KeyEvent_VK_UNDEFINED;
Boolean mapsToUnicodeChar;
jint keyLocation;
keysymToAWTKeyCode(keysym, &keycode, &mapsToUnicodeChar, &keyLocation);
return keycode;
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: sendMessage
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__I (JNIEnv *env, jobject this, jint msg) {
pxembed_server_data sdata;
AWT_LOCK();
MTRACEP2("sendMessage %d(%s)\n", msg, msg_to_str(msg));
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
DASSERT(sdata->handle != None);
sendMessage(sdata->handle, msg);
}
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: sendMessage
* Signature: (IJJJ)V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__IJJJ (JNIEnv *env, jobject this, jint msg, jlong detail, jlong data1, jlong data2) {
pxembed_server_data sdata;
AWT_LOCK();
MTRACEP5("sendMessage2 msg %d(%s) detail %d data: %d %d\n", msg, msg_to_str(msg), detail, data1, data2);
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
DASSERT(sdata->handle != None);
sendMessageHelper(sdata->handle, msg, detail, data1, data2);
}
AWT_UNLOCK();
}
static jobject
createRectangle(JNIEnv* env, int x, int y, int width, int height) {
static jclass clazz;
static jmethodID mid;
jobject rect = NULL;
if (mid == 0) {
jclass l_clazz = (*env)->FindClass(env, "java/awt/Rectangle");
DASSERT(l_clazz != NULL);
mid = (*env)->GetMethodID(env, clazz, "<init>", "(IIII)V");
DASSERT(mid != NULL);
clazz = (*env)->NewGlobalRef(env, l_clazz);
(*env)->DeleteLocalRef(env, l_clazz);
}
if (mid != NULL) {
rect = (*env)->NewObject(env, clazz, mid, x, y, width, height);
if ((*env)->ExceptionOccurred(env)) {
return NULL;
}
}
return rect;
}
static jobject
createDimension(JNIEnv* env, int width, int height) {
static jclass clazz;
static jmethodID mid;
jobject dim = NULL;
if (mid == 0) {
jclass l_clazz = (*env)->FindClass(env, "java/awt/Dimension");
DASSERT(l_clazz != NULL);
mid = (*env)->GetMethodID(env, clazz, "<init>", "(II)V");
DASSERT(mid != NULL);
clazz = (*env)->NewGlobalRef(env, l_clazz);
(*env)->DeleteLocalRef(env, l_clazz);
}
if (mid != NULL) {
dim = (*env)->NewObject(env, clazz, mid, width, height);
if ((*env)->ExceptionOccurred(env)) {
return NULL;
}
}
return dim;
}
Boolean isMapped(Window w) {
XWindowAttributes attr;
Status status = 0;
WITH_XERROR_HANDLER(xerror_ignore_bad_window);
status = XGetWindowAttributes(awt_display, w, &attr);
RESTORE_XERROR_HANDLER;
if (status == 0 || xerror_code != Success) {
return False;
}
return !(attr.map_state == IsUnmapped);
}
static void
processXEmbedInfo(JNIEnv * env, jobject this) {
pxembed_server_data sdata;
AWT_LOCK();
MTRACE("processXEmbedInfo\n");
sdata = getDataByEmbedder(this);
if (Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive(env, this)) {
Atom actual_type;
int actual_format;
unsigned long nitems;
unsigned long bytes_after;
CARD32 * data = NULL;
DASSERT(sdata->handle != None);
if (XGetWindowProperty(awt_display, sdata->handle, XA_XEmbedInfo,
0, 2, False, XA_XEmbedInfo, &actual_type,
&actual_format, &nitems, &bytes_after,
(unsigned char**)&data) != Success)
{
AWT_UNLOCK();
return;
}
if (actual_type == XA_XEmbedInfo && actual_format == 32
&& nitems == 2)
{
CARD32 flags;
Boolean new_mapped, currently_mapped;
sdata->version = *data;
flags = *(data+1);
new_mapped = (flags & XEMBED_MAPPED) != 0;
currently_mapped = isMapped(sdata->handle);
if (new_mapped != currently_mapped) {
if (new_mapped) {
XMapWindow(awt_display, sdata->handle);
} else {
XUnmapWindow(awt_display, sdata->handle);
}
}
}
if (data != NULL) {
XFree(data);
}
}
AWT_UNLOCK();
}
/**
* Handles client message on embedder
*/
static void
handleClientMessage(JNIEnv* env, jobject this, XClientMessageEvent * ev) {
pxembed_server_data sdata;
AWT_LOCK();
MTRACEP5("handleClientMessage: 0=%ld 1=%ld 2=%ld 3=%ld 4=%ld\n",
ev->data.l[0], ev->data.l[1], ev->data.l[2], ev->data.l[3], ev->data.l[4]);
sdata = getDataByEmbedder(this);
if (sdata != NULL && sdata->handle != None) {
switch ((int)ev->data.l[1]) {
case XEMBED_REQUEST_FOCUS:
MTRACE("REQUEST_FOCUS\n");
(*env)->CallVoidMethod(env, this, requestXEmbedFocusMID);
break;
case XEMBED_FOCUS_NEXT:
MTRACE("FOCUS_NEXT\n");
(*env)->CallVoidMethod(env, this, focusNextMID);
break;
case XEMBED_FOCUS_PREV:
MTRACE("FOCUS_PREV\n");
(*env)->CallVoidMethod(env, this, focusPrevMID);
break;
case XEMBED_REGISTER_ACCELERATOR:
MTRACE("REGISTER_ACCEL\n");
(*env)->CallVoidMethod(env, this, registerAcceleratorMID,
(jlong)ev->data.l[2],
(jlong)ev->data.l[3],
(jlong)ev->data.l[4]);
break;
case XEMBED_UNREGISTER_ACCELERATOR:
MTRACE("UNREGISTER_ACCEL\n");
(*env)->CallVoidMethod(env, this, unregisterAcceleratorMID,
(jlong)ev->data.l[2]);
break;
case NON_STANDARD_XEMBED_GTK_GRAB_KEY:
MTRACE("GRAB_KEY\n");
(*env)->CallVoidMethod(env, this, grabKeyMID,
(jlong)ev->data.l[3],
(jlong)ev->data.l[4]);
break;
case NON_STANDARD_XEMBED_GTK_UNGRAB_KEY:
MTRACE("UNGRAB_KEY\n");
(*env)->CallVoidMethod(env, this, ungrabKeyMID,
(jlong)ev->data.l[3],
(jlong)ev->data.l[4]);
case _SUN_XEMBED_START:
MTRACE("XEMBED_START\n");
processXEmbedInfo(env, this);
Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded(env, this);
break;
}
}
AWT_UNLOCK();
}
/**
* Handles property changes on xembed client
*/
static void
handlePropertyNotify(XPropertyEvent * ev) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
pxembed_server_data sdata;
AWT_LOCK();
MTRACE("handlePropertyNotify\n");
sdata = getData(ev->window);
if (sdata != NULL) {
if (ev->atom == XA_WM_NORMAL_HINTS) {
DASSERT(sdata->server != NULL);
(*env)->CallVoidMethod(env, sdata->server, childResizedMID);
MTRACE("NORMAL_HINTS have changed\n");
} else if (ev->atom == XA_XdndAware) {
unregister_xembed_drop_site(env, awt_display, sdata->server,
sdata->serverHandle, sdata->handle);
if (ev->state == PropertyNewValue) {
register_xembed_drop_site(env, awt_display, sdata->server,
sdata->serverHandle, sdata->handle);
}
} else if (ev->atom == XA_XEmbedInfo) {
DASSERT(sdata->server != NULL);
MTRACE("XEMBED_INFO has changed\n");
processXEmbedInfo(env, sdata->server);
}
}
AWT_UNLOCK();
}
static void
handleConfigureNotify(XConfigureEvent * ev) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
pxembed_server_data sdata;
AWT_LOCK();
MTRACE("handleConfigureNotify\n");
sdata = getData(ev->window);
if (sdata != NULL) {
DASSERT(sdata->server != NULL);
(*env)->CallVoidMethod(env, sdata->server, childResizedMID);
}
AWT_UNLOCK();
}
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: sendMessage
* Signature: (IJJJ)V
*/
JNIEXPORT void JNICALL
Java_sun_awt_motif_GrabbedKey_initKeySymAndModifiers (JNIEnv *env, jobject this, jobject keyevent) {
jbyteArray array;
XEvent *xevent;
int keysym, modifiers;
int keycode;
AWT_LOCK();
array = (jbyteArray)(*env)->GetObjectField(env, keyevent, awtEventIDs.bdata);
if (array == NULL) {
AWT_UNLOCK();
return;
}
xevent = (XEvent *)(*env)->GetByteArrayElements(env, array, NULL);
if (xevent == NULL) {
(*env)->DeleteLocalRef(env, array);
AWT_UNLOCK();
return;
}
keycode = (*env)->GetIntField(env, keyevent, keyEventIDs.keyCode);
keysym = awt_getX11KeySym(keycode);
modifiers = xevent->xkey.state;
(*env)->SetLongField(env, this, keysymFID, (jlong)keysym);
(*env)->SetLongField(env, this, modifiersFID, (jlong)modifiers);
(*env)->DeleteLocalRef(env, array);
AWT_UNLOCK();
}
#ifdef __linux__
void
print_stack (void)
{
void *array[10];
size_t size;
char **strings;
size_t i;
size = backtrace (array, 10);
strings = backtrace_symbols (array, size);
fprintf (stderr, "Obtained %zd stack frames.\n", size);
for (i = 0; i < size; i++)
fprintf (stderr, "%s\n", strings[i]);
free (strings);
}
#endif
extern int32_t numEventsHandled;
XCreateWindowEvent cr;
void
dispatchEmbedderEvent(jobject server, XEvent * ev) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
DASSERT(server != NULL);
DASSERT(ev != NULL);
AWT_LOCK();
/* MTRACE("dispatchEmebddedEvent\n"); */
switch (ev->type) {
case CreateNotify:
MTRACEP3("CreateNotify for %x, serial %d, num events %d\n", (ev->xcreatewindow.window), (ev->xany.serial), (numEventsHandled));
Java_sun_awt_motif_MEmbedCanvasPeer_embedChild(env, server, ev->xcreatewindow.window);
break;
case DestroyNotify:
MTRACE("DestroyNotify\n");
Java_sun_awt_motif_MEmbedCanvasPeer_childDestroyed(env, server);
break;
case ReparentNotify:
MTRACEP2("ReparentNotify for %x, parent %x\n", (ev->xreparent.window), (ev->xreparent.parent));
Java_sun_awt_motif_MEmbedCanvasPeer_embedChild(env, server, ev->xreparent.window);
break;
case ClientMessage:
MTRACE("ClientMessage\n");
handleClientMessage(env, server, &ev->xclient);
break;
}
AWT_UNLOCK();
}
void
dispatchEmbeddingClientEvent(XEvent * ev) {
DASSERT(ev != NULL);
MTRACE("dispatchEmbeddingClientEvent\n");
switch (ev->type) {
case PropertyNotify:
handlePropertyNotify(&ev->xproperty);
break;
case ConfigureNotify:
handleConfigureNotify(&ev->xconfigure);
break;
}
}
void
xembed_serverEventHandler(XEvent * ev) {
pxembed_server_data sdata;
sdata = getData(ev->xany.window);
if (sdata != NULL) { // Event on client
dispatchEmbeddingClientEvent(ev);
} else {
sdata = getDataByServerHandle(ev->xany.window);
if (sdata != NULL) {
DASSERT(sdata->server != NULL);
dispatchEmbedderEvent(sdata->server, ev);
}
}
}
/**************************** XEmbed server DnD support ***********************/
void
set_xembed_drop_target(JNIEnv* env, jobject server) {
(*env)->CallVoidMethod(env, server, setXEmbedDropTargetMID);
}
void
remove_xembed_drop_target(JNIEnv* env, jobject server) {
(*env)->CallVoidMethod(env, server, removeXEmbedDropTargetMID);
}
Boolean
is_xembed_client(Window window) {
return getData(window) != NULL;
}
/******************************************************************************/
/*
* Class: sun_awt_motif_MEmbedCanvasPeer
* Method: getWindow
* Signature: ()V
*/
JNIEXPORT jlong JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_getWindow(JNIEnv *env, jobject this) {
struct ComponentData *cdata;
Window res = None;
AWT_LOCK();
cdata = (struct ComponentData *)
JNU_GetLongFieldAsPtr(env, this, mComponentPeerIDs.pData);
DASSERT(cdata != NULL);
res = XtWindow(cdata->widget);
AWT_UNLOCK();
return (jlong)res;
}
JNIEXPORT void JNICALL
Java_sun_awt_motif_MEmbedCanvasPeer_forwardEventToEmbedded(JNIEnv *env,
jobject this,
jlong ctxt,
jint eventID){
pxembed_server_data sdata;
AWT_LOCK();
sdata = getDataByEmbedder(this);
if (sdata != NULL) {
forward_event_to_embedded(sdata->handle, ctxt, eventID);
}
AWT_UNLOCK();
}

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef _AWT_XEMBED_SERVER_H_
#define _AWT_XEMBED_SERVER_H_
#ifndef HEADLESS
#include "awt_p.h"
extern void xembed_serverEventHandler(XEvent *);
#endif
#endif

View File

@ -26,44 +26,7 @@
#define _CANVAS_H_
#ifndef HEADLESS
void awt_canvas_reconfigure(struct FrameData *wdata);
Widget awt_canvas_create(XtPointer this,
Widget parent,
char *base,
int32_t width,
int32_t height,
Boolean parentIsFrame,
struct FrameData *wdata,
AwtGraphicsConfigDataPtr awtData);
void awt_canvas_scroll(XtPointer this, struct CanvasData *wdata, long dx, long dy);
void awt_canvas_event_handler(Widget w, XtPointer client_data,
XEvent *event, Boolean *cont);
void awt_canvas_handleEvent(Widget w, XtPointer client_data,
XEvent *event, struct WidgetInfo *winfo,
Boolean *cont, Boolean passEvent);
void awt_copyXEventToAWTEvent(JNIEnv* env, XEvent * xevent, jobject jevent);
KeySym awt_getX11KeySym(jint awtKey);
jobject awt_canvas_getFocusOwnerPeer();
jobject awt_canvas_getFocusedWindowPeer();
void awt_canvas_setFocusOwnerPeer(jobject peer);
void awt_canvas_setFocusedWindowPeer(jobject peer);
jobject awt_canvas_wrapInSequenced(jobject awtevent);
extern void keysymToAWTKeyCode(KeySym x11Key, jint *keycode, Boolean *mapsToUnicodeChar,
jint *keyLocation);
#define awt_canvas_addToFocusList awt_canvas_addToFocusListDefault
void awt_canvas_addToFocusListDefault(jobject target);
void awt_canvas_addToFocusListWithDuplicates(jobject target, jboolean acceptDuplicate);
extern void callFocusCallback(jobject focusPeer, int focus_type, jobject cause);
extern void callFocusHandler(Widget w, int eventType, jobject cause);
typedef struct FocusListElt{
jweak requestor;
struct FocusListElt * next;
} FocusListElt;
extern FocusListElt *focusList;
extern FocusListElt *focusListEnd;
extern jweak forGained;
#endif /* !HEADLESS */
#endif /* _CANVAS_H_ */

View File

@ -38,24 +38,15 @@
#include <jni.h>
#include <jni_util.h>
#include <jvm.h>
#ifndef XAWT
#include <Xm/Display.h>
#endif
#include "awt_Font.h"
#ifndef XAWT
#include "awt_Component.h"
#endif
#include "awt_MenuItem.h"
#include "awt_p.h"
#include "multi_font.h"
extern XFontStruct *loadFont(Display *, char *, int32_t);
extern struct FontIDs fontIDs;
//extern struct MComponentPeerIDs mComponentPeerIDs;
//extern struct MMenuItemPeerIDs mMenuItemPeerIDs;
extern struct PlatformFontIDs platformFontIDs;
extern struct MFontPeerIDs mFontPeerIDs;
extern struct XFontPeerIDs xFontPeerIDs;
/*
* make string with str + string representation of num
@ -70,145 +61,7 @@ makeTag(char *str, int32_t num, char *buf)
buf[len] = '0' + num % 100;
buf[len + 1] = '\0';
}
#ifndef XAWT
jobject
awtJNI_CreateAndSetGlobalRef(JNIEnv * env, jobject this)
{
jobject gRef;
gRef = (*env)->NewGlobalRef(env, this);
JNU_SetLongFieldFromPtr(env, this, mComponentPeerIDs.jniGlobalRef, gRef);
return gRef;
}
struct gRefStruct
{
jobject gRef;
struct gRefStruct *next;
};
static struct gRefStruct *gRefHead = NULL;
static struct gRefStruct *gRefTail = NULL;
/*
* This function is called by components that
* are being disposed. It used to invalidate
* the global ref immediately, but the awt is
* rather full of thread race conditions involving
* component disposal and outstanding events.
* Now we queue up 'to be deleted' global refs
* as they come in, and don't invalidate them
* until the X event queue is empty. Callers of
* either of these functions _must_ have AWT_LOCK'd
* before using them!
*/
void
awtJNI_DeleteGlobalRef(JNIEnv * env, jobject this)
{
jobject gRef;
struct gRefStruct *newGRef;
struct gRefStruct *temp;
gRef = (jobject)
JNU_GetLongFieldAsPtr(env, this, mComponentPeerIDs.jniGlobalRef);
JNU_SetLongFieldFromPtr(env, this, mComponentPeerIDs.jniGlobalRef, NULL);
/*
* Verra handy for tracking down race conditions. If you
* have a peer getting called after its been disposed...
*/
/* jio_fprintf(stderr,"%p\n",(void *)gRef); */
newGRef = (struct gRefStruct *)malloc((size_t)sizeof(struct gRefStruct));
if(newGRef == NULL)
(*env)->DeleteGlobalRef(env, gRef);
else
{
newGRef->gRef = gRef;
newGRef->next = NULL;
if(gRefHead == NULL)
{
gRefTail = newGRef;
gRefHead = newGRef;
}
else
{
gRefTail->next = newGRef;
gRefTail = newGRef;
}
}
}
void
awtJNI_DeleteGlobalMenuRef(JNIEnv * env, jobject this)
{
jobject gRef;
struct gRefStruct *newGRef;
struct gRefStruct *temp;
gRef = (jobject)
//JNU_GetLongFieldAsPtr(env, this, mMenuItemPeerIDs.jniGlobalRef);
//JNU_SetLongFieldFromPtr(env, this, mMenuItemPeerIDs.jniGlobalRef, NULL);
/*
* Verra handy for tracking down race conditions. If you
* have a peer getting called after its been disposed...
*/
/* jio_fprintf(stderr,"%p\n",(void *)gRef); */
newGRef = (struct gRefStruct *)malloc((size_t)sizeof(struct gRefStruct));
if(newGRef == NULL)
(*env)->DeleteGlobalRef(env, gRef);
else
{
newGRef->gRef = gRef;
newGRef->next = NULL;
if(gRefHead == NULL)
{
gRefTail = newGRef;
gRefHead = newGRef;
}
else
{
gRefTail->next = newGRef;
gRefTail = newGRef;
}
}
}
void awtJNI_CleanupGlobalRefs()
{
struct gRefStruct *working,*next;
JNIEnv *env;
int32_t count = 0;
if(gRefHead == NULL) {
return;
}
env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
working = gRefHead;
gRefHead = gRefTail = NULL;
while(working != NULL)
{
count++;
next = working->next;
(*env)->DeleteGlobalRef(env, working->gRef);
free((void *)working);
working = next;
}
}
#endif
static int32_t
awtJNI_GetFontDescriptorNumber(JNIEnv * env
,jobject font
@ -255,25 +108,7 @@ awtJNI_GetFontDescriptorNumber(JNIEnv * env
return 0;
}
#ifndef XAWT
jobject
awtJNI_GetFont(JNIEnv * env, jobject this)
{
jobject target = NULL;
jobject font = NULL;
target = (*env)->GetObjectField(env, this, mComponentPeerIDs.target);
// SECURITY: Must call _NoClientCode() methods to ensure that we
// are not invoking client code on the privileged thread
font = JNU_CallMethodByName(env,
NULL,
target,
"getFont_NoClientCode",
"()Ljava/awt/Font;").l;
(*env)->DeleteLocalRef(env, target);
return font;
}
#endif
jobject
awtJNI_GetFMFont(JNIEnv * env, jobject this)
{
@ -347,258 +182,7 @@ awtJNI_IsMultiFontMetrics(JNIEnv * env, jobject this)
return JNI_TRUE;
}
#ifndef XAWT
#ifdef __linux__
XmString
unicodeXmStringCreate(char* text, char* tag, int len) {
XmString ret_val;
XtProcessLock();
ret_val = _XmStringNCreate (text, tag, len);
XtProcessUnlock();
return ret_val;
}
#endif
/*
* Unicode to Motif Multi Font Compound String converter
*
* ASSUMES: We are not running on a privileged thread
*/
XmString
awtJNI_MakeMultiFontString(JNIEnv * env, jstring s, jobject font)
{
XmString xmstr = NULL, xmtmp1, xmtmp2;
jobjectArray dataArray = NULL;
char *err = NULL;
int32_t stringCount,i;
int32_t fdnumber;
struct FontData *fdata = awtJNI_GetFontData(env, font, &err);
jobject fontDescriptor = NULL;
jbyteArray data = NULL;
char *stringData = NULL;
char tag[BUFSIZ];
if ((*env)->PushLocalFrame(env, 16) < 0)
return NULL;
if (!JNU_IsNull(env, s) && !JNU_IsNull(env, font)) {
jobject peer;
peer = (*env)->CallObjectMethod(env,font,fontIDs.getPeer);
DASSERT(!awt_currentThreadIsPrivileged(env));
dataArray =
(*env)->CallObjectMethod(
env,
peer,
platformFontIDs.makeConvertedMultiFontString,
s);
if ((*env)->ExceptionOccurred(env)) {
(*env)->ExceptionDescribe(env);
(*env)->ExceptionClear(env);
(*env)->PopLocalFrame(env, NULL);
return (XmString) NULL;
}
if(dataArray == NULL) {
(*env)->PopLocalFrame(env, NULL);
return (XmString) NULL;
}
} else {
(*env)->PopLocalFrame(env, NULL);
return (XmString) NULL;
}
stringCount = (*env)->GetArrayLength(env, dataArray);
for (i = 0; i < stringCount; i+=2) {
fontDescriptor = (*env)->GetObjectArrayElement(env, dataArray, i);
data = (*env)->GetObjectArrayElement(env, dataArray, i + 1);
/* Bail if we've finished */
if(fontDescriptor == NULL || data == NULL)
break;
fdnumber = awtJNI_GetFontDescriptorNumber(env, font, fontDescriptor);
fdata = awtJNI_GetFontData(env, font, &err);
makeTag(fdata->flist[fdnumber].charset_name, fdnumber, tag);
stringData = (char *)(*env)->GetPrimitiveArrayCritical(env, data, NULL);
if(stringData != NULL) {
unsigned char* buf = stringData;
int len;
char *offsetStringData;
offsetStringData = stringData + (4 * sizeof(char));
#ifdef __linux__
len = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3];
/* Motif XmStringCreate() API requests "text must be a NULL-terminated
string" and its implementation uses "strlen()" to calculate the length
of the text string. Unfortunately when we deal with iso10646 font
on linux, the "text" is requested to be encoded in UTF16, which has the
posibility of including code points like "0xYY00" ("0xYY" + "0x00") that
causes problem when XmStringCreate() calls _XmStringNCreate() without
specifying a specific text lenth (see Motif XmString.c). The workaround is
to call _XmStringNCreate() directly with specific text length at this
cirsumstance.
*/
if (strstr(fdata->flist[fdnumber].charset_name, "UnicodeBigUnmarked"))
xmtmp1 = unicodeXmStringCreate(offsetStringData, tag, len);
else
xmtmp1 = XmStringCreate(offsetStringData, tag);
if (xmstr == NULL)
xmstr = xmtmp1;
else {
xmtmp2 = XmStringConcat(xmstr, xmtmp1);
XmStringFree(xmtmp1);
XmStringFree(xmstr);
xmstr = xmtmp2;
}
#else
if(xmstr == NULL) {
xmstr = XmStringCreate(offsetStringData, tag);
}
else {
xmtmp1 = XmStringCreate(offsetStringData, tag);
xmtmp2 = XmStringConcat(xmstr, xmtmp1);
XmStringFree(xmtmp1);
XmStringFree(xmstr);
xmstr = xmtmp2;
}
#endif
}
(*env)->ReleasePrimitiveArrayCritical(env, data, stringData, JNI_ABORT);
(*env)->DeleteLocalRef(env, fontDescriptor);
(*env)->DeleteLocalRef(env, data);
}
(*env)->PopLocalFrame(env, NULL);
return xmstr;
}
/*
* Find the character encoding for a given font and register that encoding
* with the given tag. The encoding is the last two fields of the XLFD of
* the font (converted to uppercase).
*/
static void registerEncoding(char *xlfd, char *tag)
{
char *e = xlfd + strlen(xlfd);
char *ret = NULL;
do { --e; } while (e != xlfd && *e != '-');
do { --e; } while (e != xlfd && *e != '-');
if (e != xlfd) {
char *encoding = strdup(++e);
char *u = NULL;
for (u = encoding; *u != '\0'; ++u) {
if (islower(*u)) {
*u = toupper(*u);
}
}
/*
* Motif will core dump on or otherwise mishandle unknown (or
* non-standard) character encodings (in conversion to compound
* text, bug 4122785). Register Sun private encodings for
* Symbol or dingbat fonts as ISO8859-1, which is a lie,
* but produces predictable results.
*/
if (strncmp(encoding, "SUN-", 4) == 0) {
free(encoding);
encoding = strdup("ISO8859-1");
}
ret = XmRegisterSegmentEncoding(tag, encoding);
if (ret != NULL)
XtFree(ret);
free(encoding);
}
}
XmFontList
awtJNI_GetFontList(JNIEnv * env, jobject font)
{
int32_t i;
XmFontListEntry fle;
XmFontList fontlist;
XFontStruct *xf = NULL;
int32_t size;
struct FontData *fdata = NULL;
char *err = NULL, tag[BUFSIZ];
fdata = awtJNI_GetFontData(env, font, &err);
makeTag(fdata->flist[0].charset_name, 0, tag);
size = (int32_t) (*env)->GetIntField(env, font, fontIDs.size);
if (fdata->flist[0].load == 0) {
xf = loadFont(awt_display, fdata->flist[0].xlfd, size * 10);
if (xf == NULL) {
/* printf("Cannot load font: %s\n", fdata->list[0].xlfd); */
} else {
fdata->flist[0].xfont = xf;
fdata->flist[0].load = 1;
if (xf->min_byte1 == 0 && xf->max_byte1 == 0)
fdata->flist[0].index_length = 1;
else
fdata->flist[0].index_length = 2;
}
}
registerEncoding(fdata->flist[0].xlfd, tag);
fle = XmFontListEntryCreate(tag, XmFONT_IS_FONT,
(XtPointer) fdata->flist[0].xfont);
fontlist = XmFontListAppendEntry(NULL, fle);
/*
* Some versions of motif have a bug in
* XmFontListEntryFree() which causes it to free more than it
* should. Use XtFree() is used instead. See O'Reilly's
* Motif Reference Manual for more information.
*/
XmFontListEntryFree(&fle);
for (i = 1; i < fdata->charset_num; i++) {
makeTag(fdata->flist[i].charset_name, i, tag);
if (fdata->flist[i].load == 0) {
xf = loadFont(awt_display, fdata->flist[i].xlfd, size * 10);
if (xf == NULL) {
/* printf("Cannot load font: %s\n", fdata->flist[0].xlfd); */
continue;
}
fdata->flist[i].xfont = xf;
fdata->flist[i].load = 1;
if (xf->min_byte1 == 0 && xf->max_byte1 == 0) {
fdata->flist[i].index_length = 1;
} else {
fdata->flist[i].index_length = 2;
}
}
registerEncoding(fdata->flist[i].xlfd, tag);
fle = XmFontListEntryCreate(tag, XmFONT_IS_FONT,
(XtPointer) fdata->flist[i].xfont);
fontlist = XmFontListAppendEntry(fontlist, fle);
/*
* Some versions of motif have a bug in
* XmFontListEntryFree() which causes it to free more than it
* should. Use XtFree() instead. See O'Reilly's
* Motif Reference Manual for more information.
*/
XmFontListEntryFree(&fle);
}
return fontlist;
}
#endif
/* #define FONT_DEBUG 2 */
XFontSet
@ -625,7 +209,7 @@ awtJNI_MakeFontSet(JNIEnv * env, jobject font)
size = (*env)->GetIntField(env, font, fontIDs.size) * 10;
peer = (*env)->CallObjectMethod(env,font,fontIDs.getPeer);
xfsname = (*env)->GetObjectField(env, peer, mFontPeerIDs.xfsname);
xfsname = (*env)->GetObjectField(env, peer, xFontPeerIDs.xfsname);
if (JNU_IsNull(env, xfsname))
xfontset = "";
@ -703,9 +287,6 @@ awtJNI_GetMFStringWidth(JNIEnv * env, jcharArray s, int offset, int sLength, job
int32_t length;
XFontStruct *xf = NULL;
jobjectArray dataArray = NULL;
#ifndef XAWT
DASSERT(!awt_currentThreadIsPrivileged(env));
#endif
if ((*env)->EnsureLocalCapacity(env, 3) < 0)
return 0;

View File

@ -29,13 +29,8 @@
#define _MULTI_FONT_H_
#ifndef HEADLESS
jobject awtJNI_GetFont(JNIEnv *env,jobject this);
jboolean awtJNI_IsMultiFont(JNIEnv *env,jobject this);
jboolean awtJNI_IsMultiFontMetrics(JNIEnv *env,jobject this);
#ifndef XAWT
XmString awtJNI_MakeMultiFontString(JNIEnv *env,jstring s,jobject font);
XmFontList awtJNI_GetFontList(JNIEnv *env,jobject font);
#endif
XFontSet awtJNI_MakeFontSet(JNIEnv *env,jobject font);
struct FontData *awtJNI_GetFontData(JNIEnv *env,jobject font, char **errmsg);
int32_t awtJNI_GetMFStringWidth(JNIEnv * env, jcharArray s, int32_t offset,

View File

@ -45,8 +45,6 @@ extern GetRasInfoFunc OGLSD_GetRasInfo;
extern UnlockFunc OGLSD_Unlock;
extern DisposeFunc OGLSD_Dispose;
extern struct MComponentPeerIDs mComponentPeerIDs;
extern void
OGLSD_SetNativeDimensions(JNIEnv *env, OGLSDOps *oglsdo, jint w, jint h);
@ -86,34 +84,12 @@ Java_sun_java2d_opengl_GLXSurfaceData_initOps(JNIEnv *env, jobject glxsd,
oglsdo->activeBuffer = GL_FRONT;
oglsdo->needsInit = JNI_TRUE;
#ifdef XAWT
if (peer != NULL) {
glxsdo->window = JNU_CallMethodByName(env, NULL, peer,
"getContentWindow", "()J").j;
} else {
glxsdo->window = 0;
}
#else
if (peer != NULL) {
struct ComponentData *cdata;
cdata = (struct ComponentData *)
JNU_GetLongFieldAsPtr(env, peer, mComponentPeerIDs.pData);
if (cdata == NULL) {
free(glxsdo);
JNU_ThrowNullPointerException(env, "Component data missing");
return;
}
if (cdata->widget == NULL) {
free(glxsdo);
JNU_ThrowInternalError(env, "Widget is NULL in initOps");
return;
}
glxsdo->widget = cdata->widget;
} else {
glxsdo->widget = NULL;
}
#endif
glxsdo->configData = (AwtGraphicsConfigDataPtr)jlong_to_ptr(aData);
if (glxsdo->configData == NULL) {
free(glxsdo);
@ -331,11 +307,7 @@ OGLSD_InitOGLWindow(JNIEnv *env, OGLSDOps *oglsdo)
{
GLXSDOps *glxsdo;
Window window;
#ifdef XAWT
XWindowAttributes attr;
#else
Widget widget;
#endif
J2dTraceLn(J2D_TRACE_INFO, "OGLSD_InitOGLWindow");
@ -352,7 +324,6 @@ OGLSD_InitOGLWindow(JNIEnv *env, OGLSDOps *oglsdo)
return JNI_FALSE;
}
#ifdef XAWT
window = glxsdo->window;
if (window == 0) {
J2dRlsTraceLn(J2D_TRACE_ERROR,
@ -363,22 +334,6 @@ OGLSD_InitOGLWindow(JNIEnv *env, OGLSDOps *oglsdo)
XGetWindowAttributes(awt_display, window, &attr);
oglsdo->width = attr.width;
oglsdo->height = attr.height;
#else
widget = glxsdo->widget;
if (widget == NULL) {
J2dTraceLn(J2D_TRACE_WARNING, "OGLSD_InitOGLWindow: widget is null");
}
if (!XtIsRealized(widget)) {
J2dRlsTraceLn(J2D_TRACE_ERROR,
"OGLSD_InitOGLWindow: widget is unrealized");
return JNI_FALSE;
}
window = XtWindow(widget);
oglsdo->width = widget->core.width;
oglsdo->height = widget->core.height;
#endif
oglsdo->drawableType = OGLSD_WINDOW;
oglsdo->isOpaque = JNI_TRUE;

View File

@ -38,16 +38,11 @@
* The GLXSDOps structure contains the GLX-specific information for a given
* OGLSurfaceData. It is referenced by the native OGLSDOps structure.
*
* Window window; (used in XAWT only)
* Window window;
* For onscreen windows, we maintain a reference to that window's associated
* XWindow handle here. Offscreen surfaces have no associated Window, so for
* those surfaces, this value will simply be zero.
*
* Widget widget; (used in MAWT only)
* For onscreen windows, we maintain a reference to that window's associated
* Widget handle here. Offscreen surfaces have no associated Widget, so for
* those surfaces, this value will simply be zero.
*
* Drawable xdrawable;
* If a GLXDrawable has a corresponding X11 Drawable, it is stored here. For
* example, each GLXWindow has an associated Window and each GLXPixmap has an
@ -63,11 +58,7 @@
* created.
*/
typedef struct _GLXSDOps {
#ifdef XAWT
Window window;
#else
Widget widget;
#endif
Drawable xdrawable;
GLXDrawable drawable;
struct _AwtGraphicsConfigData *configData;

View File

@ -64,9 +64,6 @@ static UnlockFunc X11SD_Unlock;
static DisposeFunc X11SD_Dispose;
static GetPixmapBgFunc X11SD_GetPixmapWithBg;
static ReleasePixmapBgFunc X11SD_ReleasePixmapWithBg;
#ifndef XAWT
extern struct MComponentPeerIDs mComponentPeerIDs;
#endif
extern int J2DXErrHandler(Display *display, XErrorEvent *xerr);
extern AwtGraphicsConfigDataPtr
getGraphicsConfigFromComponentPeer(JNIEnv *env, jobject this);
@ -263,31 +260,12 @@ Java_sun_java2d_x11_XSurfaceData_initOps(JNIEnv *env, jobject xsd,
xsdo->sdOps.Dispose = X11SD_Dispose;
xsdo->GetPixmapWithBg = X11SD_GetPixmapWithBg;
xsdo->ReleasePixmapWithBg = X11SD_ReleasePixmapWithBg;
#ifndef XAWT
if (peer != NULL) {
struct ComponentData *cdata;
cdata = (struct ComponentData *)
JNU_GetLongFieldAsPtr(env, peer, mComponentPeerIDs.pData);
if (cdata == NULL) {
JNU_ThrowNullPointerException(env, "Component data missing");
return;
}
if (cdata->widget == NULL) {
JNU_ThrowInternalError(env, "Widget is NULL in initOps");
return;
}
xsdo->widget = cdata->widget;
} else {
xsdo->widget = NULL;
}
#else
xsdo->widget = NULL;
if (peer != NULL) {
xsdo->drawable = JNU_CallMethodByName(env, NULL, peer, "getWindow", "()J").j;
} else {
xsdo->drawable = 0;
}
#endif
xsdo->depth = depth;
xsdo->dgaAvailable = dgaAvailable;
xsdo->isPixmap = JNI_FALSE;
@ -775,14 +753,6 @@ jint X11SD_InitWindow(JNIEnv *env, X11SDOps *xsdo)
if (xsdo->isPixmap == JNI_TRUE) {
return SD_FAILURE;
}
#ifndef XAWT
if (!XtIsRealized(xsdo->widget)) {
J2dTraceLn(J2D_TRACE_WARNING, "X11SD_InitWindow: widget is unrealized");
/* AWT_UNLOCK(); unlock it in caller */
return SD_FAILURE;
}
xsdo->drawable = XtWindow(xsdo->widget);
#endif
xsdo->cData = xsdo->configData->color_data;
return SD_SUCCESS;
@ -804,9 +774,7 @@ static jint X11SD_Lock(JNIEnv *env,
SurfaceData_ThrowInvalidPipeException(env, "bounds changed");
return SD_FAILURE;
}
#ifdef XAWT
xsdo->cData = xsdo->configData->color_data;
#endif
if (xsdo->drawable == 0 && X11SD_InitWindow(env, xsdo) == SD_FAILURE) {
AWT_UNLOCK();
return SD_FAILURE;
@ -1081,30 +1049,6 @@ X11SD_ClipToRoot(SurfaceDataBounds *b, SurfaceDataBounds *bounds,
int tmpx, tmpy;
Window tmpchild;
#ifndef XAWT
Widget w = xsdo->widget;
x1 = y1 = 0;
for (; w != NULL && ! XtIsShell(w); w = w->core.parent) {
x1 += w->core.x + w->core.border_width;
y1 += w->core.y + w->core.border_width;
}
if (w == NULL) {
return FALSE;
}
/*
* REMIND: We should not be offsetting here by border_width
* but for some unknown reason if we do not do that the
* results will be off exactly by border_width. We were unable
* to find cause of this.
*/
(void) XTranslateCoordinates(XtDisplay(w), XtWindow(w),
RootWindowOfScreen(XtScreen(w)),
(int) w->core.border_width,
(int) w->core.border_width,
&tmpx, &tmpy, &tmpchild);
#else
Window window = (Window)(xsdo->drawable); /* is always a Window */
XWindowAttributes winAttr;
@ -1118,7 +1062,6 @@ X11SD_ClipToRoot(SurfaceDataBounds *b, SurfaceDataBounds *bounds,
0, 0, &tmpx, &tmpy, &tmpchild)) {
return FALSE;
}
#endif
x1 = -(x1 + tmpx);
y1 = -(y1 + tmpy);
@ -1150,89 +1093,6 @@ X11SD_ClipToRoot(SurfaceDataBounds *b, SurfaceDataBounds *bounds,
static int
X11SD_FindClip(SurfaceDataBounds *b, SurfaceDataBounds *bounds, X11SDOps *xsdo)
{
#ifndef XAWT
int x1, y1, x2, y2, px1, py1, px2, py2, child_x, child_y;
Widget current_widget, child_widget;
XWindowAttributes attr;
Window ignore_root, current_window, *ignore_children;
unsigned int pborder, ignore_uint;
x1 = bounds->x1;
y1 = bounds->y1;
x2 = bounds->x2;
y2 = bounds->y2;
px1 = py1 = 0;
child_widget = xsdo->widget;
current_widget = XtParent(xsdo->widget);
while (current_widget != NULL && !XtIsShell(current_widget)) {
px1 = px1 - (child_widget->core.x + child_widget->core.border_width);
py1 = py1 - (child_widget->core.y + child_widget->core.border_width);
px2 = px1 + current_widget->core.width;
py2 = py1 + current_widget->core.height;
x1 = MAX(x1, px1);
y1 = MAX(y1, py1);
x2 = MIN(x2, px2);
y2 = MIN(y2, py2);
if ((x1 >= x2) || (y1 >= y2)) {
return FALSE;
}
child_widget = current_widget;
current_widget = current_widget->core.parent;
}
if (current_widget == NULL) {
XQueryTree(awt_display,
XtWindow(child_widget),
&ignore_root,
&current_window,
&ignore_children,
&ignore_uint);
XFree(ignore_children);
} else {
current_window = XtWindow(current_widget);
}
child_x = child_widget->core.x + child_widget->core.border_width;
child_y = child_widget->core.y + child_widget->core.border_width;
while (current_window != 0) {
px1 = px1 - child_x;
py1 = py1 - child_y;
if (!XGetGeometry(awt_display, current_window, &ignore_root,
&child_x, &child_y,
(unsigned int *)&px2, (unsigned int *)&py2,
&pborder, &ignore_uint)) {
return FALSE;
}
child_x += pborder;
child_y += pborder;
px2 += px1;
py2 += py1;
x1 = MAX(x1, px1);
y1 = MAX(y1, py1);
x2 = MIN(x2, px2);
y2 = MIN(y2, py2);
if ((x1 >= x2) || (y1 >= y2)) {
return FALSE;
}
XQueryTree(awt_display,
current_window,
&ignore_root,
&current_window,
&ignore_children,
&ignore_uint);
XFree(ignore_children);
}
b->x1 = x1;
b->y1 = y1;
b->x2 = x2;
b->y2 = y2;
#endif
return TRUE;
}

View File

@ -39,7 +39,6 @@
#include "awt_p.h"
#include "awt_Component.h"
#include "awt_MenuComponent.h"
#include "awt_KeyboardFocusManager.h"
#include "awt_Font.h"
#include "sun_awt_X11_XToolkit.h"
@ -74,19 +73,17 @@ struct ComponentIDs componentIDs;
struct MenuComponentIDs menuComponentIDs;
struct KeyboardFocusManagerIDs keyboardFocusManagerIDs;
#ifndef HEADLESS
extern Display* awt_init_Display(JNIEnv *env, jobject this);
extern struct MFontPeerIDs mFontPeerIDs;
struct XFontPeerIDs xFontPeerIDs;
JNIEXPORT void JNICALL
Java_sun_awt_X11_XFontPeer_initIDs
(JNIEnv *env, jclass cls)
{
mFontPeerIDs.xfsname =
xFontPeerIDs.xfsname =
(*env)->GetFieldID(env, cls, "xfsname", "Ljava/lang/String;");
}
#endif /* !HEADLESS */